vue省市区三级联动vue-area-linkage
1、安装vue-area-linkage插件:npm install --save vue-area-linkage --2、main.js里面注入import VueAreaLinkage from 'vue-area-linkage'import 'vue-area-linkage/dist/index.css'Vue.use(VueAreaLinkage) 3、组件里:<are
·
1、安装vue-area-linkage插件:npm install --save vue-area-linkage --
2、main.js里面注入
import
VueAreaLinkage
from
'vue-area-linkage'
import
'vue-area-linkage/dist/index.css'
Vue.
use(
VueAreaLinkage)
3、组件里:
<
area-select
type=
'all'
:placeholders="
placeholders"
:level='
2'
v-model="
send_search_form.
selected"
:data="
pcaa"
>
</
area-select
>
// 三级联动
import {
AreaSelect }
from
"vue-area-linkage";
import
AreaData
from
"area-data";
import {
pca,
pcaa }
from
"area-data";
export
default {
component: {
AreaSelect:
AreaSelect
},
data() {
return {
pca:
pca,
pcaa:
pcaa,
placeholders: [
" ",
" ",
" "],
send_search_form: {
orderCode:
"",
itemName:
"",
orderTime: [],
consigneeName:
"",
state:
"",
selected: []
},
},
}
更多推荐
已为社区贡献3条内容
所有评论(0)