mirror of
https://github.com/Tencent/tmagic-editor.git
synced 2025-06-10 22:19:23 +08:00
fix(form): 修复text append按钮大小
This commit is contained in:
parent
9ae93fc9f2
commit
59c0a090b8
@ -14,6 +14,7 @@
|
||||
<el-button
|
||||
v-if="typeof config.append === 'object' && config.append.type === 'button'"
|
||||
style="color: #409eff"
|
||||
:size="size"
|
||||
@click.prevent="buttonClickHandler"
|
||||
>
|
||||
{{ config.append.text }}
|
||||
@ -43,6 +44,8 @@ export default defineComponent({
|
||||
emits: ['change', 'input'],
|
||||
|
||||
setup(props, { emit }) {
|
||||
const mForm = inject<FormState | undefined>('mForm');
|
||||
|
||||
useAddField(props.prop);
|
||||
|
||||
const modelName = computed(() => props.name || props.config.name || '');
|
||||
@ -54,14 +57,11 @@ export default defineComponent({
|
||||
},
|
||||
|
||||
inputHandler(v: string | number) {
|
||||
const mForm = inject<FormState | undefined>('mForm');
|
||||
emit('input', v);
|
||||
mForm?.$emit('field-input', props.prop, v);
|
||||
},
|
||||
|
||||
buttonClickHandler() {
|
||||
const mForm = inject<FormState | undefined>('mForm');
|
||||
|
||||
if (typeof props.config.append === 'string') return;
|
||||
|
||||
if (props.config.append?.handler) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user