fix: 修复设置器不更新问题 (#361)
This commit is contained in:
parent
591a98bff1
commit
6c396c6ec8
@ -68,7 +68,7 @@ watch(
|
||||
() => props.formConfig.value,
|
||||
(newVal: boolean) => {
|
||||
if (newVal !== modelValue.value) {
|
||||
modelValue.value == !!newVal
|
||||
modelValue.value = !!newVal
|
||||
}
|
||||
},
|
||||
{
|
||||
|
@ -8,7 +8,7 @@
|
||||
/>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { ref, computed } from 'vue'
|
||||
import { ref, computed, watch } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import 'element-plus/theme-chalk/src/message.scss'
|
||||
import { FORM_CHANGE_EVENT_KEY } from '@/materials/setters/constant'
|
||||
@ -65,6 +65,17 @@ const handleInputChange = (value: number) => {
|
||||
|
||||
emit(FORM_CHANGE_EVENT_KEY, { key, value })
|
||||
}
|
||||
watch(
|
||||
() => props.formConfig.value,
|
||||
(newVal) => {
|
||||
if (newVal !== modelValue.value) {
|
||||
modelValue.value = newVal
|
||||
}
|
||||
},
|
||||
{
|
||||
immediate: true
|
||||
}
|
||||
)
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.star-form.star-form_horizon {
|
||||
|
Loading…
Reference in New Issue
Block a user