提交 3fca2fd5 编写于 作者: KK's avatar KK

ui样式调整

上级 f9487d1d
...@@ -10,19 +10,18 @@ ...@@ -10,19 +10,18 @@
<span class="tree-span" :key="index+'span'" v-if="index+1 < treeNav.length">></span> <span class="tree-span" :key="index+'span'" v-if="index+1 < treeNav.length">></span>
</template> </template>
</div> </div>
<div class="tree-partition"></div> <div class="tree-partition" v-if="valueNodes.length > 0" ></div>
<ion-list> <ion-list>
<template v-for="item in nodes"> <template v-for="item in rootNodes">
<ion-item v-if="item.isNode" :key="item.id" @click="click_node(item)"> <ion-item v-if="item.isNode" :key="item.id" @click="click_node(item)">
<ion-label>{{item.text}}</ion-label> <ion-label>{{item.text}}</ion-label>
<ion-icon class="tree-icon" slot="end" name="chevron-forward-outline"></ion-icon> <ion-icon class="tree-icon" slot="end" name="chevron-forward-outline"></ion-icon>
</ion-item> </ion-item>
</template> </template>
</ion-list> </ion-list>
<div class="tree-partition tree-partition-bigger" v-if="rootNodes.length > 0"></div>
<div class="tree-partition tree-partition-bigger"></div>
<ion-list> <ion-list>
<template v-for="item in nodes"> <template v-for="item in valueNodes">
<ion-item v-if="!item.isNode" :key="item.id"> <ion-item v-if="!item.isNode" :key="item.id">
<ion-label>{{item.text}}</ion-label> <ion-label>{{item.text}}</ion-label>
</ion-item> </ion-item>
......
...@@ -146,6 +146,40 @@ import { Util } from '@ibiz-core/utils' ...@@ -146,6 +146,40 @@ import { Util } from '@ibiz-core/utils'
this.load({data:item}); this.load({data:item});
} }
/**
* 节点数组
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public rootNodes :any= [];
/**
* 节点值数组
*
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public valueNodes :any= [];
/**
* 解析节点数据
*
* @param {*} nodes
* @memberof ${srfclassname('${ctrl.codeName}')}Base
*/
public parsNodes(nodes:any) {
let rootNodes :any= [];
let valueNodes :any= [];
nodes.forEach((item:any) => {
if(item.isNode){
rootNodes.push(item);
}else{
valueNodes.push(item);
}
});
this.rootNodes = rootNodes;
this.valueNodes = valueNodes;
}
/** /**
* 回显选中数据集合 * 回显选中数据集合
* *
...@@ -434,6 +468,7 @@ import { Util } from '@ibiz-core/utils' ...@@ -434,6 +468,7 @@ import { Util } from '@ibiz-core/utils'
} }
this.nodes = response.data; --> this.nodes = response.data; -->
this.nodes = [..._items]; this.nodes = [..._items];
this.parsNodes(this.nodes)
let isRoot = Object.is(node.level,0); let isRoot = Object.is(node.level,0);
let isSelectedAll = node.checked; let isSelectedAll = node.checked;
this.setDefaultSelection(_items, isRoot, isSelectedAll); this.setDefaultSelection(_items, isRoot, isSelectedAll);
......
...@@ -4,15 +4,18 @@ ...@@ -4,15 +4,18 @@
.app-mob-treeview { .app-mob-treeview {
.treeNav { .treeNav {
padding-left: 14px; padding-left: 14px;
color: #a5a2a2;
font-size: 14px;
margin-bottom: 10px;
.treeNav-active { .treeNav-active {
color: #705697; color: #705697;
} }
.tree-span { .tree-span {
padding: 0 3px; padding: 0 3px;
color: #ccc;
} }
} }
.tree-partition { .tree-partition {
margin-top: 10px;
height: 8px; height: 8px;
background-color: #ededed; background-color: #ededed;
} }
...@@ -24,8 +27,13 @@ ...@@ -24,8 +27,13 @@
height: 16px; height: 16px;
} }
ion-list { ion-list {
ion-item {
font-size: 15px;
font-family: "微软雅黑";
}
ion-item:last-child { ion-item:last-child {
--inner-border-width: 0; --inner-border-width: 0;
} }
} }
} }
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册