mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-04-06 03:57:56 +08:00
feat(design): 添加class
This commit is contained in:
parent
7c823022ae
commit
ffb84cffca
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @click="clickHandler">
|
<component class="tmagic-design-button" :is="uiComponent.component" v-bind="uiProps" @click="clickHandler">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
@ -11,7 +11,7 @@ import { getConfig } from './config';
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
type?: string;
|
type?: string;
|
||||||
size?: string;
|
size?: 'large' | 'default' | 'small';
|
||||||
text?: boolean;
|
text?: boolean;
|
||||||
icon?: any;
|
icon?: any;
|
||||||
}>();
|
}>();
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-card" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<template #header>
|
<template #header>
|
||||||
<slot name="header"></slot>
|
<slot name="header" class="header"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<slot></slot>
|
<template #default>
|
||||||
|
<slot name="default"></slot>
|
||||||
|
</template>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
ref="cascader"
|
ref="cascader"
|
||||||
|
class="tmagic-design-cascader"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
@update:modelValue="updateModelValue"
|
@update:modelValue="updateModelValue"
|
||||||
@ -21,7 +22,7 @@ const props = defineProps<{
|
|||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
filterable?: boolean;
|
filterable?: boolean;
|
||||||
options?: CascaderOption[];
|
options?: CascaderOption[];
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
props: {
|
props: {
|
||||||
expandTrigger?: 'click' | 'hover';
|
expandTrigger?: 'click' | 'hover';
|
||||||
multiple?: boolean;
|
multiple?: boolean;
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @update:modelValue="updateModelValue" @change="changeHandler">
|
<component
|
||||||
|
class="tmagic-design-checkbox"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
@change="changeHandler"
|
||||||
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</template>
|
</template>
|
||||||
@ -18,7 +24,7 @@ const props = withDefaults(
|
|||||||
trueLabel?: string | number | boolean;
|
trueLabel?: string | number | boolean;
|
||||||
falseLabel?: string | number | boolean;
|
falseLabel?: string | number | boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
trueLabel: undefined,
|
trueLabel: undefined,
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @change="changeHandler" @update:modelValue="updateModelValue">
|
<component
|
||||||
|
class="tmagic-design-checkbox-group"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@change="changeHandler"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
@ -13,7 +19,7 @@ const props = defineProps<{
|
|||||||
modelValue?: any[];
|
modelValue?: any[];
|
||||||
label?: string;
|
label?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').checkboxGroup;
|
const uiComponent = getConfig('components').checkboxGroup;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-col" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @update:modelValue="updateModelValue" @change="changeHandler">
|
<component
|
||||||
|
class="tmagic-design-collapse"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
@change="changeHandler"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,9 +1,18 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @update:modelValue="updateModelValue" @change="changeHandler">
|
<component
|
||||||
|
class="tmagic-design-collapse-item"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
@change="changeHandler"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
<template #title>
|
<template #title>
|
||||||
<slot name="title"></slot>
|
<slot name="title"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
<template #header>
|
||||||
|
<slot name="title"></slot>
|
||||||
|
</template>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @change="changeHandler" @update:modelValue="updateModelValue">
|
<component
|
||||||
|
class="tmagic-design-color-picker"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@change="changeHandler"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -13,7 +19,7 @@ const props = withDefaults(
|
|||||||
modelValue?: string;
|
modelValue?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
showAlpha?: boolean;
|
showAlpha?: boolean;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
showAlpha: false,
|
showAlpha: false,
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @change="changeHandler" @update:modelValue="updateModelValue">
|
<component
|
||||||
|
class="tmagic-design-date-picker"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@change="changeHandler"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -23,7 +29,7 @@ const props = withDefaults(
|
|||||||
/** 在范围选择器里取消两个日期面板之间的联动 */
|
/** 在范围选择器里取消两个日期面板之间的联动 */
|
||||||
unlinkPanels?: boolean;
|
unlinkPanels?: boolean;
|
||||||
defaultTime?: any;
|
defaultTime?: any;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>(),
|
}>(),
|
||||||
{
|
{
|
||||||
type: 'date',
|
type: 'date',
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @close="closeHandler" @update:modelValue="updateModelValue">
|
<component
|
||||||
|
class="tmagic-design-dialog"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@close="closeHandler"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -21,7 +27,6 @@ const props = defineProps<{
|
|||||||
width?: string | number;
|
width?: string | number;
|
||||||
fullscreen?: boolean;
|
fullscreen?: boolean;
|
||||||
closeOnClickModal?: boolean;
|
closeOnClickModal?: boolean;
|
||||||
labelPosition?: string;
|
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').dialog;
|
const uiComponent = getConfig('components').dialog;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-divider" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @command="commandHandler">
|
<component class="tmagic-design-dropdown" :is="uiComponent.component" v-bind="uiProps" @command="commandHandler">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
<template #dropdown>
|
<template #dropdown>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-dropdown-item" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-dropdown-menu" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component ref="form" :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-form" ref="form" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-form-item" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<template #label>
|
<template #label>
|
||||||
<slot name="label"></slot>
|
<slot name="label"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component">
|
<component class="tmagic-design-icon" :is="uiComponent.component">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-input"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
@change="changeHandler"
|
@change="changeHandler"
|
||||||
@ -21,12 +22,12 @@ import { computed } from 'vue';
|
|||||||
import { getConfig } from './config';
|
import { getConfig } from './config';
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue?: string | number | boolean;
|
modelValue?: string | number;
|
||||||
clearable?: boolean;
|
clearable?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
type?: string;
|
type?: string;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').input;
|
const uiComponent = getConfig('components').input;
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-input-number"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
@change="changeHandler"
|
@change="changeHandler"
|
||||||
@ -22,7 +23,7 @@ const props = defineProps<{
|
|||||||
step?: number;
|
step?: number;
|
||||||
min?: number;
|
min?: number;
|
||||||
max?: number;
|
max?: number;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').inputNumber;
|
const uiComponent = getConfig('components').inputNumber;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-option" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component ref="optionGroup" :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-option-group" ref="optionGroup" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-pagination"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
@size-change="handleSizeChange"
|
@size-change="handleSizeChange"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-popover" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
|
|
||||||
<template #reference>
|
<template #reference>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-radio" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @change="changeHandler" @update:modelValue="updateModelValue">
|
<component
|
||||||
|
class="tmagic-design-radio-group"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@change="changeHandler"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
@ -12,7 +18,7 @@ import { getConfig } from './config';
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue?: string | number | boolean;
|
modelValue?: string | number | boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').radioGroup;
|
const uiComponent = getConfig('components').radioGroup;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component">
|
<component class="tmagic-design-row" :is="uiComponent.component">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-scrollbar" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,10 +1,12 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-select"
|
||||||
ref="select"
|
ref="select"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
@change="changeHandler"
|
@change="changeHandler"
|
||||||
@visible-change="visibleHandler"
|
@visible-change="visibleHandler"
|
||||||
|
@popup-visible-change="visibleHandler"
|
||||||
@update:modelValue="updateModelValue"
|
@update:modelValue="updateModelValue"
|
||||||
>
|
>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
@ -30,7 +32,7 @@ const props = defineProps<{
|
|||||||
allowCreate?: boolean;
|
allowCreate?: boolean;
|
||||||
valueKey?: string;
|
valueKey?: string;
|
||||||
remoteMethod?: any;
|
remoteMethod?: any;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').select;
|
const uiComponent = getConfig('components').select;
|
||||||
@ -39,22 +41,22 @@ const uiProps = computed(() => uiComponent.props(props));
|
|||||||
|
|
||||||
const emit = defineEmits(['change', 'update:modelValue', 'visibleHandler']);
|
const emit = defineEmits(['change', 'update:modelValue', 'visibleHandler']);
|
||||||
|
|
||||||
const changeHandler = (v: any) => {
|
const changeHandler = (...args: any[]) => {
|
||||||
emit('change', v);
|
emit('change', ...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateModelValue = (v: any) => {
|
const updateModelValue = (...args: any[]) => {
|
||||||
emit('update:modelValue', v);
|
emit('update:modelValue', ...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
const visibleHandler = (v: any) => {
|
const visibleHandler = (...args: any[]) => {
|
||||||
emit('visibleHandler', v);
|
emit('visibleHandler', ...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
const scrollbarWrap = ref<HTMLDivElement | undefined>();
|
const scrollbarWrap = ref<HTMLDivElement | undefined>();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
scrollbarWrap.value = select.value?.scrollbar.wrap$;
|
scrollbarWrap.value = select.value?.scrollbar?.wrap$;
|
||||||
});
|
});
|
||||||
|
|
||||||
defineExpose({
|
defineExpose({
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @click="clickHandler">
|
<component class="tmagic-design-step" :is="uiComponent.component" v-bind="uiProps" @click="clickHandler">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-steps" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @update:modelValue="updateModelValue" @change="changeHandler">
|
<component
|
||||||
|
class="tmagic-design-switch"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
@change="changeHandler"
|
||||||
|
>
|
||||||
<template #default>
|
<template #default>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</template>
|
</template>
|
||||||
@ -17,7 +23,7 @@ const props = defineProps<{
|
|||||||
activeValue?: string | number | boolean;
|
activeValue?: string | number | boolean;
|
||||||
inactiveValue?: string | number | boolean;
|
inactiveValue?: string | number | boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').switch;
|
const uiComponent = getConfig('components').switch;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-tab-pane" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<template #default>
|
<template #default>
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-table"
|
||||||
ref="table"
|
ref="table"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-tabs"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
@tab-click="tabClickHandler"
|
@tab-click="tabClickHandler"
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-tag" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<slot></slot>
|
<slot></slot>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
@ -11,7 +11,7 @@ import { getConfig } from './config';
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
type?: string;
|
type?: string;
|
||||||
closeTransition?: boolean;
|
disableTransition?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').tag;
|
const uiComponent = getConfig('components').tag;
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps" @change="changeHandler" @update:modelValue="updateModelValue">
|
<component
|
||||||
|
class="tmagic-design-time-picker"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@change="changeHandler"
|
||||||
|
@update:modelValue="updateModelValue"
|
||||||
|
>
|
||||||
</component>
|
</component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -12,7 +18,7 @@ const props = defineProps<{
|
|||||||
modelValue?: any;
|
modelValue?: any;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
size?: 'mini' | 'small' | 'medium';
|
size?: 'large' | 'default' | 'small';
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const uiComponent = getConfig('components').timePicker;
|
const uiComponent = getConfig('components').timePicker;
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
<template>
|
<template>
|
||||||
<component :is="uiComponent.component" v-bind="uiProps">
|
<component class="tmagic-design-tooltip" :is="uiComponent.component" v-bind="uiProps">
|
||||||
<template #content>
|
<template #content>
|
||||||
<slot name="content"></slot>
|
<slot name="content"></slot>
|
||||||
</template>
|
</template>
|
||||||
|
@ -1,5 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<component
|
<component
|
||||||
|
class="tmagic-design-tree"
|
||||||
ref="tree"
|
ref="tree"
|
||||||
:is="uiComponent.component"
|
:is="uiComponent.component"
|
||||||
v-bind="uiProps"
|
v-bind="uiProps"
|
||||||
|
@ -1,5 +1,11 @@
|
|||||||
<template>
|
<template>
|
||||||
<component ref="upload" :is="uiComponent.component" v-bind="uiProps" @change="changeHandler"></component>
|
<component
|
||||||
|
class="tmagic-design-upload"
|
||||||
|
ref="upload"
|
||||||
|
:is="uiComponent.component"
|
||||||
|
v-bind="uiProps"
|
||||||
|
@change="changeHandler"
|
||||||
|
></component>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts" name="TMUpload">
|
<script setup lang="ts" name="TMUpload">
|
||||||
@ -10,6 +16,7 @@ import { getConfig } from './config';
|
|||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
action?: string;
|
action?: string;
|
||||||
autoUpload?: boolean;
|
autoUpload?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
const emit = defineEmits(['change']);
|
const emit = defineEmits(['change']);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user