mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-11-25 20:07:36 +00:00
优化输出日志的颜色
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
|
||||
<script lang="ts">
|
||||
import ccui from "@xuyanfeng/cc-ui";
|
||||
import { defineComponent, PropType, ref, watch } from "vue";
|
||||
import { defineComponent, PropType, ref, toRaw, watch } from "vue";
|
||||
import Bus, { BusMsg } from "../bus";
|
||||
import { Group } from "../data";
|
||||
import UiProp from "./ui-prop.vue";
|
||||
@@ -53,7 +53,8 @@ export default defineComponent({
|
||||
return {
|
||||
fold,
|
||||
onLog() {
|
||||
Bus.emit(BusMsg.LogData, [props.group.id]);
|
||||
const raw = toRaw(props);
|
||||
Bus.emit(BusMsg.LogData, [raw.group.id]);
|
||||
},
|
||||
};
|
||||
},
|
||||
|
||||
@@ -35,7 +35,7 @@ import { nextTick } from "process";
|
||||
import { defineComponent, onMounted, onUnmounted, PropType, ref, toRaw, watch } from "vue";
|
||||
import { Msg } from "../../../core/types";
|
||||
import Bus, { BusMsg } from "../bus";
|
||||
import { connectBackground } from "../connectBackground";
|
||||
import { bridge } from "../bridge";
|
||||
import { DataType, EngineData, EnumData, ImageData, Info, NumberData, Property, StringData, TextData, Vec2Data, Vec3Data } from "../data";
|
||||
import Engine from "./property-engine.vue";
|
||||
import PropertyImage from "./property-image.vue";
|
||||
@@ -139,7 +139,8 @@ export default defineComponent({
|
||||
},
|
||||
onChangeValue() {
|
||||
if (!props.value.readonly) {
|
||||
connectBackground.postMessageToBackground(Msg.SetProperty, toRaw(props.value));
|
||||
const raw = toRaw(props.value);
|
||||
bridge.send(Msg.SetProperty, raw);
|
||||
}
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user