element-ui多重下拉列表的使用

template

        <div class="block">
            <span class="demonstration">默认 click 触发子菜单</span>
            <el-cascader
                v-model="value"
                :options="options"
                @change="handleChange"></el-cascader>
        </div>

data

            value:[],
            options:[
                {
                    value: 'zhinan',
                    label: '指南',
                    children:[
                        {
                            value: 'shejiyuanze',
                            label: '设计原则',
                            children:[
                                {
                                    value: 'yizhi',
                                    label: '一致'
                                },
                                {
                                    value: 'fankui',
                                    label: '反馈'
                                }
                            ]
                        }
                    ]
                }
            ]    

methods

        handleChange(value) {
            console.log(value);
        } 

 

posted @ 2019-06-01 16:01  古墩古墩  Views(2847)  Comments(0Edit  收藏  举报