fix: update `ApiComponent` to bind class and style attributes from attrs
parent
adea92b879
commit
811801b70c
|
@ -81,6 +81,7 @@ const emit = defineEmits<{
|
||||||
const modelValue = defineModel({ default: '' });
|
const modelValue = defineModel({ default: '' });
|
||||||
|
|
||||||
const attrs = useAttrs();
|
const attrs = useAttrs();
|
||||||
|
const { class: className, style }: Record<string, any> = attrs;
|
||||||
|
|
||||||
const refOptions = ref<OptionsItem[]>([]);
|
const refOptions = ref<OptionsItem[]>([]);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
|
@ -188,7 +189,7 @@ function emitChange() {
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<template>
|
<template>
|
||||||
<div v-bind="{ ...$attrs }">
|
<div v-bind="{ class: className, style }">
|
||||||
<component
|
<component
|
||||||
:is="component"
|
:is="component"
|
||||||
v-bind="bindProps"
|
v-bind="bindProps"
|
||||||
|
|
Loading…
Reference in New Issue