提交 bc61927f 编写于 作者: Cano1997's avatar Cano1997

update: 工具栏项支持样式表

上级 3f572fbc
...@@ -57,6 +57,10 @@ export const ViewToolbar = defineComponent({ ...@@ -57,6 +57,10 @@ export const ViewToolbar = defineComponent({
return props.viewMode === 'EMBED' ? 'small' : 'default'; return props.viewMode === 'EMBED' ? 'small' : 'default';
}); });
const sysCssName = computed(() => {
return props.modelData.source.getPSSysCss()?.cssName;
});
// 点击事件 // 点击事件
const _handleClick = async (item: IPSDEToolbarItem, _event: MouseEvent) => { const _handleClick = async (item: IPSDEToolbarItem, _event: MouseEvent) => {
props.toolbarState.setLoading(item.id); props.toolbarState.setLoading(item.id);
...@@ -78,7 +82,7 @@ export const ViewToolbar = defineComponent({ ...@@ -78,7 +82,7 @@ export const ViewToolbar = defineComponent({
}, 30); }, 30);
}; };
return { ns, doingToolbarItem, handleClick, btnSize }; return { ns, doingToolbarItem, sysCssName, handleClick, btnSize };
}, },
render() { render() {
return ( return (
...@@ -116,6 +120,7 @@ export const ViewToolbar = defineComponent({ ...@@ -116,6 +120,7 @@ export const ViewToolbar = defineComponent({
return; return;
} }
} }
const sysCssName = item.getPSSysCss()?.cssName;
return ( return (
<div <div
key={item.id} key={item.id}
...@@ -124,6 +129,7 @@ export const ViewToolbar = defineComponent({ ...@@ -124,6 +129,7 @@ export const ViewToolbar = defineComponent({
this.ns.e('item-deuiaction'), this.ns.e('item-deuiaction'),
this.ns.is('loading', this.toolbarState[item.id].loading), this.ns.is('loading', this.toolbarState[item.id].loading),
this.ns.is('caption', !!(item.showCaption && item.caption)), this.ns.is('caption', !!(item.showCaption && item.caption)),
sysCssName,
]} ]}
> >
<i-button <i-button
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册