mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-11-25 09:57:38 +00:00
代码整理
This commit is contained in:
45
src/views/devtools/ui/propertys.vue
Normal file
45
src/views/devtools/ui/propertys.vue
Normal file
@@ -0,0 +1,45 @@
|
||||
<template>
|
||||
<div class="prop ccui-scrollbar">
|
||||
<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 { 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) {
|
||||
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;
|
||||
overflow: auto;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user