优霸定制删除天气

This commit is contained in:
fangxiang 2022-07-07 14:49:47 +08:00
parent 18a3884e15
commit f02cad430f
2 changed files with 28 additions and 10 deletions

View File

@ -399,15 +399,33 @@ export default defineComponent({
},
];
const refresh_signal_source_options = () => {
if (
($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) !=
($store.state.device_attribute & Protocol.EDeviceAttribute.CustomISV) ==
0
) {
signal_source_options.push({
label: $t.t("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({
get: () => $store.state.signal_source_tree,