Вырезал ненужный код
This commit is contained in:
@@ -20,7 +20,6 @@ import StdDialog from './share/StdDialog.vue';
|
|||||||
import sanitizeHtml from 'sanitize-html';
|
import sanitizeHtml from 'sanitize-html';
|
||||||
|
|
||||||
import miscApi from '../api/misc';
|
import miscApi from '../api/misc';
|
||||||
import * as utils from '../share/utils';
|
|
||||||
|
|
||||||
const componentOptions = {
|
const componentOptions = {
|
||||||
components: {
|
components: {
|
||||||
@@ -145,38 +144,6 @@ class App {
|
|||||||
})();
|
})();
|
||||||
}
|
}
|
||||||
|
|
||||||
toggleCollapse() {
|
|
||||||
this.commit('uistate/setAsideBarCollapse', !this.uistate.asideBarCollapse);
|
|
||||||
this.$root.eventHook('resize');
|
|
||||||
}
|
|
||||||
|
|
||||||
get isCollapse() {
|
|
||||||
return this.uistate.asideBarCollapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
get asideWidth() {
|
|
||||||
if (this.uistate.asideBarCollapse) {
|
|
||||||
return 64;
|
|
||||||
} else {
|
|
||||||
return 170;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get buttonCollapseIcon() {
|
|
||||||
if (this.uistate.asideBarCollapse) {
|
|
||||||
return 'el-icon-d-arrow-right';
|
|
||||||
} else {
|
|
||||||
return 'el-icon-d-arrow-left';
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
get appName() {
|
|
||||||
if (this.isCollapse)
|
|
||||||
return '<br><br>';
|
|
||||||
else
|
|
||||||
return `${this.config.name} <br>v${this.config.version}`;
|
|
||||||
}
|
|
||||||
|
|
||||||
get apiError() {
|
get apiError() {
|
||||||
return this.state.apiError;
|
return this.state.apiError;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { createStore } from 'vuex';
|
|||||||
import VuexPersistence from 'vuex-persist';
|
import VuexPersistence from 'vuex-persist';
|
||||||
|
|
||||||
import root from './root.js';
|
import root from './root.js';
|
||||||
import uistate from './modules/uistate';
|
|
||||||
import config from './modules/config';
|
import config from './modules/config';
|
||||||
import reader from './modules/reader';
|
import reader from './modules/reader';
|
||||||
|
|
||||||
@@ -13,7 +12,6 @@ const vuexLocal = new VuexPersistence();
|
|||||||
|
|
||||||
export default createStore(Object.assign({}, root, {
|
export default createStore(Object.assign({}, root, {
|
||||||
modules: {
|
modules: {
|
||||||
uistate,
|
|
||||||
config,
|
config,
|
||||||
reader,
|
reader,
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,25 +0,0 @@
|
|||||||
// initial state
|
|
||||||
const state = {
|
|
||||||
asideBarCollapse: false,
|
|
||||||
};
|
|
||||||
|
|
||||||
// getters
|
|
||||||
const getters = {};
|
|
||||||
|
|
||||||
// actions
|
|
||||||
const actions = {};
|
|
||||||
|
|
||||||
// mutations
|
|
||||||
const mutations = {
|
|
||||||
setAsideBarCollapse(state, value) {
|
|
||||||
state.asideBarCollapse = value;
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default {
|
|
||||||
namespaced: true,
|
|
||||||
state,
|
|
||||||
getters,
|
|
||||||
actions,
|
|
||||||
mutations
|
|
||||||
};
|
|
||||||
Reference in New Issue
Block a user