element icon indicating copy to clipboard operation
element copied to clipboard

有计划做走马灯和树选择器么

Open yuu2lee4 opened this issue 10 years ago • 38 comments

有计划做走马灯和树选择器么

yuu2lee4 avatar Sep 18 '16 02:09 yuu2lee4

树形控件已经有了,走马灯已经在计划中。

zifeixu85 avatar Oct 20 '16 10:10 zifeixu85

@zifeixu85 这个同学应该指的是 Select 打开的内容是一棵树,可以通过树来勾选数据。

furybean avatar Oct 20 '16 10:10 furybean

同感,项目中有此需求,选中的可以在select中显示el-tags

wilsonIs avatar Feb 18 '17 12:02 wilsonIs

关于tree select 官方有计划做么?

jinjinwa avatar Mar 13 '17 02:03 jinjinwa

解决了么?

dandananddada avatar Apr 28 '17 07:04 dandananddada

tree select +1

blooddrunk avatar Jun 13 '17 07:06 blooddrunk

tree select +2

mrdream24 avatar Aug 28 '17 09:08 mrdream24

tree select +3

CrazyWisdom avatar Sep 06 '17 09:09 CrazyWisdom

tree select +4

ttop5 avatar Sep 06 '17 09:09 ttop5

tree select +5

lampo1024 avatar Sep 06 '17 09:09 lampo1024

tree select +6

linda8167 avatar Sep 25 '17 14:09 linda8167

tree select +7 交互可以参考 https://ant.design/components/tree-select/

brightWeen avatar Jan 17 '18 06:01 brightWeen

tree select +8

fengyun2 avatar Feb 03 '18 05:02 fengyun2

tree select +9

axhello avatar Feb 05 '18 08:02 axhello

可以考虑用 el-popover + el-input 来实现 tree-select

https://jsfiddle.net/jkyzb05a/1/

<template>
    <div class="el-tree-select">
        <el-popover
                ref="popover"
                placement="bottom"
                popper-class="el-tree-select-popover"
                trigger="click" :visible-arrow="false" :width="width">
            <el-tree :data="data"
                     :props="defaultProps"
                     :expand-on-click-node=false
                     @node-click="handleNodeClick"></el-tree>
            <el-input slot="reference" ref="ipt" v-model="selectedNodeLabel"></el-input>
        </el-popover>
    </div>
</template>

<script>
    export default {
        name: "el-tree-select",
        data() {
            return {
                selectedNodeLabel: null,
                width: 0,
                data: [{
                    label: '一级 1',
                    children: [{
                        label: '二级 1-1',
                        children: [{
                            label: '三级 1-1-1'
                        }]
                    }]
                }, {
                    label: '一级 2',
                    children: [{
                        label: '二级 2-1',
                        children: [{
                            label: '三级 2-1-1'
                        }]
                    }, {
                        label: '二级 2-2',
                        children: [{
                            label: '三级 2-2-1'
                        }]
                    }]
                }, {
                    label: '一级 3',
                    children: [{
                        label: '二级 3-1',
                        children: [{
                            label: '三级 3-1-1'
                        }]
                    }, {
                        label: '二级 3-2',
                        children: [{
                            label: '三级 3-2-1'
                        }]
                    }]
                }],
                defaultProps: {
                    children: 'children',
                    label: 'label'
                }

            }
        },
        mounted() {
            this.width = this.$refs.ipt.$el.offsetWidth
        },
        methods: {
            handleNodeClick(data) {
                this.selectedNodeLabel = data.label
                this.$refs.popover.handleBlur()
            }
        }
    }
</script>

<style lang="less">
    .el-tree-select-popover.el-popper[x-placement^=bottom] {
        margin-top: 0;
    }

    .el-tree-select-popover.el-popper[x-placement^=top] {
        margin-bottom: 0;
    }
</style>

qinshenxue avatar Sep 04 '18 08:09 qinshenxue

tree select +10 & tree table +1

ghost avatar Dec 28 '18 09:12 ghost

2019了还是不考虑做个treeSelect么

dieslrae avatar Jan 09 '19 14:01 dieslrae

建议加入规划

shidianxia avatar Feb 19 '19 08:02 shidianxia

tree select +11

libo9527 avatar Apr 27 '19 04:04 libo9527

https://github.com/ayiaq1/el-tree-select

ayiaq1 avatar Apr 30 '19 02:04 ayiaq1