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

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

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