提交 595ae686 编写于 作者: jlj05024111@163.com's avatar jlj05024111@163.com

feat: 更新sy-ui基础组件样式,更新编辑类视图样式,更新菜单样式

上级 d8d0158b
...@@ -50,11 +50,19 @@ export const AppUser = defineComponent({ ...@@ -50,11 +50,19 @@ export const AppUser = defineComponent({
]} ]}
> >
<span class={this.ns.b('avatar-wrapper')}> <span class={this.ns.b('avatar-wrapper')}>
<i-avatar <i-avatar size='small' src='./assets/img/avatar.png' />
size='small'
src='https://i.loli.net/2017/08/21/599a521472424.jpg'
/>
<span class={this.ns.be('avatar', 'name')}>{this.srfusername}</span> <span class={this.ns.be('avatar', 'name')}>{this.srfusername}</span>
<span
class={[
this.ns.be('avatar', 'arrow'),
this.ns.is(
'hidden',
ibiz.env.disableChangePwd && ibiz.env.disableLogout,
),
]}
>
<i-icon type='ios-arrow-down' />
</span>
</span> </span>
{ibiz.env.disableChangePwd ? null : ( {ibiz.env.disableChangePwd ? null : (
<i-dropdown-menu slot='list'> <i-dropdown-menu slot='list'>
......
...@@ -227,7 +227,7 @@ export const IBizInput = defineComponent({ ...@@ -227,7 +227,7 @@ export const IBizInput = defineComponent({
props: { props: {
...this.c.customProps, ...this.c.customProps,
value: this.currentVal, value: this.currentVal,
clearable: true, clearable: !this.disabled && !this.readonly && true,
placeholder: this.controller.placeHolder, placeholder: this.controller.placeHolder,
type: this.type, type: this.type,
rows: this.rows, rows: this.rows,
......
...@@ -31,8 +31,17 @@ export const ViewLayout = defineComponent({ ...@@ -31,8 +31,17 @@ export const ViewLayout = defineComponent({
const isShowHeader = computed(() => { const isShowHeader = computed(() => {
return props.modelData.source.showCaptionBar || !!props.modelData.toolbar; return props.modelData.source.showCaptionBar || !!props.modelData.toolbar;
}); });
// 是否是编辑视图
const isEditView = computed(() => {
return (
props.modelData?.source?.viewType === 'DEEDITVIEW' ||
props.modelData?.source?.viewType === 'DEEDITVIE2' ||
props.modelData?.source?.viewType === 'DEEDITVIEW3' ||
props.modelData?.source?.viewType === 'DEEDITVIEW4'
);
});
return { ns, isShowHeader }; return { ns, isShowHeader, isEditView };
}, },
render() { render() {
return !this.isComplete ? ( return !this.isComplete ? (
...@@ -67,9 +76,11 @@ export const ViewLayout = defineComponent({ ...@@ -67,9 +76,11 @@ export const ViewLayout = defineComponent({
{this.$scopedSlots.quickSearch && {this.$scopedSlots.quickSearch &&
this.$scopedSlots.quickSearch({})} this.$scopedSlots.quickSearch({})}
</div> </div>
{this.isEditView ? null : (
<div class={this.ns.e('toolbar')}> <div class={this.ns.e('toolbar')}>
{this.$scopedSlots.toolbar && this.$scopedSlots.toolbar({})} {this.$scopedSlots.toolbar && this.$scopedSlots.toolbar({})}
</div> </div>
)}
</div> </div>
</div> </div>
<div class={this.ns.b('header-exp')}></div> <div class={this.ns.b('header-exp')}></div>
...@@ -102,6 +113,11 @@ export const ViewLayout = defineComponent({ ...@@ -102,6 +113,11 @@ export const ViewLayout = defineComponent({
{this.$scopedSlots.footer && this.$scopedSlots.footer({})} {this.$scopedSlots.footer && this.$scopedSlots.footer({})}
</div> </div>
) : null} ) : null}
{this.isEditView ? (
<div class={[this.ns.e('toolbar'), this.ns.e('isedit')]}>
{this.$scopedSlots.toolbar && this.$scopedSlots.toolbar({})}
</div>
) : null}
</div> </div>
); );
}, },
......
...@@ -63,6 +63,12 @@ function renderMenuItem( ...@@ -63,6 +63,12 @@ function renderMenuItem(
if (!c.menuItemsState[menu.key].visible) { if (!c.menuItemsState[menu.key].visible) {
return; return;
} }
const target = c.model.items.find(item => {
return item.id === menu.key;
});
if (target?.itemType === 'SEPERATOR') {
return <div class={ns.e('menu-seperator')}></div>;
}
return !collapseChange ? ( return !collapseChange ? (
<i-menu-item class={ns.e('item')} name={menu.key}> <i-menu-item class={ns.e('item')} name={menu.key}>
<app-icon class={ns.e('icon')} icon={menu.image}></app-icon> <app-icon class={ns.e('icon')} icon={menu.image}></app-icon>
......
...@@ -39,6 +39,9 @@ export const FormButton = defineComponent({ ...@@ -39,6 +39,9 @@ export const FormButton = defineComponent({
loading={this.isLoading} loading={this.isLoading}
class={this.ns.b()} class={this.ns.b()}
> >
{this.modelData.sysImage && this.modelData.sysImage.cssClass && (
<i class={[this.ns.e('icon'), this.modelData.sysImage.cssClass]}></i>
)}
{this.modelData.source.caption} {this.modelData.source.caption}
</i-button> </i-button>
); );
......
...@@ -10,5 +10,6 @@ ...@@ -10,5 +10,6 @@
@include b(form-item-container-input-tip-popper) { @include b(form-item-container-input-tip-popper) {
.ivu-tooltip-inner { .ivu-tooltip-inner {
white-space: normal; white-space: normal;
background-color: #4d4d4d;
} }
} }
...@@ -127,6 +127,9 @@ export function useITableColumns(c: GridController) { ...@@ -127,6 +127,9 @@ export function useITableColumns(c: GridController) {
} else if (frozenLastColumn && index >= allNum - frozenLastColumn) { } else if (frozenLastColumn && index >= allNum - frozenLastColumn) {
column.fixed = 'right'; column.fixed = 'right';
} }
if (ibiz.env.enableGridRowBreak) {
column.ellipsis = false;
}
}); });
return copy; return copy;
}); });
......
...@@ -71,14 +71,22 @@ export const GridFieldColumn = defineComponent({ ...@@ -71,14 +71,22 @@ export const GridFieldColumn = defineComponent({
> >
{this.codeList ? ( {this.codeList ? (
<code-list <code-list
class={this.ns.e('text')} class={[
this.ns.e('text'),
this.ns.is('enablebreak', ibiz.env.enableGridRowBreak),
]}
codeListItems={c.codeListItems} codeListItems={c.codeListItems}
codeList={this.codeList} codeList={this.codeList}
value={fieldValue} value={fieldValue}
textSeparator={c.model.source?.textSeparator} textSeparator={c.model.source?.textSeparator}
></code-list> ></code-list>
) : ( ) : (
<span class={this.ns.e('text')}> <span
class={[
this.ns.e('text'),
this.ns.is('enablebreak', ibiz.env.enableGridRowBreak),
]}
>
{fieldValue} {fieldValue}
{fieldValue != null && c.model.unitName} {fieldValue != null && c.model.unitName}
</span> </span>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册