Skip to content

Commit

Permalink
fix: 题型切换 CheckboxGroup 基础设置组件状态监控导致问题
Browse files Browse the repository at this point in the history
  • Loading branch information
alwayrun committed May 28, 2024
1 parent 2901119 commit 27eca24
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions web/src/materials/setters/widgets/CheckboxGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
</template>
<script setup lang="ts">
import { watch, reactive } from 'vue'
import { watch, computed, reactive } from 'vue'
import { FORM_CHANGE_EVENT_KEY } from '@/materials/setters/constant'
interface Props {
Expand All @@ -39,9 +39,10 @@ const handleCheckboxChange = (key: string, value: boolean) => {
}
const optionsValue = reactive<any>(props.formConfig?.value)
const watchValue = computed<any>(() => props.formConfig.value)
watch(
props.formConfig.value,
watchValue,
(val) => {
const keys = Object.keys(val)
Expand Down

0 comments on commit 27eca24

Please sign in to comment.