GithubHelp home page GithubHelp logo

Comments (38)

jinjinwa avatar jinjinwa commented on April 27, 2024 12

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

from element.

qinshenxue avatar qinshenxue commented on April 27, 2024 9

可以考虑用 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>

from element.

furybean avatar furybean commented on April 27, 2024 3

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

from element.

CrazyWisdom avatar CrazyWisdom commented on April 27, 2024 1

tree select +3

from element.

ttop5 avatar ttop5 commented on April 27, 2024 1

tree select +4

from element.

lampo1024 avatar lampo1024 commented on April 27, 2024 1

tree select +5

from element.

linda8167 avatar linda8167 commented on April 27, 2024 1

tree select +6

from element.

zifeixu85 avatar zifeixu85 commented on April 27, 2024

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

from element.

wilsonIs avatar wilsonIs commented on April 27, 2024

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

from element.

dandananddada avatar dandananddada commented on April 27, 2024

解决了么?

from element.

blooddrunk avatar blooddrunk commented on April 27, 2024

tree select +1

from element.

mrdream24 avatar mrdream24 commented on April 27, 2024

tree select +2

from element.

brightWeen avatar brightWeen commented on April 27, 2024

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

from element.

fengyun2 avatar fengyun2 commented on April 27, 2024

tree select +8

from element.

axhello avatar axhello commented on April 27, 2024

tree select +9

from element.

 avatar commented on April 27, 2024

tree select +10 & tree table +1

from element.

dieslrae avatar dieslrae commented on April 27, 2024

2019了还是不考虑做个treeSelect么

from element.

shidianxia avatar shidianxia commented on April 27, 2024

建议加入规划

from element.

libo9527 avatar libo9527 commented on April 27, 2024

tree select +11

from element.

ayiaq1 avatar ayiaq1 commented on April 27, 2024

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

from element.

Mutekinodango avatar Mutekinodango commented on April 27, 2024

tree select +12

from element.

dengpan0513 avatar dengpan0513 commented on April 27, 2024

tree select +13

from element.

MarshallLu avatar MarshallLu commented on April 27, 2024

tree select +14

from element.

anna647 avatar anna647 commented on April 27, 2024

tree select +15

from element.

cdoer avatar cdoer commented on April 27, 2024

tree select +16

from element.

wangdaodao avatar wangdaodao commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

from element.

wangdaodao avatar wangdaodao commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

开源一个tree-select就行了 我的哥 我们用elementui 全部替换成你们的代价也大

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

from element.

wangdaodao avatar wangdaodao commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

开源一个tree-select就行了 我的哥 我们用elementui 全部替换成你们的代价也大

这就是element-ui,只不过当时饿了么团队不维护,我自己fork一份后开始维护的,用法完全一样,标签和属性都没变。我们公司内部系统好多也是用的element-ui,所以基本上没啥迁移成本。如果非要说有迁移成本,那就是界面样式可能不符合你们的设计规范吧。

from element.

wangdaodao avatar wangdaodao commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

你们的 TreeSelect 有点问题,自定义props label属性为name 开启filterable会报错,应该是检索还是使用label这个属性 而不是props设置的name

from element.

wangdaodao avatar wangdaodao commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

你们的 TreeSelect 有点问题,自定义props label属性为name 开启filterable会报错,应该是检索还是使用label这个属性 而不是props设置的name

感谢提醒,已经修复,待测试完毕后发布。

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

你们的 TreeSelect 有点问题,自定义props label属性为name 开启filterable会报错,应该是检索还是使用label这个属性 而不是props设置的name

感谢提醒,已经修复,待测试完毕后发布。

开源TreeSelect怎么样 利用开源社区帮你们公司打磨产品 手动狗头

from element.

wangdaodao avatar wangdaodao commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

你们的 TreeSelect 有点问题,自定义props label属性为name 开启filterable会报错,应该是检索还是使用label这个属性 而不是props设置的name

感谢提醒,已经修复,待测试完毕后发布。

开源TreeSelect怎么样 利用开源社区帮你们公司打磨产品 手动狗头

其实之前代码是开源的,后来因为各种原因只能删除代码。后面试试看能不能把源码提交到element-ui上,让社区维护吧。如果单独把下拉树拿出来,有点费劲,因为这个组件就是 el-input + el-tag + el-tooltip + el-popover + el-tree + el-scrollbar 拼凑出来的,还是依赖element-ui。

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

你们的 TreeSelect 有点问题,自定义props label属性为name 开启filterable会报错,应该是检索还是使用label这个属性 而不是props设置的name

感谢提醒,已经修复,待测试完毕后发布。

开源TreeSelect怎么样 利用开源社区帮你们公司打磨产品 手动狗头

其实之前代码是开源的,后来因为各种原因只能删除代码。后面试试看能不能把源码提交到element-ui上,让社区维护吧。如果单独把下拉树拿出来,有点费劲,因为这个组件就是 el-input + el-tag + el-tooltip + el-popover + el-tree + el-scrollbar 拼凑出来的,还是依赖element-ui。

兄弟 TreeSelect的源码能不能发我下,我想改改,支持的事件太少 我想把tree的一些事件弄出来 我将在源码注明是你的代码

from element.

cdoer avatar cdoer commented on April 27, 2024

可以试试看,https://wangdaodao.gitee.io/element-gui/#/component/tree-select

考虑开源没有

公司内部使用的,所以代码没开源,但是外部也可以用。

或者单独打包发布tree-select

还有,就是不要指望开源的产品能一直维护,最好自己拿源码,自己改改,把被动变主动。

你们的 TreeSelect 有点问题,自定义props label属性为name 开启filterable会报错,应该是检索还是使用label这个属性 而不是props设置的name

感谢提醒,已经修复,待测试完毕后发布。

开源TreeSelect怎么样 利用开源社区帮你们公司打磨产品 手动狗头

其实之前代码是开源的,后来因为各种原因只能删除代码。后面试试看能不能把源码提交到element-ui上,让社区维护吧。如果单独把下拉树拿出来,有点费劲,因为这个组件就是 el-input + el-tag + el-tooltip + el-popover + el-tree + el-scrollbar 拼凑出来的,还是依赖element-ui。
我的邮箱 [email protected]

from element.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.