提交 2acbfd12 编写于 作者: KK's avatar KK

树选择ui&事件

上级 ac03bc80
......@@ -19,13 +19,22 @@
</template>
</ion-list>
<div class="tree-partition tree-partition-bigger" v-if="rootNodes.length > 0"></div>
<ion-list>
<ion-list v-if="viewType != 'DEMOBPICKUPTREEVIEW'">
<template v-for="item in valueNodes">
<ion-item v-if="!item.isNode" :key="item.id">
<ion-checkbox color="secondary" v-if="viewType == 'DEMOBMPICKUPTREEVIEW'" :checked="item.checked" :value="item.srfkey" @ionChange="checkboxChange" slot="end"></ion-checkbox>
<ion-label>{{item.text}}</ion-label>
</ion-item>
</template>
</ion-list>
<ion-radio-group v-if="viewType == 'DEMOBPICKUPTREEVIEW'" :value="selectedValue" >
<template v-for="item in valueNodes">
<ion-item :key="item.id" @click="onSimpleSelChange(item)">
<ion-label>{{item.text}}</ion-label>
<ion-radio slot="end" :checked="item.checked" :value="item.id"></ion-radio>
</ion-item>
</template>
</ion-radio-group>
</#if>
</div>
</template>
\ No newline at end of file
......@@ -8,6 +8,14 @@ import { Util } from '@ibiz-core/utils'
../@MACRO/CONTROL/CONTROL_HEADER-BASE.vue.ftl
</#ibizinclude>
/**
* 视图类型
*
* @type {string}
* @memberof Testtree
*/
@Prop() protected viewType!: string;
/**
* 树视图导航数组名称
*
......@@ -739,6 +747,34 @@ ${P.getCtrlCode(childCtrl, 'CONTROL.html').code}
}
this.$emit('nodedblclick', this.selectedNodes);
}
/**
* 节点点击行为
*
* @param {*} node
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public node_click(){
console.log(1);
}
/**
* 单选选择值
*
* @param {string}
* @memberof ${srfclassname('${ctrl.codeName}')}
*/
public selectedValue:string = "";
/**
* 单选点击行为
*
* @param {*} node
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public onSimpleSelChange(item:any){
}
<#ibizinclude>
../@MACRO/CONTROL/CONTROL_BOTTOM-BASE.vue.ftl
</#ibizinclude>
......
......@@ -8,6 +8,7 @@
</#if>
</#list>
</#if>
viewType="${view.getViewType()}"
</#assign>
<#ibizinclude>
../@MACRO/HTML/DEFAULT.html.ftl
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册