meixioacomponent 1.1.38 → 1.1.40

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.
Files changed (49) hide show
  1. package/lib/components/base/baseGuide/GuideControl.d.ts +44 -44
  2. package/lib/components/base/baseGuide/GuideControl.js +238 -238
  3. package/lib/components/dynamicmount/DynamicMountClass.d.ts +15 -15
  4. package/lib/components/dynamicmount/DynamicMountClass.js +65 -65
  5. package/lib/components/dynamicmount/index.d.ts +4 -4
  6. package/lib/components/dynamicmount/index.js +71 -71
  7. package/lib/components/index.d.ts +104 -104
  8. package/lib/components/index.js +221 -221
  9. package/lib/config/LinkViewClass.d.ts +56 -56
  10. package/lib/config/LinkViewClass.js +154 -154
  11. package/lib/config/componentConfig.d.ts +3 -3
  12. package/lib/config/componentConfig.js +71 -71
  13. package/lib/config/uploadRequest.d.ts +2 -2
  14. package/lib/config/uploadRequest.js +87 -87
  15. package/lib/config/use/UseGuide.d.ts +8 -8
  16. package/lib/config/use/UseGuide.js +33 -33
  17. package/lib/config/use/UseImg.d.ts +9 -9
  18. package/lib/config/use/UseImg.js +41 -41
  19. package/lib/config/use/UseUpload.d.ts +12 -12
  20. package/lib/config/use/UseUpload.js +79 -79
  21. package/lib/config/use/UseViewVideo.d.ts +11 -11
  22. package/lib/config/use/UseViewVideo.js +41 -41
  23. package/lib/config/use/WaitPlugin.d.ts +25 -25
  24. package/lib/config/use/WaitPlugin.js +106 -106
  25. package/lib/config/use/useWait.d.ts +4 -4
  26. package/lib/config/use/useWait.js +21 -21
  27. package/lib/meixioacomponent.common.js +41937 -41938
  28. package/lib/meixioacomponent.umd.js +41971 -41972
  29. package/lib/meixioacomponent.umd.min.js +28 -28
  30. package/lib/typings/type.d.ts +394 -394
  31. package/lib/typings/type.js +2 -2
  32. package/lib/useType/useType.d.ts +27 -27
  33. package/lib/useType/useType.js +89 -89
  34. package/package.json +1 -1
  35. package/packages/components/base/baseNumberInput/index.vue +9 -13
  36. package/packages/components/base/baseText/index.vue +2 -1
  37. package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
  38. package/packages/components/dynamicmount/index.js +69 -69
  39. package/packages/components/index.js +218 -218
  40. package/packages/config/LinkViewClass.js +152 -152
  41. package/packages/config/componentConfig.js +68 -68
  42. package/packages/config/use/UseGuide.js +43 -43
  43. package/packages/config/use/UseImg.js +41 -41
  44. package/packages/config/use/UseUpload.js +80 -80
  45. package/packages/config/use/UseViewVideo.js +40 -40
  46. package/packages/config/use/WaitPlugin.js +106 -106
  47. package/packages/config/use/useWait.js +18 -18
  48. package/packages/typings/type.js +2 -2
  49. package/packages/useType/useType.js +90 -90
@@ -1,152 +1,152 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var utils_1 = require("../utils/utils");
4
- var componentConfig_1 = require("./componentConfig");
5
- var LinkViewClass = /** @class */ (function () {
6
- function LinkViewClass(params) {
7
- this.delFn = null;
8
- this.exportFn = null;
9
- this.tableData = [];
10
- this.pageProps = {
11
- size: 15, total: 100, current: 1
12
- };
13
- this.pageConfig = null;
14
- this.activeIndex = 0;
15
- this.tablePermission = {
16
- key: "", value: true
17
- };
18
- this.editPermission = {
19
- key: "", value: true
20
- };
21
- this.delPermission = {
22
- key: "", value: true
23
- };
24
- this.addPermission = {
25
- key: "", value: true
26
- };
27
- this.refreshTableData = null;
28
- this.drawerInstance = null;
29
- this.superDrawerMountedCallback = null;
30
- this.isLocalTablePagination = null;
31
- this.init(params);
32
- this.setPermissions(params);
33
- }
34
- LinkViewClass.prototype.setPermissions = function (param) {
35
- var permissions = param.permissions;
36
- if (permissions) {
37
- this.tablePermission.key = permissions[0];
38
- this.addPermission.key = permissions[1];
39
- this.editPermission.key = permissions[2];
40
- this.delPermission.key = permissions[3];
41
- }
42
- this.jugePermission();
43
- };
44
- LinkViewClass.prototype.jugePermission = function () {
45
- var _a = this, tablePermission = _a.tablePermission, addPermission = _a.addPermission, editPermission = _a.editPermission, delPermission = _a.delPermission;
46
- var permissionList = componentConfig_1["default"].store["getters"]["permissions"];
47
- tablePermission.value = (0, utils_1.judgeButtonPermission)(permissionList, tablePermission.key);
48
- editPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, editPermission.key);
49
- delPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, delPermission.key);
50
- addPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, addPermission.key);
51
- };
52
- LinkViewClass.prototype.init = function (params) {
53
- this.tableData = [];
54
- this.activeIndex = 0;
55
- this.refreshTableData = null;
56
- this.setPageProps(params);
57
- this.pageConfig = {
58
- size: "size", page: "current", total: "total"
59
- };
60
- };
61
- LinkViewClass.prototype.setPageProps = function (params) {
62
- try {
63
- var isLocalTablePagination = params["isLocalTablePagination"];
64
- if (!isLocalTablePagination) {
65
- this.setDefaultPageProps();
66
- }
67
- else {
68
- this.isLocalTablePagination = isLocalTablePagination;
69
- var localTablePagination = window.localStorage.getItem('LocalTablePagination');
70
- if (localTablePagination) {
71
- var localTablePaginationObj = JSON.parse(localTablePagination);
72
- var value = localTablePaginationObj["".concat(isLocalTablePagination)];
73
- if (value) {
74
- this.pageProps = {
75
- size: value, total: 100, current: 1
76
- };
77
- }
78
- else {
79
- this.setDefaultPageProps();
80
- this.setLocalPagination(localTablePaginationObj);
81
- }
82
- }
83
- else {
84
- this.setDefaultPageProps();
85
- var value = {};
86
- this.setLocalPagination(value);
87
- }
88
- }
89
- }
90
- catch (error) { }
91
- };
92
- LinkViewClass.prototype.setLocalPagination = function (value) {
93
- value["".concat(this.isLocalTablePagination)] = this.pageProps.size;
94
- window.localStorage.setItem('LocalTablePagination', JSON.stringify(value));
95
- };
96
- LinkViewClass.prototype.setDefaultPageProps = function () {
97
- this.pageProps = {
98
- size: 15, total: 100, current: 1
99
- };
100
- };
101
- LinkViewClass.prototype.onHandNextData = function () {
102
- if (this.hasNextTableData()) {
103
- this.activeIndex += 1;
104
- return;
105
- }
106
- this.activeIndex = this.tableData.length - 1;
107
- };
108
- LinkViewClass.prototype.onHandPreData = function () {
109
- if (this.hasPreTableData()) {
110
- this.activeIndex -= 1;
111
- }
112
- else {
113
- this.activeIndex = 0;
114
- }
115
- };
116
- LinkViewClass.prototype.hasNextTableData = function () {
117
- return this.tableData.length > 0 ? this.activeIndex !== this.tableData.length - 1 : false;
118
- };
119
- LinkViewClass.prototype.hasPreTableData = function () {
120
- return this.activeIndex > 0;
121
- };
122
- LinkViewClass.prototype.getTableDataForActiveIndex = function () {
123
- return this.tableData[this.activeIndex];
124
- };
125
- LinkViewClass.prototype.getPageProps = function () {
126
- return this.pageProps;
127
- };
128
- LinkViewClass.prototype.getTableData = function () {
129
- return {
130
- _class: this, tableData: this.tableData
131
- };
132
- };
133
- LinkViewClass.prototype.getPageConfig = function () {
134
- return this.pageConfig;
135
- };
136
- LinkViewClass.prototype.getPermission = function (key) {
137
- return this["".concat(key)].value;
138
- };
139
- LinkViewClass.prototype.setActiveIndex = function (index) {
140
- this.activeIndex = index;
141
- };
142
- LinkViewClass.prototype.deleteTableDataItemByProperty = function (property, value) {
143
- var index = this.tableData.findIndex(function (item) {
144
- return item["".concat(property)] === value;
145
- });
146
- if (index > -1) {
147
- this.tableData.splice(index, 1);
148
- }
149
- };
150
- return LinkViewClass;
151
- }());
152
- exports["default"] = LinkViewClass;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ var utils_1 = require("../utils/utils");
4
+ var componentConfig_1 = require("./componentConfig");
5
+ var LinkViewClass = /** @class */ (function () {
6
+ function LinkViewClass(params) {
7
+ this.delFn = null;
8
+ this.exportFn = null;
9
+ this.tableData = [];
10
+ this.pageProps = {
11
+ size: 15, total: 100, current: 1
12
+ };
13
+ this.pageConfig = null;
14
+ this.activeIndex = 0;
15
+ this.tablePermission = {
16
+ key: "", value: true
17
+ };
18
+ this.editPermission = {
19
+ key: "", value: true
20
+ };
21
+ this.delPermission = {
22
+ key: "", value: true
23
+ };
24
+ this.addPermission = {
25
+ key: "", value: true
26
+ };
27
+ this.refreshTableData = null;
28
+ this.drawerInstance = null;
29
+ this.superDrawerMountedCallback = null;
30
+ this.isLocalTablePagination = null;
31
+ this.init(params);
32
+ this.setPermissions(params);
33
+ }
34
+ LinkViewClass.prototype.setPermissions = function (param) {
35
+ var permissions = param.permissions;
36
+ if (permissions) {
37
+ this.tablePermission.key = permissions[0];
38
+ this.addPermission.key = permissions[1];
39
+ this.editPermission.key = permissions[2];
40
+ this.delPermission.key = permissions[3];
41
+ }
42
+ this.jugePermission();
43
+ };
44
+ LinkViewClass.prototype.jugePermission = function () {
45
+ var _a = this, tablePermission = _a.tablePermission, addPermission = _a.addPermission, editPermission = _a.editPermission, delPermission = _a.delPermission;
46
+ var permissionList = componentConfig_1["default"].store["getters"]["permissions"];
47
+ tablePermission.value = (0, utils_1.judgeButtonPermission)(permissionList, tablePermission.key);
48
+ editPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, editPermission.key);
49
+ delPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, delPermission.key);
50
+ addPermission.value = (0, utils_1.judgeButtonPermission)(permissionList, addPermission.key);
51
+ };
52
+ LinkViewClass.prototype.init = function (params) {
53
+ this.tableData = [];
54
+ this.activeIndex = 0;
55
+ this.refreshTableData = null;
56
+ this.setPageProps(params);
57
+ this.pageConfig = {
58
+ size: "size", page: "current", total: "total"
59
+ };
60
+ };
61
+ LinkViewClass.prototype.setPageProps = function (params) {
62
+ try {
63
+ var isLocalTablePagination = params["isLocalTablePagination"];
64
+ if (!isLocalTablePagination) {
65
+ this.setDefaultPageProps();
66
+ }
67
+ else {
68
+ this.isLocalTablePagination = isLocalTablePagination;
69
+ var localTablePagination = window.localStorage.getItem('LocalTablePagination');
70
+ if (localTablePagination) {
71
+ var localTablePaginationObj = JSON.parse(localTablePagination);
72
+ var value = localTablePaginationObj["".concat(isLocalTablePagination)];
73
+ if (value) {
74
+ this.pageProps = {
75
+ size: value, total: 100, current: 1
76
+ };
77
+ }
78
+ else {
79
+ this.setDefaultPageProps();
80
+ this.setLocalPagination(localTablePaginationObj);
81
+ }
82
+ }
83
+ else {
84
+ this.setDefaultPageProps();
85
+ var value = {};
86
+ this.setLocalPagination(value);
87
+ }
88
+ }
89
+ }
90
+ catch (error) { }
91
+ };
92
+ LinkViewClass.prototype.setLocalPagination = function (value) {
93
+ value["".concat(this.isLocalTablePagination)] = this.pageProps.size;
94
+ window.localStorage.setItem('LocalTablePagination', JSON.stringify(value));
95
+ };
96
+ LinkViewClass.prototype.setDefaultPageProps = function () {
97
+ this.pageProps = {
98
+ size: 15, total: 100, current: 1
99
+ };
100
+ };
101
+ LinkViewClass.prototype.onHandNextData = function () {
102
+ if (this.hasNextTableData()) {
103
+ this.activeIndex += 1;
104
+ return;
105
+ }
106
+ this.activeIndex = this.tableData.length - 1;
107
+ };
108
+ LinkViewClass.prototype.onHandPreData = function () {
109
+ if (this.hasPreTableData()) {
110
+ this.activeIndex -= 1;
111
+ }
112
+ else {
113
+ this.activeIndex = 0;
114
+ }
115
+ };
116
+ LinkViewClass.prototype.hasNextTableData = function () {
117
+ return this.tableData.length > 0 ? this.activeIndex !== this.tableData.length - 1 : false;
118
+ };
119
+ LinkViewClass.prototype.hasPreTableData = function () {
120
+ return this.activeIndex > 0;
121
+ };
122
+ LinkViewClass.prototype.getTableDataForActiveIndex = function () {
123
+ return this.tableData[this.activeIndex];
124
+ };
125
+ LinkViewClass.prototype.getPageProps = function () {
126
+ return this.pageProps;
127
+ };
128
+ LinkViewClass.prototype.getTableData = function () {
129
+ return {
130
+ _class: this, tableData: this.tableData
131
+ };
132
+ };
133
+ LinkViewClass.prototype.getPageConfig = function () {
134
+ return this.pageConfig;
135
+ };
136
+ LinkViewClass.prototype.getPermission = function (key) {
137
+ return this["".concat(key)].value;
138
+ };
139
+ LinkViewClass.prototype.setActiveIndex = function (index) {
140
+ this.activeIndex = index;
141
+ };
142
+ LinkViewClass.prototype.deleteTableDataItemByProperty = function (property, value) {
143
+ var index = this.tableData.findIndex(function (item) {
144
+ return item["".concat(property)] === value;
145
+ });
146
+ if (index > -1) {
147
+ this.tableData.splice(index, 1);
148
+ }
149
+ };
150
+ return LinkViewClass;
151
+ }());
152
+ exports["default"] = LinkViewClass;
@@ -1,68 +1,68 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- var selectStore_1 = require("./storeModule/selectStore");
4
- var dialogCacheStore_1 = require("./storeModule/dialogCacheStore");
5
- // @ts-ignore
6
- var index_vue_1 = require("../components/dialogCache/index.vue");
7
- var LinkViewClass_1 = require("./LinkViewClass");
8
- var componentConfig = {
9
- store: {},
10
- router: {},
11
- dynamicId: 0,
12
- uploadUrl: "",
13
- uploadPrefix: "",
14
- eventBus: null,
15
- selectStore: null,
16
- Vue: null,
17
- LinkViewClass: LinkViewClass_1["default"],
18
- dialogCacheComponent: {},
19
- uploadStoreList: ["meixidev"],
20
- ossUploadEdAuthCallback: null,
21
- setDynamicId: function () {
22
- componentConfig.dynamicId += 1;
23
- },
24
- setUploadPrefix: function (url) {
25
- componentConfig.uploadPrefix = url;
26
- },
27
- setUploadUrl: function (storeType, uploadType) {
28
- // componentConfig.uploadUrl = `${componentConfig.uploadPrefix}/${componentConfig.uploadStoreList[storeType]}/${uploadType}/upload`
29
- componentConfig.uploadUrl = "".concat(componentConfig.uploadPrefix);
30
- },
31
- setUploadCustomUrl: function (url) {
32
- componentConfig.uploadUrl = url;
33
- },
34
- setOssUploadEdAuthCallBack: function (callback) {
35
- componentConfig.ossUploadEdAuthCallback = callback;
36
- },
37
- initConfig: function (_store, _router) {
38
- // 动态注册vuex modules
39
- _store["registerModule"]("selectStore", selectStore_1["default"]);
40
- // 注册vuex里面selectStore管理类
41
- _store["commit"]("selectStore/CREATE_SELECTSTORE");
42
- componentConfig.store = _store;
43
- componentConfig.router = _router;
44
- componentConfig.selectStore =
45
- componentConfig.store["getters"]["selectStore/getSelectStore"];
46
- componentConfig.registerModuleOfCacheDialog(_store);
47
- window["dayjs"] = require("dayjs");
48
- },
49
- registerModuleOfCacheDialog: function (_store) {
50
- _store["registerModule"]("dialogCacheStore", dialogCacheStore_1["default"]);
51
- },
52
- // 生成隐藏dialog的容器
53
- createDialogCacheWrap: function () {
54
- var component = componentConfig.Vue.extend(index_vue_1["default"]);
55
- componentConfig.dialogCacheComponent = new component({
56
- // @ts-ignore
57
- store: componentConfig.store,
58
- router: componentConfig.router
59
- });
60
- componentConfig.Vue.nextTick(function () {
61
- var cacheWrap = document.createElement("div");
62
- cacheWrap.setAttribute("class", "cacheWrap");
63
- document.body.appendChild(cacheWrap);
64
- componentConfig.dialogCacheComponent["$mount"](cacheWrap);
65
- });
66
- }
67
- };
68
- exports["default"] = componentConfig;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ var selectStore_1 = require("./storeModule/selectStore");
4
+ var dialogCacheStore_1 = require("./storeModule/dialogCacheStore");
5
+ // @ts-ignore
6
+ var index_vue_1 = require("../components/dialogCache/index.vue");
7
+ var LinkViewClass_1 = require("./LinkViewClass");
8
+ var componentConfig = {
9
+ store: {},
10
+ router: {},
11
+ dynamicId: 0,
12
+ uploadUrl: "",
13
+ uploadPrefix: "",
14
+ eventBus: null,
15
+ selectStore: null,
16
+ Vue: null,
17
+ LinkViewClass: LinkViewClass_1["default"],
18
+ dialogCacheComponent: {},
19
+ uploadStoreList: ["meixidev"],
20
+ ossUploadEdAuthCallback: null,
21
+ setDynamicId: function () {
22
+ componentConfig.dynamicId += 1;
23
+ },
24
+ setUploadPrefix: function (url) {
25
+ componentConfig.uploadPrefix = url;
26
+ },
27
+ setUploadUrl: function (storeType, uploadType) {
28
+ // componentConfig.uploadUrl = `${componentConfig.uploadPrefix}/${componentConfig.uploadStoreList[storeType]}/${uploadType}/upload`
29
+ componentConfig.uploadUrl = "".concat(componentConfig.uploadPrefix);
30
+ },
31
+ setUploadCustomUrl: function (url) {
32
+ componentConfig.uploadUrl = url;
33
+ },
34
+ setOssUploadEdAuthCallBack: function (callback) {
35
+ componentConfig.ossUploadEdAuthCallback = callback;
36
+ },
37
+ initConfig: function (_store, _router) {
38
+ // 动态注册vuex modules
39
+ _store["registerModule"]("selectStore", selectStore_1["default"]);
40
+ // 注册vuex里面selectStore管理类
41
+ _store["commit"]("selectStore/CREATE_SELECTSTORE");
42
+ componentConfig.store = _store;
43
+ componentConfig.router = _router;
44
+ componentConfig.selectStore =
45
+ componentConfig.store["getters"]["selectStore/getSelectStore"];
46
+ componentConfig.registerModuleOfCacheDialog(_store);
47
+ window["dayjs"] = require("dayjs");
48
+ },
49
+ registerModuleOfCacheDialog: function (_store) {
50
+ _store["registerModule"]("dialogCacheStore", dialogCacheStore_1["default"]);
51
+ },
52
+ // 生成隐藏dialog的容器
53
+ createDialogCacheWrap: function () {
54
+ var component = componentConfig.Vue.extend(index_vue_1["default"]);
55
+ componentConfig.dialogCacheComponent = new component({
56
+ // @ts-ignore
57
+ store: componentConfig.store,
58
+ router: componentConfig.router
59
+ });
60
+ componentConfig.Vue.nextTick(function () {
61
+ var cacheWrap = document.createElement("div");
62
+ cacheWrap.setAttribute("class", "cacheWrap");
63
+ document.body.appendChild(cacheWrap);
64
+ componentConfig.dialogCacheComponent["$mount"](cacheWrap);
65
+ });
66
+ }
67
+ };
68
+ exports["default"] = componentConfig;
@@ -1,43 +1,43 @@
1
- "use strict";
2
- var __assign = (this && this.__assign) || function () {
3
- __assign = Object.assign || function(t) {
4
- for (var s, i = 1, n = arguments.length; i < n; i++) {
5
- s = arguments[i];
6
- for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
- t[p] = s[p];
8
- }
9
- return t;
10
- };
11
- return __assign.apply(this, arguments);
12
- };
13
- exports.__esModule = true;
14
- // @ts-ignore
15
- var index_vue_1 = require("../../components/base/baseGuide/index.vue");
16
- var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
17
- var componentConfig_1 = require("../componentConfig");
18
- var UseGuide = /** @class */ (function () {
19
- function UseGuide() {
20
- this.guideComponent = null;
21
- }
22
- UseGuide.prototype.startGuide = function (params) {
23
- var _this = this;
24
- if (!this.guideComponent) {
25
- this.guideComponent = new DynamicMountClass_1["default"]({
26
- vueComponent: index_vue_1["default"],
27
- componentProps: __assign({}, params)
28
- });
29
- this.guideComponent.on('mounted', function (component) {
30
- componentConfig_1["default"].Vue.nextTick(function () {
31
- component.guideControl.onStartGuide();
32
- });
33
- });
34
- this.guideComponent.on('destroyed', function () {
35
- _this.guideComponent = null;
36
- });
37
- this.guideComponent.init();
38
- }
39
- };
40
- return UseGuide;
41
- }());
42
- var useGuide = new UseGuide();
43
- exports["default"] = useGuide;
1
+ "use strict";
2
+ var __assign = (this && this.__assign) || function () {
3
+ __assign = Object.assign || function(t) {
4
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
5
+ s = arguments[i];
6
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
7
+ t[p] = s[p];
8
+ }
9
+ return t;
10
+ };
11
+ return __assign.apply(this, arguments);
12
+ };
13
+ exports.__esModule = true;
14
+ // @ts-ignore
15
+ var index_vue_1 = require("../../components/base/baseGuide/index.vue");
16
+ var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
17
+ var componentConfig_1 = require("../componentConfig");
18
+ var UseGuide = /** @class */ (function () {
19
+ function UseGuide() {
20
+ this.guideComponent = null;
21
+ }
22
+ UseGuide.prototype.startGuide = function (params) {
23
+ var _this = this;
24
+ if (!this.guideComponent) {
25
+ this.guideComponent = new DynamicMountClass_1["default"]({
26
+ vueComponent: index_vue_1["default"],
27
+ componentProps: __assign({}, params)
28
+ });
29
+ this.guideComponent.on('mounted', function (component) {
30
+ componentConfig_1["default"].Vue.nextTick(function () {
31
+ component.guideControl.onStartGuide();
32
+ });
33
+ });
34
+ this.guideComponent.on('destroyed', function () {
35
+ _this.guideComponent = null;
36
+ });
37
+ this.guideComponent.init();
38
+ }
39
+ };
40
+ return UseGuide;
41
+ }());
42
+ var useGuide = new UseGuide();
43
+ exports["default"] = useGuide;
@@ -1,41 +1,41 @@
1
- "use strict";
2
- exports.__esModule = true;
3
- // @ts-ignore
4
- var image_viewer_vue_1 = require("../../components/base/baseImageViewer/image-viewer.vue");
5
- var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
6
- var componentConfig_1 = require("../componentConfig");
7
- var UseImg = /** @class */ (function () {
8
- function UseImg() {
9
- var _this = this;
10
- this.destroy = function () {
11
- if (_this.dynamicMount) {
12
- var referComponent = _this.dynamicMount.getComponent();
13
- referComponent.$destroy();
14
- _this.dynamicMount = null;
15
- }
16
- };
17
- this.dynamicMount = null;
18
- }
19
- UseImg.prototype.toView = function (list) {
20
- var _this = this;
21
- if (this.dynamicMount) {
22
- this.destroy();
23
- }
24
- componentConfig_1["default"].Vue.nextTick(function () {
25
- _this.dynamicMount = new DynamicMountClass_1["default"]({
26
- componentProps: {
27
- urlList: list,
28
- onClose: function () {
29
- _this.destroy();
30
- }
31
- },
32
- vueComponent: image_viewer_vue_1["default"]
33
- });
34
- // 挂载事件
35
- _this.dynamicMount.init();
36
- });
37
- };
38
- return UseImg;
39
- }());
40
- var useImg = new UseImg();
41
- exports["default"] = useImg;
1
+ "use strict";
2
+ exports.__esModule = true;
3
+ // @ts-ignore
4
+ var image_viewer_vue_1 = require("../../components/base/baseImageViewer/image-viewer.vue");
5
+ var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
6
+ var componentConfig_1 = require("../componentConfig");
7
+ var UseImg = /** @class */ (function () {
8
+ function UseImg() {
9
+ var _this = this;
10
+ this.destroy = function () {
11
+ if (_this.dynamicMount) {
12
+ var referComponent = _this.dynamicMount.getComponent();
13
+ referComponent.$destroy();
14
+ _this.dynamicMount = null;
15
+ }
16
+ };
17
+ this.dynamicMount = null;
18
+ }
19
+ UseImg.prototype.toView = function (list) {
20
+ var _this = this;
21
+ if (this.dynamicMount) {
22
+ this.destroy();
23
+ }
24
+ componentConfig_1["default"].Vue.nextTick(function () {
25
+ _this.dynamicMount = new DynamicMountClass_1["default"]({
26
+ componentProps: {
27
+ urlList: list,
28
+ onClose: function () {
29
+ _this.destroy();
30
+ }
31
+ },
32
+ vueComponent: image_viewer_vue_1["default"]
33
+ });
34
+ // 挂载事件
35
+ _this.dynamicMount.init();
36
+ });
37
+ };
38
+ return UseImg;
39
+ }());
40
+ var useImg = new UseImg();
41
+ exports["default"] = useImg;