fix: 修改场景联动
This commit is contained in:
parent
6d4a442ee8
commit
6abbe34663
|
@ -58,7 +58,7 @@
|
|||
@change="propertySelect"
|
||||
>
|
||||
<j-select-option
|
||||
v-for="item in metadata?.properties.filter((i) =>
|
||||
v-for="item in (metadata?.properties || []).filter((i) =>
|
||||
i?.expands?.type?.includes('read'),
|
||||
) || []"
|
||||
:value="item?.id"
|
||||
|
|
|
@ -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(() => {
|
||||
|
|
|
@ -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);
|
||||
// })
|
||||
</script>
|
||||
|
||||
<style lang="less" scoped>
|
||||
|
|
|
@ -285,6 +285,7 @@ const onTagChange = (val: any[], arr: any[]) => {
|
|||
i.name
|
||||
}为${i.value}`;
|
||||
});
|
||||
console.log(tagName)
|
||||
emits(
|
||||
'save',
|
||||
unref(modelRef),
|
||||
|
|
|
@ -69,7 +69,6 @@ import Product from './Product.vue';
|
|||
import Device from './device/index.vue';
|
||||
import Action from './actions/index.vue';
|
||||
import { onlyMessage } from '@/utils/comm';
|
||||
import { detail } from '@/api/device/product';
|
||||
|
||||
import { useSceneStore } from '@/store/scene';
|
||||
import { storeToRefs } from 'pinia';
|
||||
|
|
Loading…
Reference in New Issue