@luzhaoqi/test 0.0.23 → 0.0.24
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/lib-cjs.js +815 -497
- package/package.json +1 -1
package/dist/lib-cjs.js
CHANGED
@@ -28728,7 +28728,7 @@ var ResizeObserver = /** @class */ (function () {
|
|
28728
28728
|
};
|
28729
28729
|
});
|
28730
28730
|
|
28731
|
-
var index$
|
28731
|
+
var index$2 = (function () {
|
28732
28732
|
// Export existing implementation if available.
|
28733
28733
|
if (typeof global$1$1.ResizeObserver !== 'undefined') {
|
28734
28734
|
return global$1$1.ResizeObserver;
|
@@ -28738,7 +28738,7 @@ var index$1 = (function () {
|
|
28738
28738
|
|
28739
28739
|
var ResizeObserver_es = /*#__PURE__*/Object.freeze({
|
28740
28740
|
__proto__: null,
|
28741
|
-
default: index$
|
28741
|
+
default: index$2
|
28742
28742
|
});
|
28743
28743
|
|
28744
28744
|
var require$$0 = /*@__PURE__*/getAugmentedNamespace(ResizeObserver_es);
|
@@ -93902,14 +93902,14 @@ function createAxios(Vue) {
|
|
93902
93902
|
}
|
93903
93903
|
}
|
93904
93904
|
|
93905
|
-
function install$
|
93905
|
+
function install$5(Vue, option = {}) {
|
93906
93906
|
setGolbalData(Vue, option);
|
93907
93907
|
const $http = createAxios(Vue);
|
93908
93908
|
Vue.prototype.$z.$http = $http;
|
93909
93909
|
}
|
93910
93910
|
|
93911
93911
|
var RequestZ = {
|
93912
|
-
install: install$
|
93912
|
+
install: install$5
|
93913
93913
|
};
|
93914
93914
|
|
93915
93915
|
var nprogress = {exports: {}};
|
@@ -94459,6 +94459,56 @@ function devtoolPlugin (store) {
|
|
94459
94459
|
}, { prepend: true });
|
94460
94460
|
}
|
94461
94461
|
|
94462
|
+
/**
|
94463
|
+
* Get the first item that pass the test
|
94464
|
+
* by second argument function
|
94465
|
+
*
|
94466
|
+
* @param {Array} list
|
94467
|
+
* @param {Function} f
|
94468
|
+
* @return {*}
|
94469
|
+
*/
|
94470
|
+
function find (list, f) {
|
94471
|
+
return list.filter(f)[0]
|
94472
|
+
}
|
94473
|
+
|
94474
|
+
/**
|
94475
|
+
* Deep copy the given object considering circular structure.
|
94476
|
+
* This function caches all nested objects and its copies.
|
94477
|
+
* If it detects circular structure, use cached copy to avoid infinite loop.
|
94478
|
+
*
|
94479
|
+
* @param {*} obj
|
94480
|
+
* @param {Array<Object>} cache
|
94481
|
+
* @return {*}
|
94482
|
+
*/
|
94483
|
+
function deepCopy (obj, cache) {
|
94484
|
+
if ( cache === void 0 ) cache = [];
|
94485
|
+
|
94486
|
+
// just return if obj is immutable value
|
94487
|
+
if (obj === null || typeof obj !== 'object') {
|
94488
|
+
return obj
|
94489
|
+
}
|
94490
|
+
|
94491
|
+
// if obj is hit, it is in circular structure
|
94492
|
+
var hit = find(cache, function (c) { return c.original === obj; });
|
94493
|
+
if (hit) {
|
94494
|
+
return hit.copy
|
94495
|
+
}
|
94496
|
+
|
94497
|
+
var copy = Array.isArray(obj) ? [] : {};
|
94498
|
+
// put the copy into cache at first
|
94499
|
+
// because we want to refer it in recursive deepCopy
|
94500
|
+
cache.push({
|
94501
|
+
original: obj,
|
94502
|
+
copy: copy
|
94503
|
+
});
|
94504
|
+
|
94505
|
+
Object.keys(obj).forEach(function (key) {
|
94506
|
+
copy[key] = deepCopy(obj[key], cache);
|
94507
|
+
});
|
94508
|
+
|
94509
|
+
return copy
|
94510
|
+
}
|
94511
|
+
|
94462
94512
|
/**
|
94463
94513
|
* forEach for object
|
94464
94514
|
*/
|
@@ -94716,7 +94766,7 @@ var Store = function Store (options) {
|
|
94716
94766
|
// To allow users to avoid auto-installation in some cases,
|
94717
94767
|
// this code should be placed here. See #731
|
94718
94768
|
if (!Vue && typeof window !== 'undefined' && window.Vue) {
|
94719
|
-
install$
|
94769
|
+
install$4(window.Vue);
|
94720
94770
|
}
|
94721
94771
|
|
94722
94772
|
{
|
@@ -95255,7 +95305,7 @@ function unifyObjectStyle (type, payload, options) {
|
|
95255
95305
|
return { type: type, payload: payload, options: options }
|
95256
95306
|
}
|
95257
95307
|
|
95258
|
-
function install$
|
95308
|
+
function install$4 (_Vue) {
|
95259
95309
|
if (Vue && _Vue === Vue) {
|
95260
95310
|
{
|
95261
95311
|
console.error(
|
@@ -95304,6 +95354,123 @@ var mapState = normalizeNamespace(function (namespace, states) {
|
|
95304
95354
|
return res
|
95305
95355
|
});
|
95306
95356
|
|
95357
|
+
/**
|
95358
|
+
* Reduce the code which written in Vue.js for committing the mutation
|
95359
|
+
* @param {String} [namespace] - Module's namespace
|
95360
|
+
* @param {Object|Array} mutations # Object's item can be a function which accept `commit` function as the first param, it can accept another params. You can commit mutation and do any other things in this function. specially, You need to pass anthor params from the mapped function.
|
95361
|
+
* @return {Object}
|
95362
|
+
*/
|
95363
|
+
var mapMutations = normalizeNamespace(function (namespace, mutations) {
|
95364
|
+
var res = {};
|
95365
|
+
if (!isValidMap(mutations)) {
|
95366
|
+
console.error('[vuex] mapMutations: mapper parameter must be either an Array or an Object');
|
95367
|
+
}
|
95368
|
+
normalizeMap(mutations).forEach(function (ref) {
|
95369
|
+
var key = ref.key;
|
95370
|
+
var val = ref.val;
|
95371
|
+
|
95372
|
+
res[key] = function mappedMutation () {
|
95373
|
+
var args = [], len = arguments.length;
|
95374
|
+
while ( len-- ) args[ len ] = arguments[ len ];
|
95375
|
+
|
95376
|
+
// Get the commit method from store
|
95377
|
+
var commit = this.$store.commit;
|
95378
|
+
if (namespace) {
|
95379
|
+
var module = getModuleByNamespace(this.$store, 'mapMutations', namespace);
|
95380
|
+
if (!module) {
|
95381
|
+
return
|
95382
|
+
}
|
95383
|
+
commit = module.context.commit;
|
95384
|
+
}
|
95385
|
+
return typeof val === 'function'
|
95386
|
+
? val.apply(this, [commit].concat(args))
|
95387
|
+
: commit.apply(this.$store, [val].concat(args))
|
95388
|
+
};
|
95389
|
+
});
|
95390
|
+
return res
|
95391
|
+
});
|
95392
|
+
|
95393
|
+
/**
|
95394
|
+
* Reduce the code which written in Vue.js for getting the getters
|
95395
|
+
* @param {String} [namespace] - Module's namespace
|
95396
|
+
* @param {Object|Array} getters
|
95397
|
+
* @return {Object}
|
95398
|
+
*/
|
95399
|
+
var mapGetters = normalizeNamespace(function (namespace, getters) {
|
95400
|
+
var res = {};
|
95401
|
+
if (!isValidMap(getters)) {
|
95402
|
+
console.error('[vuex] mapGetters: mapper parameter must be either an Array or an Object');
|
95403
|
+
}
|
95404
|
+
normalizeMap(getters).forEach(function (ref) {
|
95405
|
+
var key = ref.key;
|
95406
|
+
var val = ref.val;
|
95407
|
+
|
95408
|
+
// The namespace has been mutated by normalizeNamespace
|
95409
|
+
val = namespace + val;
|
95410
|
+
res[key] = function mappedGetter () {
|
95411
|
+
if (namespace && !getModuleByNamespace(this.$store, 'mapGetters', namespace)) {
|
95412
|
+
return
|
95413
|
+
}
|
95414
|
+
if (!(val in this.$store.getters)) {
|
95415
|
+
console.error(("[vuex] unknown getter: " + val));
|
95416
|
+
return
|
95417
|
+
}
|
95418
|
+
return this.$store.getters[val]
|
95419
|
+
};
|
95420
|
+
// mark vuex getter for devtools
|
95421
|
+
res[key].vuex = true;
|
95422
|
+
});
|
95423
|
+
return res
|
95424
|
+
});
|
95425
|
+
|
95426
|
+
/**
|
95427
|
+
* Reduce the code which written in Vue.js for dispatch the action
|
95428
|
+
* @param {String} [namespace] - Module's namespace
|
95429
|
+
* @param {Object|Array} actions # Object's item can be a function which accept `dispatch` function as the first param, it can accept anthor params. You can dispatch action and do any other things in this function. specially, You need to pass anthor params from the mapped function.
|
95430
|
+
* @return {Object}
|
95431
|
+
*/
|
95432
|
+
var mapActions = normalizeNamespace(function (namespace, actions) {
|
95433
|
+
var res = {};
|
95434
|
+
if (!isValidMap(actions)) {
|
95435
|
+
console.error('[vuex] mapActions: mapper parameter must be either an Array or an Object');
|
95436
|
+
}
|
95437
|
+
normalizeMap(actions).forEach(function (ref) {
|
95438
|
+
var key = ref.key;
|
95439
|
+
var val = ref.val;
|
95440
|
+
|
95441
|
+
res[key] = function mappedAction () {
|
95442
|
+
var args = [], len = arguments.length;
|
95443
|
+
while ( len-- ) args[ len ] = arguments[ len ];
|
95444
|
+
|
95445
|
+
// get dispatch function from store
|
95446
|
+
var dispatch = this.$store.dispatch;
|
95447
|
+
if (namespace) {
|
95448
|
+
var module = getModuleByNamespace(this.$store, 'mapActions', namespace);
|
95449
|
+
if (!module) {
|
95450
|
+
return
|
95451
|
+
}
|
95452
|
+
dispatch = module.context.dispatch;
|
95453
|
+
}
|
95454
|
+
return typeof val === 'function'
|
95455
|
+
? val.apply(this, [dispatch].concat(args))
|
95456
|
+
: dispatch.apply(this.$store, [val].concat(args))
|
95457
|
+
};
|
95458
|
+
});
|
95459
|
+
return res
|
95460
|
+
});
|
95461
|
+
|
95462
|
+
/**
|
95463
|
+
* Rebinding namespace param for mapXXX function in special scoped, and return them by simple object
|
95464
|
+
* @param {String} namespace
|
95465
|
+
* @return {Object}
|
95466
|
+
*/
|
95467
|
+
var createNamespacedHelpers = function (namespace) { return ({
|
95468
|
+
mapState: mapState.bind(null, namespace),
|
95469
|
+
mapGetters: mapGetters.bind(null, namespace),
|
95470
|
+
mapMutations: mapMutations.bind(null, namespace),
|
95471
|
+
mapActions: mapActions.bind(null, namespace)
|
95472
|
+
}); };
|
95473
|
+
|
95307
95474
|
/**
|
95308
95475
|
* Normalize the map
|
95309
95476
|
* normalizeMap([1, 2, 3]) => [ { key: 1, val: 1 }, { key: 2, val: 2 }, { key: 3, val: 3 } ]
|
@@ -95361,6 +95528,109 @@ function getModuleByNamespace (store, helper, namespace) {
|
|
95361
95528
|
return module
|
95362
95529
|
}
|
95363
95530
|
|
95531
|
+
// Credits: borrowed code from fcomb/redux-logger
|
95532
|
+
|
95533
|
+
function createLogger (ref) {
|
95534
|
+
if ( ref === void 0 ) ref = {};
|
95535
|
+
var collapsed = ref.collapsed; if ( collapsed === void 0 ) collapsed = true;
|
95536
|
+
var filter = ref.filter; if ( filter === void 0 ) filter = function (mutation, stateBefore, stateAfter) { return true; };
|
95537
|
+
var transformer = ref.transformer; if ( transformer === void 0 ) transformer = function (state) { return state; };
|
95538
|
+
var mutationTransformer = ref.mutationTransformer; if ( mutationTransformer === void 0 ) mutationTransformer = function (mut) { return mut; };
|
95539
|
+
var actionFilter = ref.actionFilter; if ( actionFilter === void 0 ) actionFilter = function (action, state) { return true; };
|
95540
|
+
var actionTransformer = ref.actionTransformer; if ( actionTransformer === void 0 ) actionTransformer = function (act) { return act; };
|
95541
|
+
var logMutations = ref.logMutations; if ( logMutations === void 0 ) logMutations = true;
|
95542
|
+
var logActions = ref.logActions; if ( logActions === void 0 ) logActions = true;
|
95543
|
+
var logger = ref.logger; if ( logger === void 0 ) logger = console;
|
95544
|
+
|
95545
|
+
return function (store) {
|
95546
|
+
var prevState = deepCopy(store.state);
|
95547
|
+
|
95548
|
+
if (typeof logger === 'undefined') {
|
95549
|
+
return
|
95550
|
+
}
|
95551
|
+
|
95552
|
+
if (logMutations) {
|
95553
|
+
store.subscribe(function (mutation, state) {
|
95554
|
+
var nextState = deepCopy(state);
|
95555
|
+
|
95556
|
+
if (filter(mutation, prevState, nextState)) {
|
95557
|
+
var formattedTime = getFormattedTime();
|
95558
|
+
var formattedMutation = mutationTransformer(mutation);
|
95559
|
+
var message = "mutation " + (mutation.type) + formattedTime;
|
95560
|
+
|
95561
|
+
startMessage(logger, message, collapsed);
|
95562
|
+
logger.log('%c prev state', 'color: #9E9E9E; font-weight: bold', transformer(prevState));
|
95563
|
+
logger.log('%c mutation', 'color: #03A9F4; font-weight: bold', formattedMutation);
|
95564
|
+
logger.log('%c next state', 'color: #4CAF50; font-weight: bold', transformer(nextState));
|
95565
|
+
endMessage(logger);
|
95566
|
+
}
|
95567
|
+
|
95568
|
+
prevState = nextState;
|
95569
|
+
});
|
95570
|
+
}
|
95571
|
+
|
95572
|
+
if (logActions) {
|
95573
|
+
store.subscribeAction(function (action, state) {
|
95574
|
+
if (actionFilter(action, state)) {
|
95575
|
+
var formattedTime = getFormattedTime();
|
95576
|
+
var formattedAction = actionTransformer(action);
|
95577
|
+
var message = "action " + (action.type) + formattedTime;
|
95578
|
+
|
95579
|
+
startMessage(logger, message, collapsed);
|
95580
|
+
logger.log('%c action', 'color: #03A9F4; font-weight: bold', formattedAction);
|
95581
|
+
endMessage(logger);
|
95582
|
+
}
|
95583
|
+
});
|
95584
|
+
}
|
95585
|
+
}
|
95586
|
+
}
|
95587
|
+
|
95588
|
+
function startMessage (logger, message, collapsed) {
|
95589
|
+
var startMessage = collapsed
|
95590
|
+
? logger.groupCollapsed
|
95591
|
+
: logger.group;
|
95592
|
+
|
95593
|
+
// render
|
95594
|
+
try {
|
95595
|
+
startMessage.call(logger, message);
|
95596
|
+
} catch (e) {
|
95597
|
+
logger.log(message);
|
95598
|
+
}
|
95599
|
+
}
|
95600
|
+
|
95601
|
+
function endMessage (logger) {
|
95602
|
+
try {
|
95603
|
+
logger.groupEnd();
|
95604
|
+
} catch (e) {
|
95605
|
+
logger.log('—— log end ——');
|
95606
|
+
}
|
95607
|
+
}
|
95608
|
+
|
95609
|
+
function getFormattedTime () {
|
95610
|
+
var time = new Date();
|
95611
|
+
return (" @ " + (pad(time.getHours(), 2)) + ":" + (pad(time.getMinutes(), 2)) + ":" + (pad(time.getSeconds(), 2)) + "." + (pad(time.getMilliseconds(), 3)))
|
95612
|
+
}
|
95613
|
+
|
95614
|
+
function repeat (str, times) {
|
95615
|
+
return (new Array(times + 1)).join(str)
|
95616
|
+
}
|
95617
|
+
|
95618
|
+
function pad (num, maxLength) {
|
95619
|
+
return repeat('0', maxLength - num.toString().length) + num
|
95620
|
+
}
|
95621
|
+
|
95622
|
+
var index$1 = {
|
95623
|
+
Store: Store,
|
95624
|
+
install: install$4,
|
95625
|
+
version: '3.6.2',
|
95626
|
+
mapState: mapState,
|
95627
|
+
mapMutations: mapMutations,
|
95628
|
+
mapGetters: mapGetters,
|
95629
|
+
mapActions: mapActions,
|
95630
|
+
createNamespacedHelpers: createNamespacedHelpers,
|
95631
|
+
createLogger: createLogger
|
95632
|
+
};
|
95633
|
+
|
95364
95634
|
//
|
95365
95635
|
//
|
95366
95636
|
//
|
@@ -98432,17 +98702,20 @@ NProgress.configure({ showSpinner: false });
|
|
98432
98702
|
|
98433
98703
|
function createRouter(Vue) {
|
98434
98704
|
// 判断是否已经use过VueRouter
|
98435
|
-
const VueRouterObj = Vue._installedPlugins.
|
98705
|
+
const VueRouterObj = Vue._installedPlugins.find((item) => {
|
98436
98706
|
return item.name === 'VueRouter'
|
98437
98707
|
});
|
98438
|
-
|
98708
|
+
const $z = Vue.prototype.$z;
|
98709
|
+
const routerOption = $z.routerConfig;
|
98710
|
+
if (VueRouterObj) {
|
98711
|
+
if ($z.router) {
|
98712
|
+
Vue.prototype.$z.$router = $z.router;
|
98713
|
+
} else {
|
98714
|
+
console.warn('缺少router参数');
|
98715
|
+
}
|
98716
|
+
} else {
|
98439
98717
|
Vue.use(VueRouter);
|
98440
|
-
|
98441
|
-
const routerObj = $z.router;
|
98442
|
-
const routerOption = $z.routerConfig;
|
98443
|
-
if (routerObj) {
|
98444
|
-
Vue.prototype.$z.$router = routerObj;
|
98445
|
-
} else if (routerOption) {
|
98718
|
+
if (routerOption) {
|
98446
98719
|
const defaultConfig = {
|
98447
98720
|
mode: routerOption.mode || 'history', // 去掉url中的#
|
98448
98721
|
scrollBehavior: () => ({ y: 0 }),
|
@@ -98457,7 +98730,7 @@ function createRouter(Vue) {
|
|
98457
98730
|
NProgress.start();
|
98458
98731
|
const httpOption = $z.http || {};
|
98459
98732
|
const token = getCookie(httpOption.tokenKey || TOKENKEY);
|
98460
|
-
const store = $z
|
98733
|
+
const store = $z.$store;
|
98461
98734
|
if (!routerOption.whiteList) {
|
98462
98735
|
routerOption.whiteList = ['/login', '/register'];
|
98463
98736
|
}
|
@@ -98503,19 +98776,524 @@ function createRouter(Vue) {
|
|
98503
98776
|
NProgress.done();
|
98504
98777
|
}
|
98505
98778
|
});
|
98506
|
-
|
98507
98779
|
Vue.prototype.$z.$router = router;
|
98780
|
+
} else {
|
98781
|
+
console.warn('缺少routerConfig参数');
|
98782
|
+
}
|
98783
|
+
}
|
98784
|
+
|
98785
|
+
console.log(Vue.prototype.$z);
|
98786
|
+
}
|
98787
|
+
|
98788
|
+
function install$3(Vue, option = {}) {
|
98789
|
+
setGolbalData(Vue, option);
|
98790
|
+
createRouter(Vue);
|
98791
|
+
}
|
98792
|
+
|
98793
|
+
var RouterZ = {
|
98794
|
+
install: install$3
|
98795
|
+
};
|
98796
|
+
|
98797
|
+
var rootStore = {
|
98798
|
+
state: {},
|
98799
|
+
getters: {},
|
98800
|
+
mutations: {},
|
98801
|
+
actions: {},
|
98802
|
+
modules: {}
|
98803
|
+
};
|
98804
|
+
|
98805
|
+
function createStore(Vue) {
|
98806
|
+
// Vue.use(Vuex)
|
98807
|
+
// console.log(Vue._installedPlugins)
|
98808
|
+
// 判断是否已经use过VueRouter
|
98809
|
+
const VueStoreObj = Vue._installedPlugins.find((item) => {
|
98810
|
+
return item.Store
|
98811
|
+
});
|
98812
|
+
const $z = Vue.prototype.$z;
|
98813
|
+
const storeOption = $z.storeConfig;
|
98814
|
+
if (VueStoreObj) {
|
98815
|
+
if ($z.store) {
|
98816
|
+
Vue.prototype.$z.$store = $z.store;
|
98817
|
+
} else {
|
98818
|
+
console.warn('缺少store参数');
|
98819
|
+
}
|
98820
|
+
} else {
|
98821
|
+
Vue.use(index$1);
|
98822
|
+
if (storeOption) {
|
98823
|
+
const defaultConfig = rootStore;
|
98824
|
+
Object.assign(defaultConfig, storeOption);
|
98825
|
+
const store = new index$1.Store(defaultConfig);
|
98826
|
+
Vue.prototype.$z.$store = store;
|
98827
|
+
} else {
|
98828
|
+
console.warn('缺少storeConfig参数');
|
98508
98829
|
}
|
98509
98830
|
}
|
98510
98831
|
}
|
98511
98832
|
|
98512
98833
|
const state$4 = {
|
98834
|
+
dict: new Array()
|
98835
|
+
};
|
98836
|
+
const mutations$4 = {
|
98837
|
+
SET_DICT: (state, { key, value }) => {
|
98838
|
+
if (key !== null && key !== '') {
|
98839
|
+
state.dict.push({
|
98840
|
+
key: key,
|
98841
|
+
value: value
|
98842
|
+
});
|
98843
|
+
}
|
98844
|
+
},
|
98845
|
+
REMOVE_DICT: (state, key) => {
|
98846
|
+
try {
|
98847
|
+
for (let i = 0; i < state.dict.length; i++) {
|
98848
|
+
if (state.dict[i].key == key) {
|
98849
|
+
state.dict.splice(i, i);
|
98850
|
+
return true
|
98851
|
+
}
|
98852
|
+
}
|
98853
|
+
} catch (e) {
|
98854
|
+
console.log(e);
|
98855
|
+
}
|
98856
|
+
},
|
98857
|
+
CLEAN_DICT: (state) => {
|
98858
|
+
state.dict = new Array();
|
98859
|
+
}
|
98860
|
+
};
|
98861
|
+
|
98862
|
+
const actions$4 = {
|
98863
|
+
// 设置字典
|
98864
|
+
setDict({ commit }, data) {
|
98865
|
+
commit('SET_DICT', data);
|
98866
|
+
},
|
98867
|
+
// 删除字典
|
98868
|
+
removeDict({ commit }, key) {
|
98869
|
+
commit('REMOVE_DICT', key);
|
98870
|
+
},
|
98871
|
+
// 清空字典
|
98872
|
+
cleanDict({ commit }) {
|
98873
|
+
commit('CLEAN_DICT');
|
98874
|
+
}
|
98875
|
+
};
|
98876
|
+
|
98877
|
+
// 为vuex添加模块,存储dict数据
|
98878
|
+
function registerStateModule$4(store) {
|
98879
|
+
if (!store || !store.hasModule) return
|
98880
|
+
if (!store.hasModule('z-dict')) {
|
98881
|
+
const statesModule = {
|
98882
|
+
namespaced: true,
|
98883
|
+
state: state$4,
|
98884
|
+
mutations: mutations$4,
|
98885
|
+
actions: actions$4
|
98886
|
+
};
|
98887
|
+
store.registerModule('z-dict', statesModule);
|
98888
|
+
}
|
98889
|
+
}
|
98890
|
+
|
98891
|
+
const state$3 = {
|
98892
|
+
sidebar: {
|
98893
|
+
opened: api.get('sidebarStatus') ? !!+api.get('sidebarStatus') : true,
|
98894
|
+
withoutAnimation: false,
|
98895
|
+
hide: false
|
98896
|
+
},
|
98897
|
+
device: 'desktop',
|
98898
|
+
size: api.get('size') || 'medium'
|
98899
|
+
};
|
98900
|
+
|
98901
|
+
const mutations$3 = {
|
98902
|
+
TOGGLE_SIDEBAR: (state) => {
|
98903
|
+
if (state.sidebar.hide) {
|
98904
|
+
return false
|
98905
|
+
}
|
98906
|
+
state.sidebar.opened = !state.sidebar.opened;
|
98907
|
+
state.sidebar.withoutAnimation = false;
|
98908
|
+
if (state.sidebar.opened) {
|
98909
|
+
api.set('sidebarStatus', 1);
|
98910
|
+
} else {
|
98911
|
+
api.set('sidebarStatus', 0);
|
98912
|
+
}
|
98913
|
+
},
|
98914
|
+
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
98915
|
+
api.set('sidebarStatus', 0);
|
98916
|
+
state.sidebar.opened = false;
|
98917
|
+
state.sidebar.withoutAnimation = withoutAnimation;
|
98918
|
+
},
|
98919
|
+
TOGGLE_DEVICE: (state, device) => {
|
98920
|
+
state.device = device;
|
98921
|
+
},
|
98922
|
+
SET_SIZE: (state, size) => {
|
98923
|
+
state.size = size;
|
98924
|
+
api.set('size', size);
|
98925
|
+
},
|
98926
|
+
SET_SIDEBAR_HIDE: (state, status) => {
|
98927
|
+
state.sidebar.hide = status;
|
98928
|
+
}
|
98929
|
+
};
|
98930
|
+
|
98931
|
+
const actions$3 = {
|
98932
|
+
toggleSideBar({ commit }) {
|
98933
|
+
commit('TOGGLE_SIDEBAR');
|
98934
|
+
},
|
98935
|
+
closeSideBar({ commit }, { withoutAnimation }) {
|
98936
|
+
commit('CLOSE_SIDEBAR', withoutAnimation);
|
98937
|
+
},
|
98938
|
+
toggleDevice({ commit }, device) {
|
98939
|
+
commit('TOGGLE_DEVICE', device);
|
98940
|
+
},
|
98941
|
+
setSize({ commit }, size) {
|
98942
|
+
commit('SET_SIZE', size);
|
98943
|
+
},
|
98944
|
+
toggleSideBarHide({ commit }, status) {
|
98945
|
+
commit('SET_SIDEBAR_HIDE', status);
|
98946
|
+
}
|
98947
|
+
};
|
98948
|
+
|
98949
|
+
function registerStateModule$3(store) {
|
98950
|
+
if (!store || !store.hasModule) return
|
98951
|
+
if (!store.hasModule('z-app')) {
|
98952
|
+
const statesModule = {
|
98953
|
+
namespaced: true,
|
98954
|
+
state: state$3,
|
98955
|
+
mutations: mutations$3,
|
98956
|
+
actions: actions$3
|
98957
|
+
};
|
98958
|
+
store.registerModule('z-app', statesModule);
|
98959
|
+
}
|
98960
|
+
}
|
98961
|
+
|
98962
|
+
var settings = {
|
98963
|
+
/**
|
98964
|
+
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
98965
|
+
*/
|
98966
|
+
sideTheme: 'theme-dark',
|
98967
|
+
|
98968
|
+
/**
|
98969
|
+
* 是否系统布局配置
|
98970
|
+
*/
|
98971
|
+
showSettings: false,
|
98972
|
+
|
98973
|
+
/**
|
98974
|
+
* 是否显示顶部导航
|
98975
|
+
*/
|
98976
|
+
topNav: false,
|
98977
|
+
|
98978
|
+
/**
|
98979
|
+
* 是否显示 tagsView
|
98980
|
+
*/
|
98981
|
+
tagsView: true,
|
98982
|
+
|
98983
|
+
/**
|
98984
|
+
* 是否固定头部
|
98985
|
+
*/
|
98986
|
+
fixedHeader: false,
|
98987
|
+
|
98988
|
+
/**
|
98989
|
+
* 是否显示logo
|
98990
|
+
*/
|
98991
|
+
sidebarLogo: true,
|
98992
|
+
|
98993
|
+
/**
|
98994
|
+
* 是否显示动态标题
|
98995
|
+
*/
|
98996
|
+
dynamicTitle: false,
|
98997
|
+
|
98998
|
+
/**
|
98999
|
+
* @type {string | array} 'production' | ['production', 'development']
|
99000
|
+
* @description Need show err logs component.
|
99001
|
+
* The default is only used in the production env
|
99002
|
+
* If you want to also use it in dev, you can pass ['production', 'development']
|
99003
|
+
*/
|
99004
|
+
errorLog: 'production'
|
99005
|
+
};
|
99006
|
+
|
99007
|
+
var defaultSettings = /*@__PURE__*/getDefaultExportFromCjs(settings);
|
99008
|
+
|
99009
|
+
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings;
|
99010
|
+
|
99011
|
+
const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '';
|
99012
|
+
const state$2 = {
|
99013
|
+
title: '',
|
99014
|
+
theme: storageSetting.theme || '#409EFF',
|
99015
|
+
sideTheme: storageSetting.sideTheme || sideTheme,
|
99016
|
+
showSettings: showSettings,
|
99017
|
+
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
|
99018
|
+
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
|
99019
|
+
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
99020
|
+
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
99021
|
+
dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle
|
99022
|
+
};
|
99023
|
+
const mutations$2 = {
|
99024
|
+
CHANGE_SETTING: (state, { key, value }) => {
|
99025
|
+
if (state.hasOwnProperty(key)) {
|
99026
|
+
state[key] = value;
|
99027
|
+
}
|
99028
|
+
}
|
99029
|
+
};
|
99030
|
+
|
99031
|
+
const actions$2 = {
|
99032
|
+
// 修改布局设置
|
99033
|
+
changeSetting({ commit }, data) {
|
99034
|
+
commit('CHANGE_SETTING', data);
|
99035
|
+
},
|
99036
|
+
// 设置网页标题
|
99037
|
+
setTitle({ commit }, title) {
|
99038
|
+
state$2.title = title;
|
99039
|
+
}
|
99040
|
+
};
|
99041
|
+
|
99042
|
+
function registerStateModule$2(store) {
|
99043
|
+
if (!store || !store.hasModule) return
|
99044
|
+
if (!store.hasModule('z-settings')) {
|
99045
|
+
const statesModule = {
|
99046
|
+
namespaced: true,
|
99047
|
+
state: state$2,
|
99048
|
+
mutations: mutations$2,
|
99049
|
+
actions: actions$2
|
99050
|
+
};
|
99051
|
+
store.registerModule('z-settings', statesModule);
|
99052
|
+
}
|
99053
|
+
}
|
99054
|
+
|
99055
|
+
const state$1 = {
|
99056
|
+
visitedViews: [],
|
99057
|
+
cachedViews: [],
|
99058
|
+
iframeViews: []
|
99059
|
+
};
|
99060
|
+
|
99061
|
+
const mutations$1 = {
|
99062
|
+
ADD_IFRAME_VIEW: (state, view) => {
|
99063
|
+
if (state.iframeViews.some((v) => v.path === view.path)) return
|
99064
|
+
state.iframeViews.push(
|
99065
|
+
Object.assign({}, view, {
|
99066
|
+
title: view.meta.title || 'no-name'
|
99067
|
+
})
|
99068
|
+
);
|
99069
|
+
},
|
99070
|
+
ADD_VISITED_VIEW: (state, view) => {
|
99071
|
+
if (state.visitedViews.some((v) => v.path === view.path)) return
|
99072
|
+
state.visitedViews.push(
|
99073
|
+
Object.assign({}, view, {
|
99074
|
+
title: view.meta.title || 'no-name'
|
99075
|
+
})
|
99076
|
+
);
|
99077
|
+
},
|
99078
|
+
ADD_CACHED_VIEW: (state, view) => {
|
99079
|
+
if (state.cachedViews.includes(view.name)) return
|
99080
|
+
if (view.meta && !view.meta.noCache) {
|
99081
|
+
state.cachedViews.push(view.name);
|
99082
|
+
}
|
99083
|
+
},
|
99084
|
+
DEL_VISITED_VIEW: (state, view) => {
|
99085
|
+
for (const [i, v] of state.visitedViews.entries()) {
|
99086
|
+
if (v.path === view.path) {
|
99087
|
+
state.visitedViews.splice(i, 1);
|
99088
|
+
break
|
99089
|
+
}
|
99090
|
+
}
|
99091
|
+
state.iframeViews = state.iframeViews.filter((item) => item.path !== view.path);
|
99092
|
+
},
|
99093
|
+
DEL_IFRAME_VIEW: (state, view) => {
|
99094
|
+
state.iframeViews = state.iframeViews.filter((item) => item.path !== view.path);
|
99095
|
+
},
|
99096
|
+
DEL_CACHED_VIEW: (state, view) => {
|
99097
|
+
const index = state.cachedViews.indexOf(view.name);
|
99098
|
+
index > -1 && state.cachedViews.splice(index, 1);
|
99099
|
+
},
|
99100
|
+
|
99101
|
+
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
|
99102
|
+
state.visitedViews = state.visitedViews.filter((v) => {
|
99103
|
+
return v.meta.affix || v.path === view.path
|
99104
|
+
});
|
99105
|
+
state.iframeViews = state.iframeViews.filter((item) => item.path === view.path);
|
99106
|
+
},
|
99107
|
+
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
99108
|
+
const index = state.cachedViews.indexOf(view.name);
|
99109
|
+
if (index > -1) {
|
99110
|
+
state.cachedViews = state.cachedViews.slice(index, index + 1);
|
99111
|
+
} else {
|
99112
|
+
state.cachedViews = [];
|
99113
|
+
}
|
99114
|
+
},
|
99115
|
+
DEL_ALL_VISITED_VIEWS: (state) => {
|
99116
|
+
// keep affix tags
|
99117
|
+
const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
|
99118
|
+
state.visitedViews = affixTags;
|
99119
|
+
state.iframeViews = [];
|
99120
|
+
},
|
99121
|
+
DEL_ALL_CACHED_VIEWS: (state) => {
|
99122
|
+
state.cachedViews = [];
|
99123
|
+
},
|
99124
|
+
UPDATE_VISITED_VIEW: (state, view) => {
|
99125
|
+
for (let v of state.visitedViews) {
|
99126
|
+
if (v.path === view.path) {
|
99127
|
+
v = Object.assign(v, view);
|
99128
|
+
break
|
99129
|
+
}
|
99130
|
+
}
|
99131
|
+
},
|
99132
|
+
DEL_RIGHT_VIEWS: (state, view) => {
|
99133
|
+
const index = state.visitedViews.findIndex((v) => v.path === view.path);
|
99134
|
+
if (index === -1) {
|
99135
|
+
return
|
99136
|
+
}
|
99137
|
+
state.visitedViews = state.visitedViews.filter((item, idx) => {
|
99138
|
+
if (idx <= index || (item.meta && item.meta.affix)) {
|
99139
|
+
return true
|
99140
|
+
}
|
99141
|
+
const i = state.cachedViews.indexOf(item.name);
|
99142
|
+
if (i > -1) {
|
99143
|
+
state.cachedViews.splice(i, 1);
|
99144
|
+
}
|
99145
|
+
if (item.meta.link) {
|
99146
|
+
const fi = state.iframeViews.findIndex((v) => v.path === item.path);
|
99147
|
+
state.iframeViews.splice(fi, 1);
|
99148
|
+
}
|
99149
|
+
return false
|
99150
|
+
});
|
99151
|
+
},
|
99152
|
+
DEL_LEFT_VIEWS: (state, view) => {
|
99153
|
+
const index = state.visitedViews.findIndex((v) => v.path === view.path);
|
99154
|
+
if (index === -1) {
|
99155
|
+
return
|
99156
|
+
}
|
99157
|
+
state.visitedViews = state.visitedViews.filter((item, idx) => {
|
99158
|
+
if (idx >= index || (item.meta && item.meta.affix)) {
|
99159
|
+
return true
|
99160
|
+
}
|
99161
|
+
const i = state.cachedViews.indexOf(item.name);
|
99162
|
+
if (i > -1) {
|
99163
|
+
state.cachedViews.splice(i, 1);
|
99164
|
+
}
|
99165
|
+
if (item.meta.link) {
|
99166
|
+
const fi = state.iframeViews.findIndex((v) => v.path === item.path);
|
99167
|
+
state.iframeViews.splice(fi, 1);
|
99168
|
+
}
|
99169
|
+
return false
|
99170
|
+
});
|
99171
|
+
}
|
99172
|
+
};
|
99173
|
+
|
99174
|
+
const actions$1 = {
|
99175
|
+
addView({ dispatch }, view) {
|
99176
|
+
dispatch('addVisitedView', view);
|
99177
|
+
dispatch('addCachedView', view);
|
99178
|
+
},
|
99179
|
+
addIframeView({ commit }, view) {
|
99180
|
+
commit('ADD_IFRAME_VIEW', view);
|
99181
|
+
},
|
99182
|
+
addVisitedView({ commit }, view) {
|
99183
|
+
commit('ADD_VISITED_VIEW', view);
|
99184
|
+
},
|
99185
|
+
addCachedView({ commit }, view) {
|
99186
|
+
commit('ADD_CACHED_VIEW', view);
|
99187
|
+
},
|
99188
|
+
delView({ dispatch, state }, view) {
|
99189
|
+
return new Promise((resolve) => {
|
99190
|
+
dispatch('delVisitedView', view);
|
99191
|
+
dispatch('delCachedView', view);
|
99192
|
+
resolve({
|
99193
|
+
visitedViews: [...state.visitedViews],
|
99194
|
+
cachedViews: [...state.cachedViews]
|
99195
|
+
});
|
99196
|
+
})
|
99197
|
+
},
|
99198
|
+
delVisitedView({ commit, state }, view) {
|
99199
|
+
return new Promise((resolve) => {
|
99200
|
+
commit('DEL_VISITED_VIEW', view);
|
99201
|
+
resolve([...state.visitedViews]);
|
99202
|
+
})
|
99203
|
+
},
|
99204
|
+
delIframeView({ commit, state }, view) {
|
99205
|
+
return new Promise((resolve) => {
|
99206
|
+
commit('DEL_IFRAME_VIEW', view);
|
99207
|
+
resolve([...state.iframeViews]);
|
99208
|
+
})
|
99209
|
+
},
|
99210
|
+
delCachedView({ commit, state }, view) {
|
99211
|
+
return new Promise((resolve) => {
|
99212
|
+
commit('DEL_CACHED_VIEW', view);
|
99213
|
+
resolve([...state.cachedViews]);
|
99214
|
+
})
|
99215
|
+
},
|
99216
|
+
delOthersViews({ dispatch, state }, view) {
|
99217
|
+
return new Promise((resolve) => {
|
99218
|
+
dispatch('delOthersVisitedViews', view);
|
99219
|
+
dispatch('delOthersCachedViews', view);
|
99220
|
+
resolve({
|
99221
|
+
visitedViews: [...state.visitedViews],
|
99222
|
+
cachedViews: [...state.cachedViews]
|
99223
|
+
});
|
99224
|
+
})
|
99225
|
+
},
|
99226
|
+
delOthersVisitedViews({ commit, state }, view) {
|
99227
|
+
return new Promise((resolve) => {
|
99228
|
+
commit('DEL_OTHERS_VISITED_VIEWS', view);
|
99229
|
+
resolve([...state.visitedViews]);
|
99230
|
+
})
|
99231
|
+
},
|
99232
|
+
delOthersCachedViews({ commit, state }, view) {
|
99233
|
+
return new Promise((resolve) => {
|
99234
|
+
commit('DEL_OTHERS_CACHED_VIEWS', view);
|
99235
|
+
resolve([...state.cachedViews]);
|
99236
|
+
})
|
99237
|
+
},
|
99238
|
+
delAllViews({ dispatch, state }, view) {
|
99239
|
+
return new Promise((resolve) => {
|
99240
|
+
dispatch('delAllVisitedViews', view);
|
99241
|
+
dispatch('delAllCachedViews', view);
|
99242
|
+
resolve({
|
99243
|
+
visitedViews: [...state.visitedViews],
|
99244
|
+
cachedViews: [...state.cachedViews]
|
99245
|
+
});
|
99246
|
+
})
|
99247
|
+
},
|
99248
|
+
delAllVisitedViews({ commit, state }) {
|
99249
|
+
return new Promise((resolve) => {
|
99250
|
+
commit('DEL_ALL_VISITED_VIEWS');
|
99251
|
+
resolve([...state.visitedViews]);
|
99252
|
+
})
|
99253
|
+
},
|
99254
|
+
delAllCachedViews({ commit, state }) {
|
99255
|
+
return new Promise((resolve) => {
|
99256
|
+
commit('DEL_ALL_CACHED_VIEWS');
|
99257
|
+
resolve([...state.cachedViews]);
|
99258
|
+
})
|
99259
|
+
},
|
99260
|
+
updateVisitedView({ commit }, view) {
|
99261
|
+
commit('UPDATE_VISITED_VIEW', view);
|
99262
|
+
},
|
99263
|
+
delRightTags({ commit }, view) {
|
99264
|
+
return new Promise((resolve) => {
|
99265
|
+
commit('DEL_RIGHT_VIEWS', view);
|
99266
|
+
resolve([...state$1.visitedViews]);
|
99267
|
+
})
|
99268
|
+
},
|
99269
|
+
delLeftTags({ commit }, view) {
|
99270
|
+
return new Promise((resolve) => {
|
99271
|
+
commit('DEL_LEFT_VIEWS', view);
|
99272
|
+
resolve([...state$1.visitedViews]);
|
99273
|
+
})
|
99274
|
+
}
|
99275
|
+
};
|
99276
|
+
|
99277
|
+
function registerStateModule$1(store) {
|
99278
|
+
if (!store || !store.hasModule) return
|
99279
|
+
if (!store.hasModule('z-tagsView')) {
|
99280
|
+
const statesModule = {
|
99281
|
+
namespaced: true,
|
99282
|
+
state: state$1,
|
99283
|
+
mutations: mutations$1,
|
99284
|
+
actions: actions$1
|
99285
|
+
};
|
99286
|
+
store.registerModule('z-tagsView', statesModule);
|
99287
|
+
}
|
99288
|
+
}
|
99289
|
+
|
99290
|
+
const state = {
|
98513
99291
|
token: '',
|
98514
99292
|
userinfo: {},
|
98515
99293
|
roles: [],
|
98516
99294
|
permissions: []
|
98517
99295
|
};
|
98518
|
-
const mutations
|
99296
|
+
const mutations = {
|
98519
99297
|
SET_TOKEN: (state, token) => {
|
98520
99298
|
state.token = token;
|
98521
99299
|
},
|
@@ -98529,7 +99307,7 @@ const mutations$4 = {
|
|
98529
99307
|
state.permissions = permissions;
|
98530
99308
|
}
|
98531
99309
|
};
|
98532
|
-
const actions
|
99310
|
+
const actions = {
|
98533
99311
|
// 登录 todo
|
98534
99312
|
Login({ commit }, userInfo) {},
|
98535
99313
|
|
@@ -98575,29 +99353,32 @@ const actions$4 = {
|
|
98575
99353
|
FedLogOut({ commit }) {}
|
98576
99354
|
};
|
98577
99355
|
|
98578
|
-
function registerStateModule
|
99356
|
+
function registerStateModule(store) {
|
98579
99357
|
if (!store || !store.hasModule) return
|
98580
99358
|
if (!store.hasModule('z-user')) {
|
98581
99359
|
const statesModule = {
|
98582
99360
|
namespaced: true,
|
98583
|
-
state
|
98584
|
-
mutations
|
98585
|
-
actions
|
99361
|
+
state,
|
99362
|
+
mutations,
|
99363
|
+
actions
|
98586
99364
|
};
|
98587
99365
|
store.registerModule('z-user', statesModule);
|
98588
99366
|
}
|
98589
99367
|
}
|
98590
99368
|
|
98591
99369
|
function install$2(Vue, option = {}) {
|
98592
|
-
const z = Vue.prototype.$z;
|
98593
|
-
const store = z.store;
|
98594
|
-
registerStateModule$4(store);
|
98595
|
-
registerStateModule$5(store);
|
98596
99370
|
setGolbalData(Vue, option);
|
98597
|
-
|
99371
|
+
createStore(Vue);
|
99372
|
+
const $store = Vue.prototype.$z.$store;
|
99373
|
+
registerStateModule$4($store);
|
99374
|
+
registerStateModule$3($store);
|
99375
|
+
registerStateModule$5($store);
|
99376
|
+
registerStateModule$2($store);
|
99377
|
+
registerStateModule$1($store);
|
99378
|
+
registerStateModule($store);
|
98598
99379
|
}
|
98599
99380
|
|
98600
|
-
var
|
99381
|
+
var StoreZ = {
|
98601
99382
|
install: install$2
|
98602
99383
|
};
|
98603
99384
|
|
@@ -99483,64 +100264,6 @@ function DataDict (Vue, options) {
|
|
99483
100264
|
});
|
99484
100265
|
}
|
99485
100266
|
|
99486
|
-
const state$3 = {
|
99487
|
-
dict: new Array()
|
99488
|
-
};
|
99489
|
-
const mutations$3 = {
|
99490
|
-
SET_DICT: (state, { key, value }) => {
|
99491
|
-
if (key !== null && key !== '') {
|
99492
|
-
state.dict.push({
|
99493
|
-
key: key,
|
99494
|
-
value: value
|
99495
|
-
});
|
99496
|
-
}
|
99497
|
-
},
|
99498
|
-
REMOVE_DICT: (state, key) => {
|
99499
|
-
try {
|
99500
|
-
for (let i = 0; i < state.dict.length; i++) {
|
99501
|
-
if (state.dict[i].key == key) {
|
99502
|
-
state.dict.splice(i, i);
|
99503
|
-
return true
|
99504
|
-
}
|
99505
|
-
}
|
99506
|
-
} catch (e) {
|
99507
|
-
console.log(e);
|
99508
|
-
}
|
99509
|
-
},
|
99510
|
-
CLEAN_DICT: (state) => {
|
99511
|
-
state.dict = new Array();
|
99512
|
-
}
|
99513
|
-
};
|
99514
|
-
|
99515
|
-
const actions$3 = {
|
99516
|
-
// 设置字典
|
99517
|
-
setDict({ commit }, data) {
|
99518
|
-
commit('SET_DICT', data);
|
99519
|
-
},
|
99520
|
-
// 删除字典
|
99521
|
-
removeDict({ commit }, key) {
|
99522
|
-
commit('REMOVE_DICT', key);
|
99523
|
-
},
|
99524
|
-
// 清空字典
|
99525
|
-
cleanDict({ commit }) {
|
99526
|
-
commit('CLEAN_DICT');
|
99527
|
-
}
|
99528
|
-
};
|
99529
|
-
|
99530
|
-
// 为vuex添加模块,存储dict数据
|
99531
|
-
function registerStateModule$3(store) {
|
99532
|
-
if (!store || !store.hasModule) return
|
99533
|
-
if (!store.hasModule('z-dict')) {
|
99534
|
-
const statesModule = {
|
99535
|
-
namespaced: true,
|
99536
|
-
state: state$3,
|
99537
|
-
mutations: mutations$3,
|
99538
|
-
actions: actions$3
|
99539
|
-
};
|
99540
|
-
store.registerModule('z-dict', statesModule);
|
99541
|
-
}
|
99542
|
-
}
|
99543
|
-
|
99544
100267
|
function searchDictByKey(dict, key) {
|
99545
100268
|
if (key == null && key == '') {
|
99546
100269
|
return null
|
@@ -99560,11 +100283,7 @@ function install$1(Vue, option = {}) {
|
|
99560
100283
|
setGolbalData(Vue, option);
|
99561
100284
|
const z = Vue.prototype.$z;
|
99562
100285
|
const dictOption = (z && z.dict) || {};
|
99563
|
-
const store = z
|
99564
|
-
if (!store) {
|
99565
|
-
console.warn('缺少store参数');
|
99566
|
-
}
|
99567
|
-
registerStateModule$3(store);
|
100286
|
+
const store = z.$store;
|
99568
100287
|
let getDicts = function (dictType) {
|
99569
100288
|
const $http = Vue.prototype.$z.$http;
|
99570
100289
|
if ($http) {
|
@@ -99972,421 +100691,18 @@ __vue_component__$e.install = function (Vue, option = {}) {
|
|
99972
100691
|
Vue.component(__vue_component__$e.name, __vue_component__$e);
|
99973
100692
|
};
|
99974
100693
|
|
99975
|
-
var settings = {
|
99976
|
-
/**
|
99977
|
-
* 侧边栏主题 深色主题theme-dark,浅色主题theme-light
|
99978
|
-
*/
|
99979
|
-
sideTheme: 'theme-dark',
|
99980
|
-
|
99981
|
-
/**
|
99982
|
-
* 是否系统布局配置
|
99983
|
-
*/
|
99984
|
-
showSettings: false,
|
99985
|
-
|
99986
|
-
/**
|
99987
|
-
* 是否显示顶部导航
|
99988
|
-
*/
|
99989
|
-
topNav: false,
|
99990
|
-
|
99991
|
-
/**
|
99992
|
-
* 是否显示 tagsView
|
99993
|
-
*/
|
99994
|
-
tagsView: true,
|
99995
|
-
|
99996
|
-
/**
|
99997
|
-
* 是否固定头部
|
99998
|
-
*/
|
99999
|
-
fixedHeader: false,
|
100000
|
-
|
100001
|
-
/**
|
100002
|
-
* 是否显示logo
|
100003
|
-
*/
|
100004
|
-
sidebarLogo: true,
|
100005
|
-
|
100006
|
-
/**
|
100007
|
-
* 是否显示动态标题
|
100008
|
-
*/
|
100009
|
-
dynamicTitle: false,
|
100010
|
-
|
100011
|
-
/**
|
100012
|
-
* @type {string | array} 'production' | ['production', 'development']
|
100013
|
-
* @description Need show err logs component.
|
100014
|
-
* The default is only used in the production env
|
100015
|
-
* If you want to also use it in dev, you can pass ['production', 'development']
|
100016
|
-
*/
|
100017
|
-
errorLog: 'production'
|
100018
|
-
};
|
100019
|
-
|
100020
|
-
var defaultSettings = /*@__PURE__*/getDefaultExportFromCjs(settings);
|
100021
|
-
|
100022
|
-
const { sideTheme, showSettings, topNav, tagsView, fixedHeader, sidebarLogo, dynamicTitle } = defaultSettings;
|
100023
|
-
|
100024
|
-
const storageSetting = JSON.parse(localStorage.getItem('layout-setting')) || '';
|
100025
|
-
const state$2 = {
|
100026
|
-
title: '',
|
100027
|
-
theme: storageSetting.theme || '#409EFF',
|
100028
|
-
sideTheme: storageSetting.sideTheme || sideTheme,
|
100029
|
-
showSettings: showSettings,
|
100030
|
-
topNav: storageSetting.topNav === undefined ? topNav : storageSetting.topNav,
|
100031
|
-
tagsView: storageSetting.tagsView === undefined ? tagsView : storageSetting.tagsView,
|
100032
|
-
fixedHeader: storageSetting.fixedHeader === undefined ? fixedHeader : storageSetting.fixedHeader,
|
100033
|
-
sidebarLogo: storageSetting.sidebarLogo === undefined ? sidebarLogo : storageSetting.sidebarLogo,
|
100034
|
-
dynamicTitle: storageSetting.dynamicTitle === undefined ? dynamicTitle : storageSetting.dynamicTitle
|
100035
|
-
};
|
100036
|
-
const mutations$2 = {
|
100037
|
-
CHANGE_SETTING: (state, { key, value }) => {
|
100038
|
-
if (state.hasOwnProperty(key)) {
|
100039
|
-
state[key] = value;
|
100040
|
-
}
|
100041
|
-
}
|
100042
|
-
};
|
100043
|
-
|
100044
|
-
const actions$2 = {
|
100045
|
-
// 修改布局设置
|
100046
|
-
changeSetting({ commit }, data) {
|
100047
|
-
commit('CHANGE_SETTING', data);
|
100048
|
-
},
|
100049
|
-
// 设置网页标题
|
100050
|
-
setTitle({ commit }, title) {
|
100051
|
-
state$2.title = title;
|
100052
|
-
}
|
100053
|
-
};
|
100054
|
-
|
100055
|
-
function registerStateModule$2(store) {
|
100056
|
-
if (!store || !store.hasModule) return
|
100057
|
-
if (!store.hasModule('z-settings')) {
|
100058
|
-
const statesModule = {
|
100059
|
-
namespaced: true,
|
100060
|
-
state: state$2,
|
100061
|
-
mutations: mutations$2,
|
100062
|
-
actions: actions$2
|
100063
|
-
};
|
100064
|
-
store.registerModule('z-settings', statesModule);
|
100065
|
-
}
|
100066
|
-
}
|
100067
|
-
|
100068
|
-
const state$1 = {
|
100069
|
-
sidebar: {
|
100070
|
-
opened: api.get('sidebarStatus') ? !!+api.get('sidebarStatus') : true,
|
100071
|
-
withoutAnimation: false,
|
100072
|
-
hide: false
|
100073
|
-
},
|
100074
|
-
device: 'desktop',
|
100075
|
-
size: api.get('size') || 'medium'
|
100076
|
-
};
|
100077
|
-
|
100078
|
-
const mutations$1 = {
|
100079
|
-
TOGGLE_SIDEBAR: (state) => {
|
100080
|
-
if (state.sidebar.hide) {
|
100081
|
-
return false
|
100082
|
-
}
|
100083
|
-
state.sidebar.opened = !state.sidebar.opened;
|
100084
|
-
state.sidebar.withoutAnimation = false;
|
100085
|
-
if (state.sidebar.opened) {
|
100086
|
-
api.set('sidebarStatus', 1);
|
100087
|
-
} else {
|
100088
|
-
api.set('sidebarStatus', 0);
|
100089
|
-
}
|
100090
|
-
},
|
100091
|
-
CLOSE_SIDEBAR: (state, withoutAnimation) => {
|
100092
|
-
api.set('sidebarStatus', 0);
|
100093
|
-
state.sidebar.opened = false;
|
100094
|
-
state.sidebar.withoutAnimation = withoutAnimation;
|
100095
|
-
},
|
100096
|
-
TOGGLE_DEVICE: (state, device) => {
|
100097
|
-
state.device = device;
|
100098
|
-
},
|
100099
|
-
SET_SIZE: (state, size) => {
|
100100
|
-
state.size = size;
|
100101
|
-
api.set('size', size);
|
100102
|
-
},
|
100103
|
-
SET_SIDEBAR_HIDE: (state, status) => {
|
100104
|
-
state.sidebar.hide = status;
|
100105
|
-
}
|
100106
|
-
};
|
100107
|
-
|
100108
|
-
const actions$1 = {
|
100109
|
-
toggleSideBar({ commit }) {
|
100110
|
-
commit('TOGGLE_SIDEBAR');
|
100111
|
-
},
|
100112
|
-
closeSideBar({ commit }, { withoutAnimation }) {
|
100113
|
-
commit('CLOSE_SIDEBAR', withoutAnimation);
|
100114
|
-
},
|
100115
|
-
toggleDevice({ commit }, device) {
|
100116
|
-
commit('TOGGLE_DEVICE', device);
|
100117
|
-
},
|
100118
|
-
setSize({ commit }, size) {
|
100119
|
-
commit('SET_SIZE', size);
|
100120
|
-
},
|
100121
|
-
toggleSideBarHide({ commit }, status) {
|
100122
|
-
commit('SET_SIDEBAR_HIDE', status);
|
100123
|
-
}
|
100124
|
-
};
|
100125
|
-
|
100126
|
-
function registerStateModule$1(store) {
|
100127
|
-
if (!store || !store.hasModule) return
|
100128
|
-
if (!store.hasModule('z-app')) {
|
100129
|
-
const statesModule = {
|
100130
|
-
namespaced: true,
|
100131
|
-
state: state$1,
|
100132
|
-
mutations: mutations$1,
|
100133
|
-
actions: actions$1
|
100134
|
-
};
|
100135
|
-
store.registerModule('z-app', statesModule);
|
100136
|
-
}
|
100137
|
-
}
|
100138
|
-
|
100139
|
-
const state = {
|
100140
|
-
visitedViews: [],
|
100141
|
-
cachedViews: [],
|
100142
|
-
iframeViews: []
|
100143
|
-
};
|
100144
|
-
|
100145
|
-
const mutations = {
|
100146
|
-
ADD_IFRAME_VIEW: (state, view) => {
|
100147
|
-
if (state.iframeViews.some((v) => v.path === view.path)) return
|
100148
|
-
state.iframeViews.push(
|
100149
|
-
Object.assign({}, view, {
|
100150
|
-
title: view.meta.title || 'no-name'
|
100151
|
-
})
|
100152
|
-
);
|
100153
|
-
},
|
100154
|
-
ADD_VISITED_VIEW: (state, view) => {
|
100155
|
-
if (state.visitedViews.some((v) => v.path === view.path)) return
|
100156
|
-
state.visitedViews.push(
|
100157
|
-
Object.assign({}, view, {
|
100158
|
-
title: view.meta.title || 'no-name'
|
100159
|
-
})
|
100160
|
-
);
|
100161
|
-
},
|
100162
|
-
ADD_CACHED_VIEW: (state, view) => {
|
100163
|
-
if (state.cachedViews.includes(view.name)) return
|
100164
|
-
if (view.meta && !view.meta.noCache) {
|
100165
|
-
state.cachedViews.push(view.name);
|
100166
|
-
}
|
100167
|
-
},
|
100168
|
-
DEL_VISITED_VIEW: (state, view) => {
|
100169
|
-
for (const [i, v] of state.visitedViews.entries()) {
|
100170
|
-
if (v.path === view.path) {
|
100171
|
-
state.visitedViews.splice(i, 1);
|
100172
|
-
break
|
100173
|
-
}
|
100174
|
-
}
|
100175
|
-
state.iframeViews = state.iframeViews.filter((item) => item.path !== view.path);
|
100176
|
-
},
|
100177
|
-
DEL_IFRAME_VIEW: (state, view) => {
|
100178
|
-
state.iframeViews = state.iframeViews.filter((item) => item.path !== view.path);
|
100179
|
-
},
|
100180
|
-
DEL_CACHED_VIEW: (state, view) => {
|
100181
|
-
const index = state.cachedViews.indexOf(view.name);
|
100182
|
-
index > -1 && state.cachedViews.splice(index, 1);
|
100183
|
-
},
|
100184
|
-
|
100185
|
-
DEL_OTHERS_VISITED_VIEWS: (state, view) => {
|
100186
|
-
state.visitedViews = state.visitedViews.filter((v) => {
|
100187
|
-
return v.meta.affix || v.path === view.path
|
100188
|
-
});
|
100189
|
-
state.iframeViews = state.iframeViews.filter((item) => item.path === view.path);
|
100190
|
-
},
|
100191
|
-
DEL_OTHERS_CACHED_VIEWS: (state, view) => {
|
100192
|
-
const index = state.cachedViews.indexOf(view.name);
|
100193
|
-
if (index > -1) {
|
100194
|
-
state.cachedViews = state.cachedViews.slice(index, index + 1);
|
100195
|
-
} else {
|
100196
|
-
state.cachedViews = [];
|
100197
|
-
}
|
100198
|
-
},
|
100199
|
-
DEL_ALL_VISITED_VIEWS: (state) => {
|
100200
|
-
// keep affix tags
|
100201
|
-
const affixTags = state.visitedViews.filter((tag) => tag.meta.affix);
|
100202
|
-
state.visitedViews = affixTags;
|
100203
|
-
state.iframeViews = [];
|
100204
|
-
},
|
100205
|
-
DEL_ALL_CACHED_VIEWS: (state) => {
|
100206
|
-
state.cachedViews = [];
|
100207
|
-
},
|
100208
|
-
UPDATE_VISITED_VIEW: (state, view) => {
|
100209
|
-
for (let v of state.visitedViews) {
|
100210
|
-
if (v.path === view.path) {
|
100211
|
-
v = Object.assign(v, view);
|
100212
|
-
break
|
100213
|
-
}
|
100214
|
-
}
|
100215
|
-
},
|
100216
|
-
DEL_RIGHT_VIEWS: (state, view) => {
|
100217
|
-
const index = state.visitedViews.findIndex((v) => v.path === view.path);
|
100218
|
-
if (index === -1) {
|
100219
|
-
return
|
100220
|
-
}
|
100221
|
-
state.visitedViews = state.visitedViews.filter((item, idx) => {
|
100222
|
-
if (idx <= index || (item.meta && item.meta.affix)) {
|
100223
|
-
return true
|
100224
|
-
}
|
100225
|
-
const i = state.cachedViews.indexOf(item.name);
|
100226
|
-
if (i > -1) {
|
100227
|
-
state.cachedViews.splice(i, 1);
|
100228
|
-
}
|
100229
|
-
if (item.meta.link) {
|
100230
|
-
const fi = state.iframeViews.findIndex((v) => v.path === item.path);
|
100231
|
-
state.iframeViews.splice(fi, 1);
|
100232
|
-
}
|
100233
|
-
return false
|
100234
|
-
});
|
100235
|
-
},
|
100236
|
-
DEL_LEFT_VIEWS: (state, view) => {
|
100237
|
-
const index = state.visitedViews.findIndex((v) => v.path === view.path);
|
100238
|
-
if (index === -1) {
|
100239
|
-
return
|
100240
|
-
}
|
100241
|
-
state.visitedViews = state.visitedViews.filter((item, idx) => {
|
100242
|
-
if (idx >= index || (item.meta && item.meta.affix)) {
|
100243
|
-
return true
|
100244
|
-
}
|
100245
|
-
const i = state.cachedViews.indexOf(item.name);
|
100246
|
-
if (i > -1) {
|
100247
|
-
state.cachedViews.splice(i, 1);
|
100248
|
-
}
|
100249
|
-
if (item.meta.link) {
|
100250
|
-
const fi = state.iframeViews.findIndex((v) => v.path === item.path);
|
100251
|
-
state.iframeViews.splice(fi, 1);
|
100252
|
-
}
|
100253
|
-
return false
|
100254
|
-
});
|
100255
|
-
}
|
100256
|
-
};
|
100257
|
-
|
100258
|
-
const actions = {
|
100259
|
-
addView({ dispatch }, view) {
|
100260
|
-
dispatch('addVisitedView', view);
|
100261
|
-
dispatch('addCachedView', view);
|
100262
|
-
},
|
100263
|
-
addIframeView({ commit }, view) {
|
100264
|
-
commit('ADD_IFRAME_VIEW', view);
|
100265
|
-
},
|
100266
|
-
addVisitedView({ commit }, view) {
|
100267
|
-
commit('ADD_VISITED_VIEW', view);
|
100268
|
-
},
|
100269
|
-
addCachedView({ commit }, view) {
|
100270
|
-
commit('ADD_CACHED_VIEW', view);
|
100271
|
-
},
|
100272
|
-
delView({ dispatch, state }, view) {
|
100273
|
-
return new Promise((resolve) => {
|
100274
|
-
dispatch('delVisitedView', view);
|
100275
|
-
dispatch('delCachedView', view);
|
100276
|
-
resolve({
|
100277
|
-
visitedViews: [...state.visitedViews],
|
100278
|
-
cachedViews: [...state.cachedViews]
|
100279
|
-
});
|
100280
|
-
})
|
100281
|
-
},
|
100282
|
-
delVisitedView({ commit, state }, view) {
|
100283
|
-
return new Promise((resolve) => {
|
100284
|
-
commit('DEL_VISITED_VIEW', view);
|
100285
|
-
resolve([...state.visitedViews]);
|
100286
|
-
})
|
100287
|
-
},
|
100288
|
-
delIframeView({ commit, state }, view) {
|
100289
|
-
return new Promise((resolve) => {
|
100290
|
-
commit('DEL_IFRAME_VIEW', view);
|
100291
|
-
resolve([...state.iframeViews]);
|
100292
|
-
})
|
100293
|
-
},
|
100294
|
-
delCachedView({ commit, state }, view) {
|
100295
|
-
return new Promise((resolve) => {
|
100296
|
-
commit('DEL_CACHED_VIEW', view);
|
100297
|
-
resolve([...state.cachedViews]);
|
100298
|
-
})
|
100299
|
-
},
|
100300
|
-
delOthersViews({ dispatch, state }, view) {
|
100301
|
-
return new Promise((resolve) => {
|
100302
|
-
dispatch('delOthersVisitedViews', view);
|
100303
|
-
dispatch('delOthersCachedViews', view);
|
100304
|
-
resolve({
|
100305
|
-
visitedViews: [...state.visitedViews],
|
100306
|
-
cachedViews: [...state.cachedViews]
|
100307
|
-
});
|
100308
|
-
})
|
100309
|
-
},
|
100310
|
-
delOthersVisitedViews({ commit, state }, view) {
|
100311
|
-
return new Promise((resolve) => {
|
100312
|
-
commit('DEL_OTHERS_VISITED_VIEWS', view);
|
100313
|
-
resolve([...state.visitedViews]);
|
100314
|
-
})
|
100315
|
-
},
|
100316
|
-
delOthersCachedViews({ commit, state }, view) {
|
100317
|
-
return new Promise((resolve) => {
|
100318
|
-
commit('DEL_OTHERS_CACHED_VIEWS', view);
|
100319
|
-
resolve([...state.cachedViews]);
|
100320
|
-
})
|
100321
|
-
},
|
100322
|
-
delAllViews({ dispatch, state }, view) {
|
100323
|
-
return new Promise((resolve) => {
|
100324
|
-
dispatch('delAllVisitedViews', view);
|
100325
|
-
dispatch('delAllCachedViews', view);
|
100326
|
-
resolve({
|
100327
|
-
visitedViews: [...state.visitedViews],
|
100328
|
-
cachedViews: [...state.cachedViews]
|
100329
|
-
});
|
100330
|
-
})
|
100331
|
-
},
|
100332
|
-
delAllVisitedViews({ commit, state }) {
|
100333
|
-
return new Promise((resolve) => {
|
100334
|
-
commit('DEL_ALL_VISITED_VIEWS');
|
100335
|
-
resolve([...state.visitedViews]);
|
100336
|
-
})
|
100337
|
-
},
|
100338
|
-
delAllCachedViews({ commit, state }) {
|
100339
|
-
return new Promise((resolve) => {
|
100340
|
-
commit('DEL_ALL_CACHED_VIEWS');
|
100341
|
-
resolve([...state.cachedViews]);
|
100342
|
-
})
|
100343
|
-
},
|
100344
|
-
updateVisitedView({ commit }, view) {
|
100345
|
-
commit('UPDATE_VISITED_VIEW', view);
|
100346
|
-
},
|
100347
|
-
delRightTags({ commit }, view) {
|
100348
|
-
return new Promise((resolve) => {
|
100349
|
-
commit('DEL_RIGHT_VIEWS', view);
|
100350
|
-
resolve([...state.visitedViews]);
|
100351
|
-
})
|
100352
|
-
},
|
100353
|
-
delLeftTags({ commit }, view) {
|
100354
|
-
return new Promise((resolve) => {
|
100355
|
-
commit('DEL_LEFT_VIEWS', view);
|
100356
|
-
resolve([...state.visitedViews]);
|
100357
|
-
})
|
100358
|
-
}
|
100359
|
-
};
|
100360
|
-
|
100361
|
-
function registerStateModule(store) {
|
100362
|
-
if (!store || !store.hasModule) return
|
100363
|
-
if (!store.hasModule('z-tagsView')) {
|
100364
|
-
const statesModule = {
|
100365
|
-
namespaced: true,
|
100366
|
-
state,
|
100367
|
-
mutations,
|
100368
|
-
actions
|
100369
|
-
};
|
100370
|
-
store.registerModule('z-tagsView', statesModule);
|
100371
|
-
}
|
100372
|
-
}
|
100373
|
-
|
100374
100694
|
__vue_component__$j.install = function (Vue, option = {}) {
|
100375
100695
|
setGolbalData(Vue, option);
|
100376
100696
|
Vue.component(__vue_component__$j.name, __vue_component__$j);
|
100377
|
-
const z = Vue.prototype.$z;
|
100378
|
-
const store = z.store;
|
100379
|
-
registerStateModule$2(store);
|
100380
|
-
registerStateModule$1(store);
|
100381
|
-
registerStateModule(store);
|
100382
100697
|
};
|
100383
100698
|
|
100384
100699
|
// import store from '@/store'
|
100385
100700
|
// import router from '@/router';
|
100386
100701
|
|
100387
100702
|
function tab (Vue, option) {
|
100388
|
-
console.log(Vue.prototype.$z
|
100389
|
-
|
100703
|
+
console.log(Vue.prototype.$z.$store);
|
100704
|
+
console.log(444);
|
100705
|
+
const store = Vue.prototype.$z.$store;
|
100390
100706
|
const router = Vue.prototype.$z.$router;
|
100391
100707
|
return {
|
100392
100708
|
// 刷新当前tab页签
|
@@ -101464,6 +101780,7 @@ const components = [
|
|
101464
101780
|
__vue_component__$B,
|
101465
101781
|
__vue_component__,
|
101466
101782
|
RequestZ,
|
101783
|
+
StoreZ,
|
101467
101784
|
RouterZ,
|
101468
101785
|
__vue_component__$h,
|
101469
101786
|
__vue_component__$g,
|
@@ -101518,6 +101835,7 @@ exports.RequestZ = RequestZ;
|
|
101518
101835
|
exports.RouterZ = RouterZ;
|
101519
101836
|
exports.RowZ = __vue_component__$3;
|
101520
101837
|
exports.SelectZ = __vue_component__$2;
|
101838
|
+
exports.StoreZ = StoreZ;
|
101521
101839
|
exports.TableZ = __vue_component__$h;
|
101522
101840
|
exports.UploadZ = __vue_component__$1;
|
101523
101841
|
exports.default = index;
|