Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mui
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Administrator
mui
Commits
a06d6a5e
Commit
a06d6a5e
authored
Jun 10, 2015
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
城市选择提供真实完整的数据
parent
6e6690d3
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1611 additions
and
101 deletions
+1611
-101
examples/hello-mui/examples/poppicker.html
examples/hello-mui/examples/poppicker.html
+6
-101
examples/hello-mui/js/city.data.js
examples/hello-mui/js/city.data.js
+1605
-0
No files found.
examples/hello-mui/examples/poppicker.html
View file @
a06d6a5e
...
...
@@ -30,7 +30,7 @@
font-size
:
16px
;
}
</style>
</head>
</head>
<body>
<header
class=
"mui-bar mui-bar-nav"
>
...
...
@@ -50,6 +50,7 @@
<script
src=
"../js/mui.min.js"
></script>
<script
src=
"../js/mui.listpicker.js"
></script>
<script
src=
"../js/mui.poppicker.js"
></script>
<script
src=
"../js/city.data.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
<script>
(
function
(
$
,
doc
)
{
$
.
init
();
...
...
@@ -93,114 +94,18 @@
userPicker
.
show
(
function
(
items
)
{
userResult
.
innerText
=
JSON
.
stringify
(
items
[
0
]);
});
},
false
);
},
false
);
//-----------------------------------------
//级联示例
var
cityPicker
=
new
$
.
PopPicker
({
layer
:
2
});
cityPicker
.
setData
([{
value
:
'
sx
'
,
text
:
'
陕西
'
,
children
:
[{
value
:
'
xy
'
,
text
:
'
咸阳
'
},
{
value
:
'
xa
'
,
text
:
'
西安
'
},
{
value
:
'
ya
'
,
text
:
'
延安
'
},
{
value
:
'
bj
'
,
text
:
'
宝鸡
'
},
{
value
:
'
tc
'
,
text
:
'
铜川
'
},
{
value
:
'
wn
'
,
text
:
'
渭南
'
},
{
value
:
'
sl
'
,
text
:
'
商洛
'
},
{
value
:
'
hz
'
,
text
:
'
汉中
'
}]
},
{
value
:
'
hn
'
,
text
:
'
河南
'
,
children
:
[{
value
:
'
ly
'
,
text
:
'
洛阳
'
},
{
value
:
'
df
'
,
text
:
'
开封
'
},
{
value
:
'
ny
'
,
text
:
'
南阳
'
},
{
value
:
'
ay
'
,
text
:
'
安阳
'
},
{
value
:
'
jy
'
,
text
:
'
济源
'
},
{
value
:
'
jz
'
,
text
:
'
焦作
'
},
{
value
:
'
xx
'
,
text
:
'
新乡
'
},
{
value
:
'
xy
'
,
text
:
'
信阳
'
},
{
value
:
'
py
'
,
text
:
'
濮阳
'
},
{
value
:
'
smx
'
,
text
:
'
三门峡
'
},
{
value
:
'
sq
'
,
text
:
'
商丘
'
},
{
value
:
'
zk
'
,
text
:
'
周口
'
},
{
value
:
'
pds
'
,
text
:
'
平顶山
'
}]
},
{
value
:
'
sd
'
,
text
:
'
山东
'
,
children
:
[{
value
:
'
qf
'
,
text
:
'
曲阜
'
},
{
value
:
'
jn
'
,
text
:
'
济南
'
},
{
value
:
'
qd
'
,
text
:
'
青岛
'
},
{
value
:
'
wh
'
,
text
:
'
威海
'
},
{
value
:
'
yc
'
,
text
:
'
烟台
'
},
{
value
:
'
hz
'
,
text
:
'
荷泽
'
},
{
value
:
'
ta
'
,
text
:
'
泰安
'
}]
}]);
});
cityPicker
.
setData
(
cityData
);
var
showCityPickerButton
=
doc
.
getElementById
(
'
showCityPicker
'
);
var
cityResult
=
doc
.
getElementById
(
'
cityResult
'
);
showCityPickerButton
.
addEventListener
(
'
tap
'
,
function
(
event
)
{
cityPicker
.
show
(
function
(
items
)
{
cityResult
.
innerText
=
items
[
0
].
text
+
items
[
1
].
text
;
cityResult
.
innerText
=
"
你选择的城市是:
"
+
items
[
0
].
text
+
items
[
1
].
text
;
});
},
false
);
});
...
...
examples/hello-mui/js/city.data.js
0 → 100644
View file @
a06d6a5e
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment