Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
npm
/
glsx-components
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit b4d9cd3f
authored
Jun 14, 2022
by
匡雅琴
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
省市组件方法备注
1 parent
8c6d11d9
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
src/packages/GLProvince/src/GLProvince.md
src/packages/GLProvince/src/index.vue
src/packages/GLProvince/src/GLProvince.md
View file @
b4d9cd3
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
// 获取省市信息(可传值,具体看index.vue文件介绍)
// 获取省市信息(可传值,具体看index.vue文件介绍)
// this.$refs.provinceForm1.provinceList
// this.$refs.provinceForm1.provinceList
setTimeout(() => {
setTimeout(() => {
this.$refs.provinceForm2.provinceList
()
this.$refs.provinceForm2.provinceList
})
})
// 省市区回显
// 省市区回显
...
...
src/packages/GLProvince/src/index.vue
View file @
b4d9cd3
...
@@ -137,21 +137,21 @@ export default {
...
@@ -137,21 +137,21 @@ export default {
})
})
}
}
},
},
// 选择省
selectProvince
(
val
)
{
selectProvince
(
val
)
{
this
.
provinceForm
.
cityName
=
''
this
.
provinceForm
.
cityName
=
''
this
.
provinceForm
.
townName
=
''
this
.
provinceForm
.
townName
=
''
this
.
cityList
=
val
.
districts
this
.
cityList
=
val
.
districts
// 选择省回调
this
.
$emit
(
'selectProvince'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'selectProvince'
,
val
.
name
,
val
.
adcode
)
},
},
// 选择市
selectCity
(
val
)
{
selectCity
(
val
)
{
this
.
provinceForm
.
townName
=
''
this
.
provinceForm
.
townName
=
''
this
.
townList
=
val
.
districts
this
.
townList
=
val
.
districts
// 选择市回调
this
.
$emit
(
'selectCity'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'selectCity'
,
val
.
name
,
val
.
adcode
)
},
},
// 选择区
selectTown
(
val
)
{
selectTown
(
val
)
{
// 选择区回调
this
.
$emit
(
'selectTown'
,
val
.
name
,
val
.
adcode
)
this
.
$emit
(
'selectTown'
,
val
.
name
,
val
.
adcode
)
}
}
}
}
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment