2.0.4 • Published 11 months ago
vue-cascader-zcy v2.0.4
vue-cascader-zcy
a vue component of cascade selecto for pc
pc端级联选择器(>=vue2.0)
使用方法
npm安装
npm install vue-cascader-zcy
import VueCascader from 'vue-cascader-zcy'
Vue.use(VueCascader);
Quickstart
<template>
<div class="select-item">
<input class="sct-ipt" @click="showCascader" v-model="sct_demo" readonly>
<sny-cascader
ref="cascader"
v-model="adrList"
label-name="name"
value-name="id"
other-value-name="cost"
child-name="childList"
:options="adrOptions"
@change="sctDone">
</sny-cascader>
</div>
</template>
<script>
export default {
data() {
return {
sct_demo: "",
options: "json对象",
};
},
components: {
VueCascader
},
methods: {
showCascader() {
this.$refs.cascader.showSctList();
},
sctDone(obj) {
const { value, label, otherValue } = obj;
}
}
};
</script>
属性
名称 | 类型 | 默认值 | 是否必填 | 说明 |
---|---|---|---|---|
options | Object | - | true | 级联选择数据对象 |
labelName | String | - | false | 文字字段名称 |
valueName | String | - | false | value字段名称 |
childName | String | - | false | 子节点字段名称 |
otherValueName | String | - | false | 需要其他值的属性名 |
方法
名称 | 说明 | 默认值 | ||
---|---|---|---|---|
show | 通过this.$refs.cascader.showSctList() 显示级联选择器 | |||
change | 通过@change 监听选择完毕后的回调方法 |
2.0.3
11 months ago
2.0.2
11 months ago
2.0.4
11 months ago
2.0.1
11 months ago
2.0.0
11 months ago
1.3.0
3 years ago
1.2.0
5 years ago
1.1.7
5 years ago
1.1.6
5 years ago
1.1.5
5 years ago
1.1.4
5 years ago
1.1.3
5 years ago
1.1.2
5 years ago
1.1.1
5 years ago
1.1.0
5 years ago
1.0.26
5 years ago
1.0.25
5 years ago
1.0.24
5 years ago
1.0.23
5 years ago
1.0.22
5 years ago
1.0.21
5 years ago
1.0.20
5 years ago
1.0.19
5 years ago
1.0.18
5 years ago
1.0.17
5 years ago
1.0.16
5 years ago
1.0.15
5 years ago
1.0.14
5 years ago
1.0.13
5 years ago
1.0.12
5 years ago
1.0.11
5 years ago
1.0.10
5 years ago
1.0.9
5 years ago
1.0.8
5 years ago
1.0.7
5 years ago
1.0.6
5 years ago
1.0.5
5 years ago
1.0.4
5 years ago
1.0.3
5 years ago
1.0.2
5 years ago
1.0.1
5 years ago
1.0.0
5 years ago