Skip to content

Commit

Permalink
v1.5
Browse files Browse the repository at this point in the history
  • Loading branch information
xfhxbb committed Mar 17, 2016
1 parent 42e3e13 commit b3ecfcc
Show file tree
Hide file tree
Showing 7 changed files with 189 additions and 95 deletions.
77 changes: 0 additions & 77 deletions LArea.html

This file was deleted.

14 changes: 14 additions & 0 deletions css/LArea.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 92 additions & 0 deletions index.html
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>
88 changes: 76 additions & 12 deletions js/LArea.js

Large diffs are not rendered by default.

8 changes: 2 additions & 6 deletions js/LArea.min.js

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions js/LAreaData1.js

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions js/LAreaData2.js

Large diffs are not rendered by default.

0 comments on commit b3ecfcc

Please sign in to comment.