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

工具栏样式更改

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