Skip to content

CascaderPanel 级联面板

用于多层级选择。

基本用法

级联面板,比较级联选择器更加直观。

控制台
[
  "community",
  "administration",
  "community_manager"
]
vue
<template>
	<gov-cascader-panel v-model="values" :options="options" style="height: 240px" />
	<div> {{ values }}</div>
</template>

<script setup>
import { ref } from "vue";
import options from "./data.js";
const values = ref(["zujian", "form", "input-number"]);
</script>

Attributes

属性名类型默认值描述
optionsArray[]级联面板的选项数组,每个选项可以包含 value, label, children, disabled 等属性。需注意 value 唯一。
modelValueArray[]绑定的值,选中节点 value 的集合,用于控制级联面板选中的项,需注意顺序对弈数据层级。

Events

事件名参数描述
change(Values, Objects)当级联面板的选中项发生变化时触发,Values 参数返回选中的 value 列表, Objects 返回选中节点的数据。

Released under the MIT License.