xu_yanfeng 085e1528f0 修复属性面板切换node,显示异常的bug
优化Image属性的显示
2024-12-11 21:05:49 +08:00

52 lines
1.2 KiB
Vue
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<template>
<div class="prop">
<PropertyGroup v-for="(group, index) in data.group" :key="index" :group="group"></PropertyGroup>
</div>
</template>
<script lang="ts">
import { defineComponent, PropType, watch } from "vue";
import Bus, { BusMsg } from "../bus";
import { Group, NodeInfoData } from "../data";
import PropertyGroup from "../ui/property-group.vue";
import UiProp from "./ui-prop.vue";
export default defineComponent({
components: { PropertyGroup, UiProp },
props: {
data: {
type: Object as PropType<NodeInfoData>,
default: () => {
return {};
},
},
},
setup(props, context) {
function _evalCode(code: string) {
if (chrome && chrome.devtools) {
chrome.devtools.inspectedWindow.eval(code);
} else {
console.log(code);
}
}
watch(
() => props.data,
(newValue: NodeInfoData, oldValue: NodeInfoData) => {
// console.log(newValue);
if (newValue.uuid !== oldValue.uuid) {
// 切换node全部展开属性
Bus.emit(BusMsg.FoldAllGroup, false);
}
}
);
return {};
},
});
</script>
<style scoped lang="less">
.prop {
color: white;
}
</style>