diff --git a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue index 5266196e..f48ed3d6 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/actions/index.vue @@ -58,7 +58,7 @@ @change="propertySelect" > i?.expands?.type?.includes('read'), ) || []" :value="item?.id" diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue index b98f67dd..8ab6ad76 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Device.vue @@ -171,15 +171,12 @@ const handleClick = (_detail: any) => { } }; -watch(() => props.value?.[0]?.value, (newVal) => { - if(newVal){ - detail(newVal).then(resp => { +onMounted(() => { + if(props.value?.[0]?.value){ + detail(props.value?.[0]?.value).then(resp => { emit('change', resp.result); }) } -}, { - deep: true, - immediate: true }) watchEffect(() => { diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue b/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue index b49db279..d839f1bc 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/Tag.vue @@ -180,6 +180,11 @@ const onValueChange = () => { emits('update:value', [{ value: newValue, name: '标签' }]); emits('change', [{ value: newValue, name: '标签' }], _data); }; + +// onMounted(() => { +// // console.log(tagList.value, props.tagData, props.value) +// // emits('change', props.value, _data); +// })