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

工具栏样式更改

上级 7e91c348
......@@ -56,53 +56,61 @@ ${css.getCssStyle()}
<#list view.getAllPSControls() as ctrl>
<#if ctrl.getControlType() == 'MOBMDCTRL' || ctrl.getControlType() == 'DATAVIEW' && ctrl.isNoSort() == false>
//排序样式
.${srffilepath2(view.getCodeName())}-toolbar{
z-index:10;
.code-box{
overflow-x: auto;
.ibz-item{
--inner-border-width:0;
min-width: 50%;
}
}
.view-tool {
display: flex;
padding: 0 @padding-sm;
&-sorts {
display: flex;
flex-grow: 1;
&-item {
display: flex;
padding-right: @margin-sm;
height: 24px;
font-size: @font-size-md;
align-items: center;
.text {
display: flex;
flex-grow: 1;
}
.sort-icon {
display: flex;
flex-direction: column;
width: 20px;
padding-left: @padding-base;
justify-content: center;
ion-icon {
font-size: @font-size-xs - 1;
}
.sort-select{
color: #3880ff;;
}
}
}
}
&-searchform {
display: flex;
width: 60px;
justify-content: flex-end;
align-items: center;
}
}
.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;
.ibz-item{
--inner-border-width:0;
min-width: 50%;
}
}
.view-tool {
display: flex;
padding: 0 0 0 @padding-sm ;
&-sorts {
display: flex;
flex-grow: 1;
&-item {
display: flex;
padding-right: @margin-sm;
height: 24px;
font-size: @font-size-md;
align-items: center;
.text {
display: flex;
flex-grow: 1;
font-size: 15px;
}
.sort-icon {
display: flex;
flex-direction: column;
width: 20px;
padding-left: @padding-base;
justify-content: center;
ion-icon {
font-size: @font-size-xs - 1;
}
.sort-select{
color: #3880ff;;
}
}
}
}
&-searchform {
display: flex;
width: 60px;
justify-content: flex-end;
align-items: center;
}
}
}
}
</#if>
</#list>
......
......@@ -19,23 +19,24 @@
</#list>
<#if state>
<#assign view_header_botton>
<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="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>
</span>
<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: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>
</span>
</div>
</#if>
</#list>
</div>
</#if>
</#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 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册