mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-11-29 22:12:11 +08:00
feat(element-plus-adapter, from, tdesign-vue-adapter): button兼容type=default和type为空的情况
This commit is contained in:
parent
564a7f4271
commit
d0179028fb
@ -111,7 +111,12 @@ const adapter: DesignPluginOptions = {
|
||||
|
||||
button: {
|
||||
component: ElButton as any,
|
||||
props: (props: ButtonProps) => props,
|
||||
props: (props: ButtonProps) => {
|
||||
return {
|
||||
...props,
|
||||
type: props.type === 'default' ? '' : props.type,
|
||||
};
|
||||
},
|
||||
},
|
||||
|
||||
card: {
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</TMagicCol>
|
||||
<TMagicCol :span="12">
|
||||
<slot name="footer">
|
||||
<TMagicButton type="default" @click="cancel" size="small">取 消</TMagicButton>
|
||||
<TMagicButton @click="cancel" size="small">取 消</TMagicButton>
|
||||
<TMagicButton v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
||||
>上一步</TMagicButton
|
||||
>
|
||||
|
||||
@ -42,7 +42,7 @@
|
||||
</TMagicCol>
|
||||
<TMagicCol :span="12">
|
||||
<slot name="footer">
|
||||
<TMagicButton type="default" @click="handleClose">关闭</TMagicButton>
|
||||
<TMagicButton @click="handleClose">关闭</TMagicButton>
|
||||
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
||||
confirmText
|
||||
}}</TMagicButton>
|
||||
|
||||
@ -180,7 +180,7 @@ const adapter: any = {
|
||||
button: {
|
||||
component: TButton,
|
||||
props: (props: ButtonProps) => ({
|
||||
theme: props.type,
|
||||
theme: props.type ? props.type : 'default',
|
||||
size: props.size === 'default' ? 'medium' : props.size,
|
||||
icon: props.icon ? () => h(Icon, null, { default: () => h(props.icon) }) : undefined,
|
||||
variant: props.link || props.text ? 'text' : props.variant || 'base',
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user