gaoshp
2024-06-04 261fe04eba2c92be59efc45b1156d940e6e87d2f
上级节点可选中
已修改1个文件
11 ■■■■ 文件已修改
src/views/mdc/MYTree.vue 11 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/mdc/MYTree.vue
@@ -1,7 +1,7 @@
<!--
 * @Date: 2024-04-18 19:53:35
 * @LastEditors: Sneed
 * @LastEditTime: 2024-05-26 15:49:11
 * @LastEditTime: 2024-06-04 21:28:29
 * @FilePath: /belleson-frontend/Users/mache/Documents/demo/cps-web/src/views/mdc/MYTree.vue
-->
<template>
@@ -37,7 +37,7 @@
            defalutProps: {
                label: 'title',
                children: 'children',
                disabled: 'disabled',
                disabled: this.showCheckbox ? '' : 'disabled',
                class: (data, node) => {
                    return this.value.includes(data.id) ? 'active' : ''
                },
@@ -61,13 +61,13 @@
        this.getList()
    },
    methods: {
        renderContent(h, { data,node }) {
        renderContent(h, { data, node }) {
            let img = data.groupTag == 'fms_beltline'
            return h('a', {
                class: {
                    disabled: this.props.disabled ? this.props.disabled(data,node) : data.disabled
                    disabled: this.props.disabled ? this.props.disabled(data, node) : data.disabled
                },
                disabled: this.props.disabled ? this.props.disabled(data,node) : data.disabled
                disabled: this.props.disabled ? this.props.disabled(data, node) : data.disabled
            },
                img ? h('img', {
                    src: pmsPng
@@ -142,6 +142,7 @@
.active .el-tree-node__content {
    background: var(--el-color-primary) !important;
}
a.disabled {
    color: #ccc;
}