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
09663c8320
commit
2a29971318
@ -111,7 +111,12 @@ const adapter: DesignPluginOptions = {
|
|||||||
|
|
||||||
button: {
|
button: {
|
||||||
component: ElButton as any,
|
component: ElButton as any,
|
||||||
props: (props: ButtonProps) => props,
|
props: (props: ButtonProps) => {
|
||||||
|
return {
|
||||||
|
...props,
|
||||||
|
type: props.type === 'default' ? '' : props.type,
|
||||||
|
};
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
card: {
|
card: {
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</TMagicCol>
|
</TMagicCol>
|
||||||
<TMagicCol :span="12">
|
<TMagicCol :span="12">
|
||||||
<slot name="footer">
|
<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 v-if="hasStep && stepActive > 1" type="info" size="small" @click="preStep"
|
||||||
>上一步</TMagicButton
|
>上一步</TMagicButton
|
||||||
>
|
>
|
||||||
|
|||||||
@ -42,7 +42,7 @@
|
|||||||
</TMagicCol>
|
</TMagicCol>
|
||||||
<TMagicCol :span="12">
|
<TMagicCol :span="12">
|
||||||
<slot name="footer">
|
<slot name="footer">
|
||||||
<TMagicButton type="default" @click="handleClose">关闭</TMagicButton>
|
<TMagicButton @click="handleClose">关闭</TMagicButton>
|
||||||
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
<TMagicButton type="primary" :disabled="disabled" :loading="saveFetch" @click="submitHandler">{{
|
||||||
confirmText
|
confirmText
|
||||||
}}</TMagicButton>
|
}}</TMagicButton>
|
||||||
|
|||||||
@ -180,7 +180,7 @@ const adapter: any = {
|
|||||||
button: {
|
button: {
|
||||||
component: TButton,
|
component: TButton,
|
||||||
props: (props: ButtonProps) => ({
|
props: (props: ButtonProps) => ({
|
||||||
theme: props.type,
|
theme: props.type ? props.type : 'default',
|
||||||
size: props.size === 'default' ? 'medium' : props.size,
|
size: props.size === 'default' ? 'medium' : props.size,
|
||||||
icon: props.icon ? () => h(Icon, null, { default: () => h(props.icon) }) : undefined,
|
icon: props.icon ? () => h(Icon, null, { default: () => h(props.icon) }) : undefined,
|
||||||
variant: props.link || props.text ? 'text' : props.variant || 'base',
|
variant: props.link || props.text ? 'text' : props.variant || 'base',
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user