File tree Expand file tree Collapse file tree 2 files changed +2
-3
lines changed
Expand file tree Collapse file tree 2 files changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ export default defineComponent({
99 const syncing = ref ( false )
1010 const syncId = ref ( 0 )
1111
12- watchImmediate ( propsValue , async ( v ) => {
12+ watch ( propsValue , async ( v ) => {
1313 syncing . value = true
1414 const id = ++ syncId . value
1515 const origin = toRaw ( v ) ?? [ ]
@@ -24,7 +24,7 @@ export default defineComponent({
2424 if ( id !== syncId . value ) // 有新的更新
2525 return
2626 }
27- } )
27+ } , { immediate : true , deep : true } ) // 如果不深度监听,字符串变化不会触发更新
2828
2929 return ( ) => (
3030 < NDynamicInput
Original file line number Diff line number Diff line change @@ -26,7 +26,6 @@ onBeforeUnmount(() => { // 保存设置
2626 v-model:value =" queue"
2727 :max =" MAX_PLAN_QUEUE_SIZE"
2828 # =" { index }: { index: number }"
29- @remove =" (index) => queue.splice(index, 1)"
3029 >
3130 <NSelect
3231 v-model:value =" queue[index]"
You can’t perform that action at this time.
0 commit comments