mirror of
https://github.com/tidys/cc-inspector-chrome
synced 2025-06-06 16:24:01 +00:00
watch变量
This commit is contained in:
parent
d0b832b117
commit
08a055fe27
@ -17,7 +17,8 @@
|
|||||||
|
|
||||||
<script lang="ts">
|
<script lang="ts">
|
||||||
import Vue from "vue"
|
import Vue from "vue"
|
||||||
import {Component, Prop} from "vue-property-decorator"
|
|
||||||
|
import {Component, Prop, Watch} from "vue-property-decorator"
|
||||||
import UiProp from "./ui-prop.vue"
|
import UiProp from "./ui-prop.vue"
|
||||||
import {DataType, testData} from "../data";
|
import {DataType, testData} from "../data";
|
||||||
|
|
||||||
@ -40,9 +41,19 @@ export default class NodeBaseProperty extends Vue {
|
|||||||
private label?: string | undefined
|
private label?: string | undefined
|
||||||
|
|
||||||
setup() {
|
setup() {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Watch('allGroup')
|
||||||
|
watchAllGroup() {
|
||||||
|
this._initValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
created() {
|
created() {
|
||||||
|
this._initValue();
|
||||||
|
}
|
||||||
|
|
||||||
|
_initValue() {
|
||||||
if (this.allGroup) {
|
if (this.allGroup) {
|
||||||
this.allGroup.forEach(item => {
|
this.allGroup.forEach(item => {
|
||||||
this.$set(item, 'fold', false);
|
this.$set(item, 'fold', false);
|
||||||
@ -50,7 +61,6 @@ export default class NodeBaseProperty extends Vue {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
changeColor() {
|
changeColor() {
|
||||||
let color = this.itemData.color;
|
let color = this.itemData.color;
|
||||||
console.log("color:" + color);
|
console.log("color:" + color);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user