左侧信号源添加再次点击取消选中的功能

This commit is contained in:
fangxiang 2022-02-14 10:59:05 +08:00
parent 2c03e2ee6d
commit baddae8bba
1 changed files with 7 additions and 1 deletions

View File

@ -256,6 +256,8 @@ export const storeKey: InjectionKey<VuexStore<StateInterface>> =
Symbol("vuex-key");
import window_color_list from "./window_color_list.js";
const NullSignalSource =
"FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
export default store(function (/* { ssrContext } */) {
const Store = createStore<StateInterface>({
@ -737,7 +739,11 @@ export default store(function (/* { ssrContext } */) {
state.selected_window = playload;
},
setSelectedSignalSource(state: StateInterface, playload?: any) {
state.selected_signal_source = playload;
if (state.selected_signal_source == playload) {
state.selected_signal_source = NullSignalSource;
} else {
state.selected_signal_source = playload;
}
},
setCurrentRunningPlan(state: StateInterface, playload?: any) {
state.current_running_plan = playload;