提交 68031f88 编写于 作者: zhujiamin's avatar zhujiamin

工具栏样式更改

上级 7e91c348
......@@ -56,7 +56,13 @@ ${css.getCssStyle()}
<#list view.getAllPSControls() as ctrl>
<#if ctrl.getControlType() == 'MOBMDCTRL' || ctrl.getControlType() == 'DATAVIEW' && ctrl.isNoSort() == false>
//排序样式
.${srffilepath2(view.getCodeName())}-toolbar{
.mdview-tools{
display: flex;
justify-content: flex-start;
align-items: center;
.${srffilepath2(view.getCodeName())}-toolbar{
width: 22%;
--padding-end: 0;
z-index:10;
.code-box{
overflow-x: auto;
......@@ -67,7 +73,7 @@ ${css.getCssStyle()}
}
.view-tool {
display: flex;
padding: 0 @padding-sm;
padding: 0 0 0 @padding-sm ;
&-sorts {
display: flex;
flex-grow: 1;
......@@ -80,6 +86,7 @@ ${css.getCssStyle()}
.text {
display: flex;
flex-grow: 1;
font-size: 15px;
}
.sort-icon {
display: flex;
......@@ -103,6 +110,7 @@ ${css.getCssStyle()}
align-items: center;
}
}
}
}
</#if>
</#list>
......
......@@ -19,13 +19,14 @@
</#list>
<#if state>
<#assign view_header_botton>
<ion-toolbar class="${srffilepath2(view.getCodeName())}-toolbar default-sort">
<div class="mdview-tools">
<ion-toolbar class="${srffilepath2(view.getCodeName())}-toolbar default-sort">
<div class="view-tool">
<div class="view-tool-sorts">
<#list mdctrl.getPSListItems() as item>
<#if item.isEnableSort() && item.getItemType() == 'ACTIONITEM'>
<div class="view-tool-sorts-item">
<span class="text" @click="onSort('<#if item.getName()??>${item.getName()}</#if>')"><#if item.getCaption()??>${item.getCaption()}</#if></span>
<span :class="{text:true,active:hasColor}" @click="onSort('<#if item.getName()??>${item.getName()}</#if>')"><#if item.getCaption()??>${item.getCaption()}</#if></span>
<span class="sort-icon" @click="onSort('<#if item.getName()??>${item.getName()}</#if>')">
<ion-icon :class="{'ios' : true ,'hydrated': true ,'sort-select': sort.asc == '<#if item.getName()??>${item.getName()}</#if>'}" name="chevron-up-outline" ></ion-icon>
<ion-icon :class="{'ios' : true ,'hydrated': true ,'sort-select': sort.desc == '<#if item.getName()??>${item.getName()}</#if>'}" name="chevron-down-outline" ></ion-icon>
......@@ -35,7 +36,7 @@
</#list>
</div>
</div>
</ion-toolbar>
</ion-toolbar>
<div style="display:flex;overflow: auto;">
<#list mdctrl.getPSListItems() as item>
<#if item.isEnableSort() && item.getPSCodeList?? && item.getPSCodeList()??>
......@@ -46,6 +47,7 @@
</#if>
</#list>
</div>
</div>
</#assign>
</#if>
</#if>
......
......@@ -132,6 +132,13 @@
*/
public sort: any = { asc: "", desc: "" };
/**
* 点击优先级加主题色
*
* @memberof ${srfclassname('${view.name}')}Base
*/
public hasColor:boolean = false;
/**
* 排序
*
......@@ -143,6 +150,7 @@
this.sort.desc = "";
this.sortValue = {};
this.onViewLoad();
this.hasColor = false;
return
}
if (this.sort.asc == field) {
......@@ -150,11 +158,13 @@
this.sort.desc = field;
this.sortValue = { sort: field + ",desc" };
this.onViewLoad();
this.hasColor = true;
} else {
this.sort.asc = field;
this.sort.desc = "";
this.sortValue = { sort: field + ",asc" };
this.onViewLoad();
this.hasColor = true;
}
}
</#if>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册