提交 26d1071c 编写于 作者: JunZai's avatar JunZai

update

上级 143ab244
......@@ -5,7 +5,18 @@
../../@MACRO/LANG_FUN.ftl
</#ibizinclude>
<template>
<el-table ref="${ctrl.name}" :data="items" row-key="id" border height="100%" lazy :row-class-name="setRowClass" :load="loadTreeNode" :tree-props="{ children: 'children', hasChildren: 'leaf' }">
<el-table ref="${ctrl.name}"
:data="items"
row-key="id"
border
lazy
height="100%"
:row-class-name="setRowClass"
:load="loadTreeNode"
:tree-props="{ children: 'children', hasChildren: 'leaf' }"
:select-on-indeterminate="isSingleSelect"
@current-change="select"
>
<#if ctrl.getPSDETreeColumns()??>
<#list ctrl.getPSDETreeColumns() as column>
<el-table-column show-overflow-tooltip prop="${column.getName()?lower_case}" label="${column.getCaption()}"<#if column.getWidthUnit()!='STAR'> :width="${column.getWidth()?c}" <#else> :min-width="${column.getWidth()?c}" </#if> :align="'${column.getAlign()?lower_case}'">
......@@ -42,6 +53,14 @@
*/
@Prop() public loadAction!: string;
/**
* 是否单选
*
* @type {boolean}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
@Prop({ default: true }) public isSingleSelect!: boolean;
/**
* 部件样式名
*
......@@ -289,6 +308,20 @@
}
}
/**
* 选中变化
*
* @returns
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public select($event: any) {
if (!$event) {
return;
}
this.selections = [JSON.parse(JSON.stringify($event))];
this.$emit('selectionchange', this.selections);
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册