28 lines
643 B
JavaScript
28 lines
643 B
JavaScript
import { saveViewApi } from "@/api";
|
|
import { globalLookup } from "@/hook/global";
|
|
import { reactive } from "vue";
|
|
|
|
export const controlPanel = reactive({
|
|
sections: [
|
|
{
|
|
iconClass: 'iconfont icon-collections'
|
|
},
|
|
{
|
|
iconClass: 'iconfont icon-setting'
|
|
},
|
|
{
|
|
iconClass: 'iconfont icon-about'
|
|
}
|
|
],
|
|
currentIndex: -1,
|
|
click(index) {
|
|
if (this.currentIndex === index) {
|
|
this.currentIndex = -1;
|
|
} else {
|
|
this.currentIndex = index;
|
|
}
|
|
|
|
// 保存
|
|
saveViewApi({ rightNavIndex: true });
|
|
}
|
|
}); |