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
b0089a43
Commit
b0089a43
authored
Jun 26, 2015
by
hbcui1984
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择列表增加省、市、县三级联动示例
parent
b97623e7
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
11875 additions
and
194 deletions
+11875
-194
examples/hello-mui/css/mui.listpicker.css
examples/hello-mui/css/mui.listpicker.css
+3
-0
examples/hello-mui/examples/poppicker.html
examples/hello-mui/examples/poppicker.html
+20
-4
examples/hello-mui/js/city.data-3.js
examples/hello-mui/js/city.data-3.js
+11548
-0
examples/hello-mui/js/mui.listpicker.js
examples/hello-mui/js/mui.listpicker.js
+304
-190
No files found.
examples/hello-mui/css/mui.listpicker.css
View file @
b0089a43
...
...
@@ -46,6 +46,9 @@
padding
:
8px
;
text-align
:
center
;
color
:
#555
;
white-space
:
nowrap
;
overflow
:
hidden
;
text-overflow
:
ellipsis
;
}
.mui-listpicker
ul
li
:last-child
{
border-bottom
:
none
;
...
...
examples/hello-mui/examples/poppicker.html
View file @
b0089a43
...
...
@@ -40,17 +40,20 @@
<div
class=
"mui-content"
>
<div
class=
"mui-content-padded"
>
<h5
class=
"mui-content-padded"
>
普通示例
</h5>
<button
id=
'showUserPicker'
class=
"mui-btn mui-btn-block"
type=
'button'
>
显示选择人员
...
</button>
<button
id=
'showUserPicker'
class=
"mui-btn mui-btn-block"
type=
'button'
>
一级选择示例
...
</button>
<div
id=
'userResult'
class=
"ui-alert"
></div>
<h5
class=
"mui-content-padded"
>
级联示例
</h5>
<button
id=
'showCityPicker'
class=
"mui-btn mui-btn-block"
type=
'button'
>
显示选择城市
...
</button>
<button
id=
'showCityPicker'
class=
"mui-btn mui-btn-block"
type=
'button'
>
二级联动示例
...
</button>
<div
id=
'cityResult'
class=
"ui-alert"
></div>
<button
id=
'showCityPicker3'
class=
"mui-btn mui-btn-block"
type=
'button'
>
三级联动示例 ...
</button>
<div
id=
'cityResult3'
class=
"ui-alert"
></div>
</div>
</div>
<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
src=
"../js/city.data-3.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
<script>
(
function
(
$
,
doc
)
{
$
.
init
();
...
...
@@ -94,7 +97,7 @@
userPicker
.
show
(
function
(
items
)
{
userResult
.
innerText
=
JSON
.
stringify
(
items
[
0
]);
});
},
false
);
},
false
);
//-----------------------------------------
//级联示例
var
cityPicker
=
new
$
.
PopPicker
({
...
...
@@ -105,7 +108,20 @@
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
);
//-----------------------------------------
// //级联示例
var
cityPicker3
=
new
$
.
PopPicker
({
layer
:
3
});
cityPicker3
.
setData
(
cityData3
);
var
showCityPickerButton
=
doc
.
getElementById
(
'
showCityPicker3
'
);
var
cityResult3
=
doc
.
getElementById
(
'
cityResult3
'
);
showCityPickerButton
.
addEventListener
(
'
tap
'
,
function
(
event
)
{
cityPicker3
.
show
(
function
(
items
)
{
cityResult3
.
innerText
=
"
你选择的城市是:
"
+
items
[
0
].
text
+
"
"
+
items
[
1
].
text
+
"
"
+
items
[
2
].
text
;
});
},
false
);
});
...
...
examples/hello-mui/js/city.data-3.js
0 → 100644
View file @
b0089a43
This diff is collapsed.
Click to expand it.
examples/hello-mui/js/mui.listpicker.js
View file @
b0089a43
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