mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-04-20 08:58:41 +00:00
修复属性刷新反复被折叠的bug
This commit is contained in:
parent
6ec242e57c
commit
b3da760863
@ -63,20 +63,11 @@ export default defineComponent({
|
||||
watch(
|
||||
() => props.value,
|
||||
(newData, oldData) => {
|
||||
if (newData.id !== oldData.id) {
|
||||
// 只有id不相等了,才折叠,因为数据是在定时刷新
|
||||
expand.value = false;
|
||||
subData.value = [];
|
||||
}
|
||||
freshSubData(newData);
|
||||
}
|
||||
);
|
||||
const subData = ref<Array<Property>>([]);
|
||||
function freshSubData(data: Info) {
|
||||
const rawExpand = toRaw(expand.value);
|
||||
if (!rawExpand) {
|
||||
return;
|
||||
}
|
||||
const rawValue = toRaw(data);
|
||||
if (!rawValue) {
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user