优霸定制删除天气
This commit is contained in:
parent
18a3884e15
commit
f02cad430f
|
@ -399,15 +399,33 @@ export default defineComponent({
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
const refresh_signal_source_options = () => {
|
||||||
if (
|
if (
|
||||||
($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) !=
|
($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) ==
|
||||||
0
|
0
|
||||||
) {
|
) {
|
||||||
signal_source_options.push({
|
signal_source_options.push({
|
||||||
label: $t.t("weather"),
|
label: $t.t("weather"),
|
||||||
value: "EwindowType::Weather",
|
value: "EwindowType::Weather",
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
const index = signal_source_options.findIndex(
|
||||||
|
(element) => element && element.value == "EwindowType::Weather"
|
||||||
|
);
|
||||||
|
if (index != -1) {
|
||||||
|
signal_source_options.splice(index, 1);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
refresh_signal_source_options();
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => $store.state.device_attribute,
|
||||||
|
(value) => {
|
||||||
|
refresh_signal_source_options();
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
const tree_nodes = computed({
|
const tree_nodes = computed({
|
||||||
get: () => $store.state.signal_source_tree,
|
get: () => $store.state.signal_source_tree,
|
||||||
|
|
Loading…
Reference in New Issue