@v2coding/ui 0.1.42 → 0.1.43
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/v2coding-ui.esm.js +34 -11
- package/dist/v2coding-ui.min.js +2 -2
- package/dist/v2coding-ui.ssr.js +182 -160
- package/package.json +1 -1
package/dist/v2coding-ui.esm.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { fromJS, is } from 'immutable';
|
|
2
2
|
import { merge, debounce, throttle } from 'lodash';
|
|
3
|
+
import Vue from 'vue';
|
|
3
4
|
import axios from 'axios';
|
|
4
5
|
import to from 'await-to-js';
|
|
5
6
|
import { Message, TableColumn as TableColumn$1 } from 'element-ui';
|
|
@@ -268,13 +269,14 @@ const init$2 = function (Vue) {
|
|
|
268
269
|
downloadInstance.interceptors.request.use(onRequestSuccess);
|
|
269
270
|
downloadInstance.interceptors.response.use(onResponseSuccess, onResponseError);
|
|
270
271
|
instance.download = initDownload(downloadInstance);
|
|
272
|
+
instance.downloadServer = downloadInstance;
|
|
271
273
|
Vue.prototype.$axios = instance;
|
|
272
274
|
return instance;
|
|
273
275
|
};
|
|
274
276
|
|
|
275
277
|
const getInstance = () => {
|
|
276
278
|
if (!instance) {
|
|
277
|
-
return init$2();
|
|
279
|
+
return init$2(Vue);
|
|
278
280
|
}
|
|
279
281
|
|
|
280
282
|
return instance;
|
|
@@ -337,7 +339,7 @@ const init$1 = function (Vue) {
|
|
|
337
339
|
|
|
338
340
|
const getStore = () => {
|
|
339
341
|
if (!store) {
|
|
340
|
-
return init$1();
|
|
342
|
+
return init$1(Vue);
|
|
341
343
|
}
|
|
342
344
|
|
|
343
345
|
return store;
|
|
@@ -432,7 +434,7 @@ const init = function (Vue) {
|
|
|
432
434
|
|
|
433
435
|
const getRouter = () => {
|
|
434
436
|
if (!router) {
|
|
435
|
-
return init();
|
|
437
|
+
return init(Vue);
|
|
436
438
|
}
|
|
437
439
|
|
|
438
440
|
return router;
|
|
@@ -562,10 +564,15 @@ var Config = {
|
|
|
562
564
|
let config = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
563
565
|
config = Objects.isObject(config) ? config : {};
|
|
564
566
|
setting = Objects.merge({}, DefaultSetting$1, config);
|
|
565
|
-
Axios.init(Vue, setting);
|
|
566
|
-
Store.init(Vue, setting);
|
|
567
|
-
Router.init(Vue, setting);
|
|
567
|
+
const axios = Axios.init(Vue, setting);
|
|
568
|
+
const store = Store.init(Vue, setting);
|
|
569
|
+
const router = Router.init(Vue, setting);
|
|
568
570
|
Iconfont.init();
|
|
571
|
+
return {
|
|
572
|
+
axios,
|
|
573
|
+
store,
|
|
574
|
+
router
|
|
575
|
+
};
|
|
569
576
|
}
|
|
570
577
|
};
|
|
571
578
|
const getSetting = () => {
|
|
@@ -12653,11 +12660,27 @@ var mixin = {
|
|
|
12653
12660
|
|
|
12654
12661
|
var index = {
|
|
12655
12662
|
install: (Vue, opt) => {
|
|
12656
|
-
|
|
12657
|
-
|
|
12658
|
-
|
|
12659
|
-
|
|
12660
|
-
|
|
12663
|
+
const {
|
|
12664
|
+
onReady,
|
|
12665
|
+
...options
|
|
12666
|
+
} = opt;
|
|
12667
|
+
const {
|
|
12668
|
+
axios,
|
|
12669
|
+
store,
|
|
12670
|
+
router
|
|
12671
|
+
} = Config.init(Vue, options);
|
|
12672
|
+
Vue.use(Plugins, options);
|
|
12673
|
+
Vue.use(Mixins, options);
|
|
12674
|
+
Vue.use(Directives, options);
|
|
12675
|
+
Vue.use(Components, options);
|
|
12676
|
+
|
|
12677
|
+
if (typeof onReady === 'function') {
|
|
12678
|
+
onReady({
|
|
12679
|
+
axios,
|
|
12680
|
+
store,
|
|
12681
|
+
router
|
|
12682
|
+
});
|
|
12683
|
+
}
|
|
12661
12684
|
},
|
|
12662
12685
|
Components: ComponentList
|
|
12663
12686
|
};
|