bugfix: 清除标签后同步style弹窗

This commit is contained in:
2026-04-30 15:49:23 +08:00
parent 26cd16be09
commit d073008736

View File

@@ -49,7 +49,7 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref } from 'vue' import { ref, watch } from 'vue'
import { getStyleImage } from '../style' import { getStyleImage } from '../style'
import type { OptionItem } from './types' import type { OptionItem } from './types'
@@ -69,6 +69,14 @@
const tempSelectedValue = ref('') const tempSelectedValue = ref('')
const stylePopupVisible = ref(false) const stylePopupVisible = ref(false)
watch(
() => props.modelValue,
(value) => {
tempSelectedValue.value = value
},
{ immediate: true }
)
const openStylePopup = () => { const openStylePopup = () => {
tempSelectedValue.value = props.modelValue tempSelectedValue.value = props.modelValue
stylePopupVisible.value = true stylePopupVisible.value = true