-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
189 additions
and
95 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
<!doctype html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="utf-8" /> | ||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"> | ||
<meta content="yes" name="apple-mobile-web-app-capable"> | ||
<meta content="black" name="apple-mobile-web-app-status-bar-style"> | ||
<meta content="telephone=no" name="format-detection"> | ||
<meta content="email=no" name="format-detection"> | ||
<title>移动端城市选择</title> | ||
<style type="text/css"> | ||
* { | ||
margin: 0; | ||
padding: 0; | ||
-webkit-appearance: none; //去掉浏览器默认样式 | ||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0); | ||
-webkit-touch-callout: none; | ||
box-sizing: border-box; | ||
} | ||
html, | ||
body { | ||
margin: 0 auto; | ||
width: 100%; | ||
min-height: 100%; | ||
overflow-x: hidden; | ||
-webkit-user-select: none; | ||
} | ||
|
||
body { | ||
font-family: Helvetica Neue, Helvetica, Arial, sans-serif; | ||
-webkit-text-size-adjust: 100%; //关闭自动调整字体 | ||
-webkit-overflow-scrolling: touch; | ||
overflow-scrolling: touch; | ||
} | ||
input{ | ||
width: 90%; | ||
height: 40px; | ||
font-size: 18px; | ||
border: 1px solid #19b5ee; | ||
border-radius: 5px; | ||
margin: 20px 5% 0 5%; | ||
padding: 5px; | ||
} | ||
h1{ | ||
background-color: #19b5ee; | ||
color: #fff; | ||
font-size: 25px; | ||
text-align: center; | ||
padding: 10px; | ||
} | ||
</style> | ||
<link rel="stylesheet" href="css/LArea.css"> | ||
</head> | ||
|
||
<body class="static"> | ||
<div class="demo-content"> | ||
<h1>LArea移动端城市选择控件</h1> | ||
<div class="content-block"> | ||
<input id="demo1" type="text" readonly="" name="input_date" placeholder="城市选择特效"/> | ||
<input id="value1" type="hidden" name="input_date"/> | ||
</div> | ||
<div class="content-block"> | ||
<input id="demo2" type="text" readonly="" name="input_date" placeholder="城市选择特效"/> | ||
<input id="value2" type="hidden" name="input_date"/> | ||
</div> | ||
</div> | ||
<script src="js/LAreaData1.js"></script> | ||
<script src="js/LAreaData2.js"></script> | ||
<script src="js/LArea.js"></script> | ||
<script> | ||
var area1 = new LArea(); | ||
area1.init({ | ||
'trigger': '#demo1',//触发选择控件的文本框,同时选择完毕后name属性输出到该位置 | ||
'valueTo':'#value1',//选择完毕后id属性输出到该位置 | ||
'keys':{id:'id',name:'name'},//绑定数据源相关字段 id对应valueTo的value属性输出 name对应trigger的value属性输出 | ||
'type':1,//数据源类型 | ||
'data':LAreaData//数据源 | ||
}); | ||
var area2 = new LArea(); | ||
area2.init({ | ||
'trigger': '#demo2', | ||
'valueTo':'#value2', | ||
'keys':{id:'value',name:'text'}, | ||
'type':2, | ||
'data':[provs_data,citys_data,dists_data] | ||
}); | ||
</script> | ||
|
||
</body> | ||
|
||
</html> |
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.