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.
- package/lib/components/base/baseGuide/GuideControl.d.ts +44 -44
- package/lib/components/base/baseGuide/GuideControl.js +238 -238
- package/lib/components/dynamicmount/DynamicMountClass.d.ts +15 -15
- package/lib/components/dynamicmount/DynamicMountClass.js +65 -65
- package/lib/components/dynamicmount/index.d.ts +4 -4
- package/lib/components/dynamicmount/index.js +71 -71
- package/lib/components/index.d.ts +104 -104
- package/lib/components/index.js +221 -221
- package/lib/config/LinkViewClass.d.ts +56 -56
- package/lib/config/LinkViewClass.js +154 -154
- package/lib/config/componentConfig.d.ts +3 -3
- package/lib/config/componentConfig.js +71 -71
- package/lib/config/uploadRequest.d.ts +2 -2
- package/lib/config/uploadRequest.js +87 -87
- package/lib/config/use/UseGuide.d.ts +8 -8
- package/lib/config/use/UseGuide.js +33 -33
- package/lib/config/use/UseImg.d.ts +9 -9
- package/lib/config/use/UseImg.js +41 -41
- package/lib/config/use/UseUpload.d.ts +12 -12
- package/lib/config/use/UseUpload.js +79 -79
- package/lib/config/use/UseViewVideo.d.ts +11 -11
- package/lib/config/use/UseViewVideo.js +41 -41
- package/lib/config/use/WaitPlugin.d.ts +25 -25
- package/lib/config/use/WaitPlugin.js +106 -106
- package/lib/config/use/useWait.d.ts +4 -4
- package/lib/config/use/useWait.js +21 -21
- package/lib/meixioacomponent.common.js +41937 -41938
- package/lib/meixioacomponent.umd.js +41971 -41972
- package/lib/meixioacomponent.umd.min.js +28 -28
- package/lib/typings/type.d.ts +394 -394
- package/lib/typings/type.js +2 -2
- package/lib/useType/useType.d.ts +27 -27
- package/lib/useType/useType.js +89 -89
- package/package.json +1 -1
- package/packages/components/base/baseNumberInput/index.vue +9 -13
- package/packages/components/base/baseText/index.vue +2 -1
- package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
- package/packages/components/dynamicmount/index.js +69 -69
- package/packages/components/index.js +218 -218
- package/packages/config/LinkViewClass.js +152 -152
- package/packages/config/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +41 -41
- package/packages/config/use/UseUpload.js +80 -80
- package/packages/config/use/UseViewVideo.js +40 -40
- package/packages/config/use/WaitPlugin.js +106 -106
- package/packages/config/use/useWait.js +18 -18
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
package/lib/typings/type.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
package/lib/useType/useType.d.ts
CHANGED
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
import { FormItemInputParam, FormItemNumberParam, FormItemRadioParam, FormItemSelectParam, FormItemSingleUploadParam, FormItemTextareaParam, FormItemTimeParam, PlainTableParamsType, ProTableParamsType, TableProScreenInterFace } from "../typings/type";
|
|
2
|
-
/**
|
|
3
|
-
* pro/plain表格的表头配置
|
|
4
|
-
*/
|
|
5
|
-
export declare const useTableColumnParamsType: () => {
|
|
6
|
-
/**
|
|
7
|
-
* 页面表格的头部配置
|
|
8
|
-
*/
|
|
9
|
-
useTypeByProTableParams: (paramsList: ProTableParamsType[]) => ProTableParamsType[];
|
|
10
|
-
/**
|
|
11
|
-
* plain表格的头部配置
|
|
12
|
-
*/
|
|
13
|
-
useTypeByPlainTableParams: (paramsList: PlainTableParamsType[]) => PlainTableParamsType[];
|
|
14
|
-
};
|
|
15
|
-
/**
|
|
16
|
-
* form表单的各个类型的配置
|
|
17
|
-
*/
|
|
18
|
-
export declare const useFormItemParamsType: () => {
|
|
19
|
-
useTypeByInputFormItem: (params: FormItemInputParam) => FormItemInputParam;
|
|
20
|
-
useTypeTextareaFormItem: (params: FormItemTextareaParam) => FormItemTextareaParam;
|
|
21
|
-
useTypeNumberFormItem: (params: FormItemNumberParam) => FormItemNumberParam;
|
|
22
|
-
useTypeSelectFormItem: (params: FormItemSelectParam) => FormItemSelectParam;
|
|
23
|
-
useTypeTimeFormItem: (params: FormItemTimeParam) => FormItemTimeParam;
|
|
24
|
-
useTypeRadioFormItem: (params: FormItemRadioParam) => FormItemRadioParam;
|
|
25
|
-
useTypeSingleUploadFormItem: (params: FormItemSingleUploadParam) => FormItemSingleUploadParam;
|
|
26
|
-
};
|
|
27
|
-
export declare const useProScreenParamsItem: (proScreenItem: TableProScreenInterFace, auth?: boolean) => TableProScreenInterFace | null;
|
|
1
|
+
import { FormItemInputParam, FormItemNumberParam, FormItemRadioParam, FormItemSelectParam, FormItemSingleUploadParam, FormItemTextareaParam, FormItemTimeParam, PlainTableParamsType, ProTableParamsType, TableProScreenInterFace } from "../typings/type";
|
|
2
|
+
/**
|
|
3
|
+
* pro/plain表格的表头配置
|
|
4
|
+
*/
|
|
5
|
+
export declare const useTableColumnParamsType: () => {
|
|
6
|
+
/**
|
|
7
|
+
* 页面表格的头部配置
|
|
8
|
+
*/
|
|
9
|
+
useTypeByProTableParams: (paramsList: ProTableParamsType[]) => ProTableParamsType[];
|
|
10
|
+
/**
|
|
11
|
+
* plain表格的头部配置
|
|
12
|
+
*/
|
|
13
|
+
useTypeByPlainTableParams: (paramsList: PlainTableParamsType[]) => PlainTableParamsType[];
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* form表单的各个类型的配置
|
|
17
|
+
*/
|
|
18
|
+
export declare const useFormItemParamsType: () => {
|
|
19
|
+
useTypeByInputFormItem: (params: FormItemInputParam) => FormItemInputParam;
|
|
20
|
+
useTypeTextareaFormItem: (params: FormItemTextareaParam) => FormItemTextareaParam;
|
|
21
|
+
useTypeNumberFormItem: (params: FormItemNumberParam) => FormItemNumberParam;
|
|
22
|
+
useTypeSelectFormItem: (params: FormItemSelectParam) => FormItemSelectParam;
|
|
23
|
+
useTypeTimeFormItem: (params: FormItemTimeParam) => FormItemTimeParam;
|
|
24
|
+
useTypeRadioFormItem: (params: FormItemRadioParam) => FormItemRadioParam;
|
|
25
|
+
useTypeSingleUploadFormItem: (params: FormItemSingleUploadParam) => FormItemSingleUploadParam;
|
|
26
|
+
};
|
|
27
|
+
export declare const useProScreenParamsItem: (proScreenItem: TableProScreenInterFace, auth?: boolean) => TableProScreenInterFace | null;
|
|
28
28
|
//# sourceMappingURL=useType.d.ts.map
|
package/lib/useType/useType.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useProScreenParamsItem = exports.useFormItemParamsType = exports.useTableColumnParamsType = void 0;
|
|
4
|
-
/**
|
|
5
|
-
*
|
|
6
|
-
* @param paramsList
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
const useTypeByProTableParams = (paramsList) => {
|
|
10
|
-
return paramsList;
|
|
11
|
-
};
|
|
12
|
-
//普通表格的单列的配置
|
|
13
|
-
const useTypeByPlainTableParams = (paramsList) => {
|
|
14
|
-
return paramsList;
|
|
15
|
-
};
|
|
16
|
-
// form表单的配置类型
|
|
17
|
-
//input 类型
|
|
18
|
-
const useTypeByInputFormItem = (params) => {
|
|
19
|
-
return params;
|
|
20
|
-
};
|
|
21
|
-
// textarea 类型
|
|
22
|
-
const useTypeTextareaFormItem = (params) => {
|
|
23
|
-
return params;
|
|
24
|
-
};
|
|
25
|
-
// number 类型
|
|
26
|
-
const useTypeNumberFormItem = (params) => {
|
|
27
|
-
return params;
|
|
28
|
-
};
|
|
29
|
-
// select 类型
|
|
30
|
-
const useTypeSelectFormItem = (params) => {
|
|
31
|
-
return params;
|
|
32
|
-
};
|
|
33
|
-
// 时间类型 类型
|
|
34
|
-
const useTypeTimeFormItem = (params) => {
|
|
35
|
-
return params;
|
|
36
|
-
};
|
|
37
|
-
// radio单选框 类型
|
|
38
|
-
const useTypeRadioFormItem = (params) => {
|
|
39
|
-
return params;
|
|
40
|
-
};
|
|
41
|
-
// 单文件上传 类型
|
|
42
|
-
const useTypeSingleUploadFormItem = (params) => {
|
|
43
|
-
return params;
|
|
44
|
-
};
|
|
45
|
-
/**
|
|
46
|
-
* pro/plain表格的表头配置
|
|
47
|
-
*/
|
|
48
|
-
const useTableColumnParamsType = () => {
|
|
49
|
-
return {
|
|
50
|
-
/**
|
|
51
|
-
* 页面表格的头部配置
|
|
52
|
-
*/
|
|
53
|
-
useTypeByProTableParams,
|
|
54
|
-
/**
|
|
55
|
-
* plain表格的头部配置
|
|
56
|
-
*/
|
|
57
|
-
useTypeByPlainTableParams,
|
|
58
|
-
};
|
|
59
|
-
};
|
|
60
|
-
exports.useTableColumnParamsType = useTableColumnParamsType;
|
|
61
|
-
/**
|
|
62
|
-
* form表单的各个类型的配置
|
|
63
|
-
*/
|
|
64
|
-
const useFormItemParamsType = () => {
|
|
65
|
-
return {
|
|
66
|
-
//表单类型为input类型
|
|
67
|
-
useTypeByInputFormItem,
|
|
68
|
-
//表单类型为文本域
|
|
69
|
-
useTypeTextareaFormItem,
|
|
70
|
-
// 数字类型
|
|
71
|
-
useTypeNumberFormItem,
|
|
72
|
-
// 下拉菜单
|
|
73
|
-
useTypeSelectFormItem,
|
|
74
|
-
// 时间类型
|
|
75
|
-
useTypeTimeFormItem,
|
|
76
|
-
// 单选框
|
|
77
|
-
useTypeRadioFormItem,
|
|
78
|
-
// 单文件上传
|
|
79
|
-
useTypeSingleUploadFormItem,
|
|
80
|
-
};
|
|
81
|
-
};
|
|
82
|
-
exports.useFormItemParamsType = useFormItemParamsType;
|
|
83
|
-
const useProScreenParamsItem = (proScreenItem, auth = true) => {
|
|
84
|
-
if (auth) {
|
|
85
|
-
return proScreenItem;
|
|
86
|
-
}
|
|
87
|
-
return null;
|
|
88
|
-
};
|
|
89
|
-
exports.useProScreenParamsItem = useProScreenParamsItem;
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.useProScreenParamsItem = exports.useFormItemParamsType = exports.useTableColumnParamsType = void 0;
|
|
4
|
+
/**
|
|
5
|
+
*
|
|
6
|
+
* @param paramsList
|
|
7
|
+
*
|
|
8
|
+
*/
|
|
9
|
+
const useTypeByProTableParams = (paramsList) => {
|
|
10
|
+
return paramsList;
|
|
11
|
+
};
|
|
12
|
+
//普通表格的单列的配置
|
|
13
|
+
const useTypeByPlainTableParams = (paramsList) => {
|
|
14
|
+
return paramsList;
|
|
15
|
+
};
|
|
16
|
+
// form表单的配置类型
|
|
17
|
+
//input 类型
|
|
18
|
+
const useTypeByInputFormItem = (params) => {
|
|
19
|
+
return params;
|
|
20
|
+
};
|
|
21
|
+
// textarea 类型
|
|
22
|
+
const useTypeTextareaFormItem = (params) => {
|
|
23
|
+
return params;
|
|
24
|
+
};
|
|
25
|
+
// number 类型
|
|
26
|
+
const useTypeNumberFormItem = (params) => {
|
|
27
|
+
return params;
|
|
28
|
+
};
|
|
29
|
+
// select 类型
|
|
30
|
+
const useTypeSelectFormItem = (params) => {
|
|
31
|
+
return params;
|
|
32
|
+
};
|
|
33
|
+
// 时间类型 类型
|
|
34
|
+
const useTypeTimeFormItem = (params) => {
|
|
35
|
+
return params;
|
|
36
|
+
};
|
|
37
|
+
// radio单选框 类型
|
|
38
|
+
const useTypeRadioFormItem = (params) => {
|
|
39
|
+
return params;
|
|
40
|
+
};
|
|
41
|
+
// 单文件上传 类型
|
|
42
|
+
const useTypeSingleUploadFormItem = (params) => {
|
|
43
|
+
return params;
|
|
44
|
+
};
|
|
45
|
+
/**
|
|
46
|
+
* pro/plain表格的表头配置
|
|
47
|
+
*/
|
|
48
|
+
const useTableColumnParamsType = () => {
|
|
49
|
+
return {
|
|
50
|
+
/**
|
|
51
|
+
* 页面表格的头部配置
|
|
52
|
+
*/
|
|
53
|
+
useTypeByProTableParams,
|
|
54
|
+
/**
|
|
55
|
+
* plain表格的头部配置
|
|
56
|
+
*/
|
|
57
|
+
useTypeByPlainTableParams,
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
exports.useTableColumnParamsType = useTableColumnParamsType;
|
|
61
|
+
/**
|
|
62
|
+
* form表单的各个类型的配置
|
|
63
|
+
*/
|
|
64
|
+
const useFormItemParamsType = () => {
|
|
65
|
+
return {
|
|
66
|
+
//表单类型为input类型
|
|
67
|
+
useTypeByInputFormItem,
|
|
68
|
+
//表单类型为文本域
|
|
69
|
+
useTypeTextareaFormItem,
|
|
70
|
+
// 数字类型
|
|
71
|
+
useTypeNumberFormItem,
|
|
72
|
+
// 下拉菜单
|
|
73
|
+
useTypeSelectFormItem,
|
|
74
|
+
// 时间类型
|
|
75
|
+
useTypeTimeFormItem,
|
|
76
|
+
// 单选框
|
|
77
|
+
useTypeRadioFormItem,
|
|
78
|
+
// 单文件上传
|
|
79
|
+
useTypeSingleUploadFormItem,
|
|
80
|
+
};
|
|
81
|
+
};
|
|
82
|
+
exports.useFormItemParamsType = useFormItemParamsType;
|
|
83
|
+
const useProScreenParamsItem = (proScreenItem, auth = true) => {
|
|
84
|
+
if (auth) {
|
|
85
|
+
return proScreenItem;
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
};
|
|
89
|
+
exports.useProScreenParamsItem = useProScreenParamsItem;
|
package/package.json
CHANGED
|
@@ -75,6 +75,9 @@ export default {
|
|
|
75
75
|
disabled: {
|
|
76
76
|
default: false,
|
|
77
77
|
},
|
|
78
|
+
defaultValue: {
|
|
79
|
+
default: undefined
|
|
80
|
+
},
|
|
78
81
|
maxlength: {},
|
|
79
82
|
size: {},
|
|
80
83
|
controls: {default: false},
|
|
@@ -121,22 +124,15 @@ export default {
|
|
|
121
124
|
this.$refs.target.focus()
|
|
122
125
|
},
|
|
123
126
|
|
|
124
|
-
onChange() {
|
|
125
|
-
|
|
126
|
-
if (
|
|
127
|
-
this.$nextTick(() => {
|
|
128
|
-
this.module = this.min;
|
|
129
|
-
})
|
|
130
|
-
} else {
|
|
127
|
+
onChange(currentValue) {
|
|
128
|
+
this.$nextTick(() => {
|
|
129
|
+
if (!currentValue) {
|
|
131
130
|
this.$nextTick(() => {
|
|
132
|
-
this.module =
|
|
131
|
+
this.module = this.$props.defaultValue;
|
|
133
132
|
})
|
|
134
133
|
}
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
this.$emit('onChange', this.module)
|
|
139
|
-
|
|
134
|
+
this.$emit('onChange', this.module)
|
|
135
|
+
})
|
|
140
136
|
|
|
141
137
|
},
|
|
142
138
|
},
|
|
@@ -91,7 +91,7 @@ export default {
|
|
|
91
91
|
if (typeof content === 'string') {
|
|
92
92
|
return 0
|
|
93
93
|
} else {
|
|
94
|
-
return
|
|
94
|
+
return 0
|
|
95
95
|
}
|
|
96
96
|
default:
|
|
97
97
|
return '暂无数据'
|
|
@@ -161,6 +161,7 @@ export default {
|
|
|
161
161
|
|
|
162
162
|
.handle {
|
|
163
163
|
width: fit-content !important;
|
|
164
|
+
|
|
164
165
|
p {
|
|
165
166
|
color: var(--color-primary) !important;
|
|
166
167
|
cursor: pointer;
|
|
@@ -1,64 +1,64 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var componentConfig_1 = require("../../config/componentConfig");
|
|
4
|
-
var DynamicMountClass = /** @class */ (function () {
|
|
5
|
-
function DynamicMountClass(dynamicMount) {
|
|
6
|
-
this.params = dynamicMount;
|
|
7
|
-
this.domComponent = null;
|
|
8
|
-
this.refComponent = null;
|
|
9
|
-
this.mountdCb = null;
|
|
10
|
-
this.destroyCb = null;
|
|
11
|
-
}
|
|
12
|
-
DynamicMountClass.prototype.init = function () {
|
|
13
|
-
var _this = this;
|
|
14
|
-
this.domComponent = componentConfig_1["default"].Vue.prototype.$dynmaicMount({
|
|
15
|
-
mountedDom: this.params.mountedDom,
|
|
16
|
-
vueComponent: this.params.vueComponent,
|
|
17
|
-
componentProps: this.params.componentProps,
|
|
18
|
-
customClassName: this.params.customClassName,
|
|
19
|
-
zIndex: this.params.zIndex ? this.params.zIndex : '9999'
|
|
20
|
-
});
|
|
21
|
-
this.refComponent = this.domComponent.componentMounted;
|
|
22
|
-
this.refComponent.$on('hook:destroyed', function () {
|
|
23
|
-
_this.destroy();
|
|
24
|
-
});
|
|
25
|
-
this.refComponent.$on('hook:mounted', function () {
|
|
26
|
-
_this.mounted();
|
|
27
|
-
});
|
|
28
|
-
};
|
|
29
|
-
DynamicMountClass.prototype.getComponent = function () {
|
|
30
|
-
return this.refComponent;
|
|
31
|
-
};
|
|
32
|
-
DynamicMountClass.prototype.on = function (type, cb) {
|
|
33
|
-
switch (type) {
|
|
34
|
-
case 'mounted':
|
|
35
|
-
this.mountdCb = cb;
|
|
36
|
-
break;
|
|
37
|
-
case 'destroyed':
|
|
38
|
-
this.destroyCb = cb;
|
|
39
|
-
break;
|
|
40
|
-
default:
|
|
41
|
-
break;
|
|
42
|
-
}
|
|
43
|
-
};
|
|
44
|
-
DynamicMountClass.prototype.mounted = function () {
|
|
45
|
-
if (this.mountdCb) {
|
|
46
|
-
this.mountdCb(this.refComponent);
|
|
47
|
-
}
|
|
48
|
-
};
|
|
49
|
-
DynamicMountClass.prototype.destroy = function () {
|
|
50
|
-
if (this.destroyCb) {
|
|
51
|
-
this.destroyCb(this.refComponent);
|
|
52
|
-
}
|
|
53
|
-
componentConfig_1["default"].Vue.component("".concat(this.domComponent.$options.name), null);
|
|
54
|
-
delete componentConfig_1["default"].Vue.options.components["".concat(this.domComponent.$options.name)];
|
|
55
|
-
// @ts-ignore
|
|
56
|
-
this.params = null;
|
|
57
|
-
this.domComponent = null;
|
|
58
|
-
this.refComponent = null;
|
|
59
|
-
this.mountdCb = null;
|
|
60
|
-
this.destroyCb = null;
|
|
61
|
-
};
|
|
62
|
-
return DynamicMountClass;
|
|
63
|
-
}());
|
|
64
|
-
exports["default"] = DynamicMountClass;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var componentConfig_1 = require("../../config/componentConfig");
|
|
4
|
+
var DynamicMountClass = /** @class */ (function () {
|
|
5
|
+
function DynamicMountClass(dynamicMount) {
|
|
6
|
+
this.params = dynamicMount;
|
|
7
|
+
this.domComponent = null;
|
|
8
|
+
this.refComponent = null;
|
|
9
|
+
this.mountdCb = null;
|
|
10
|
+
this.destroyCb = null;
|
|
11
|
+
}
|
|
12
|
+
DynamicMountClass.prototype.init = function () {
|
|
13
|
+
var _this = this;
|
|
14
|
+
this.domComponent = componentConfig_1["default"].Vue.prototype.$dynmaicMount({
|
|
15
|
+
mountedDom: this.params.mountedDom,
|
|
16
|
+
vueComponent: this.params.vueComponent,
|
|
17
|
+
componentProps: this.params.componentProps,
|
|
18
|
+
customClassName: this.params.customClassName,
|
|
19
|
+
zIndex: this.params.zIndex ? this.params.zIndex : '9999'
|
|
20
|
+
});
|
|
21
|
+
this.refComponent = this.domComponent.componentMounted;
|
|
22
|
+
this.refComponent.$on('hook:destroyed', function () {
|
|
23
|
+
_this.destroy();
|
|
24
|
+
});
|
|
25
|
+
this.refComponent.$on('hook:mounted', function () {
|
|
26
|
+
_this.mounted();
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
DynamicMountClass.prototype.getComponent = function () {
|
|
30
|
+
return this.refComponent;
|
|
31
|
+
};
|
|
32
|
+
DynamicMountClass.prototype.on = function (type, cb) {
|
|
33
|
+
switch (type) {
|
|
34
|
+
case 'mounted':
|
|
35
|
+
this.mountdCb = cb;
|
|
36
|
+
break;
|
|
37
|
+
case 'destroyed':
|
|
38
|
+
this.destroyCb = cb;
|
|
39
|
+
break;
|
|
40
|
+
default:
|
|
41
|
+
break;
|
|
42
|
+
}
|
|
43
|
+
};
|
|
44
|
+
DynamicMountClass.prototype.mounted = function () {
|
|
45
|
+
if (this.mountdCb) {
|
|
46
|
+
this.mountdCb(this.refComponent);
|
|
47
|
+
}
|
|
48
|
+
};
|
|
49
|
+
DynamicMountClass.prototype.destroy = function () {
|
|
50
|
+
if (this.destroyCb) {
|
|
51
|
+
this.destroyCb(this.refComponent);
|
|
52
|
+
}
|
|
53
|
+
componentConfig_1["default"].Vue.component("".concat(this.domComponent.$options.name), null);
|
|
54
|
+
delete componentConfig_1["default"].Vue.options.components["".concat(this.domComponent.$options.name)];
|
|
55
|
+
// @ts-ignore
|
|
56
|
+
this.params = null;
|
|
57
|
+
this.domComponent = null;
|
|
58
|
+
this.refComponent = null;
|
|
59
|
+
this.mountdCb = null;
|
|
60
|
+
this.destroyCb = null;
|
|
61
|
+
};
|
|
62
|
+
return DynamicMountClass;
|
|
63
|
+
}());
|
|
64
|
+
exports["default"] = DynamicMountClass;
|
|
@@ -1,69 +1,69 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
var dynamicMount_vue_1 = require("./dynamicMount.vue");
|
|
5
|
-
var componentConfig_1 = require("../../config/componentConfig");
|
|
6
|
-
//使用方法
|
|
7
|
-
// this.$dynmaicMount({
|
|
8
|
-
// mountedDom: "",
|
|
9
|
-
// vueComponent: "",
|
|
10
|
-
// componentProps: "",
|
|
11
|
-
// customClassName:"",
|
|
12
|
-
// });
|
|
13
|
-
var Insert = function (options) {
|
|
14
|
-
var ComponentInsertConstructor = componentConfig_1["default"].Vue.extend(dynamicMount_vue_1["default"]);
|
|
15
|
-
componentConfig_1["default"].setDynamicId();
|
|
16
|
-
var id = componentConfig_1["default"].dynamicId;
|
|
17
|
-
var componentInsertConstructor = new ComponentInsertConstructor();
|
|
18
|
-
// @ts-ignore
|
|
19
|
-
componentInsertConstructor.vm = componentInsertConstructor.$mount();
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
componentInsertConstructor.dom = componentInsertConstructor.vm.$el;
|
|
22
|
-
// @ts-ignore
|
|
23
|
-
componentInsertConstructor.mountedDom = options.mountedDom;
|
|
24
|
-
// @ts-ignore
|
|
25
|
-
componentInsertConstructor.vm.id = id;
|
|
26
|
-
// @ts-ignore
|
|
27
|
-
componentInsertConstructor.vm.vueComponent = options.vueComponent;
|
|
28
|
-
// @ts-ignore
|
|
29
|
-
componentInsertConstructor.componentProps = options.componentProps;
|
|
30
|
-
// @ts-ignore
|
|
31
|
-
componentInsertConstructor.vm.init();
|
|
32
|
-
var ele = document.createElement('div');
|
|
33
|
-
ele.setAttribute('id', "dynamic-".concat(id));
|
|
34
|
-
var className;
|
|
35
|
-
if (options.customClassName != null) {
|
|
36
|
-
className = "dynamic ".concat(options.customClassName);
|
|
37
|
-
}
|
|
38
|
-
else {
|
|
39
|
-
className = 'dynamic';
|
|
40
|
-
}
|
|
41
|
-
ele.setAttribute('class', className);
|
|
42
|
-
if (options.mountedDom) {
|
|
43
|
-
ele.style.height = '100%';
|
|
44
|
-
// @ts-ignore
|
|
45
|
-
componentInsertConstructor.vm.$el.style.height = '100%';
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
ele.style.position = "fixed";
|
|
49
|
-
ele.style.zIndex = options.zIndex || '9999';
|
|
50
|
-
ele.style.top = "0px";
|
|
51
|
-
ele.style.left = "0px";
|
|
52
|
-
}
|
|
53
|
-
// @ts-ignore
|
|
54
|
-
ele.appendChild(componentInsertConstructor.dom);
|
|
55
|
-
if (options.mountedDom) {
|
|
56
|
-
options.mountedDom.appendChild(ele);
|
|
57
|
-
}
|
|
58
|
-
else {
|
|
59
|
-
document.body.appendChild(ele);
|
|
60
|
-
}
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
return componentInsertConstructor.vm;
|
|
63
|
-
};
|
|
64
|
-
exports["default"] = {
|
|
65
|
-
install: function (Vue, options) {
|
|
66
|
-
if (options === void 0) { options = {}; }
|
|
67
|
-
Vue.prototype.$dynmaicMount = Insert;
|
|
68
|
-
}
|
|
69
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
var dynamicMount_vue_1 = require("./dynamicMount.vue");
|
|
5
|
+
var componentConfig_1 = require("../../config/componentConfig");
|
|
6
|
+
//使用方法
|
|
7
|
+
// this.$dynmaicMount({
|
|
8
|
+
// mountedDom: "",
|
|
9
|
+
// vueComponent: "",
|
|
10
|
+
// componentProps: "",
|
|
11
|
+
// customClassName:"",
|
|
12
|
+
// });
|
|
13
|
+
var Insert = function (options) {
|
|
14
|
+
var ComponentInsertConstructor = componentConfig_1["default"].Vue.extend(dynamicMount_vue_1["default"]);
|
|
15
|
+
componentConfig_1["default"].setDynamicId();
|
|
16
|
+
var id = componentConfig_1["default"].dynamicId;
|
|
17
|
+
var componentInsertConstructor = new ComponentInsertConstructor();
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
componentInsertConstructor.vm = componentInsertConstructor.$mount();
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
componentInsertConstructor.dom = componentInsertConstructor.vm.$el;
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
componentInsertConstructor.mountedDom = options.mountedDom;
|
|
24
|
+
// @ts-ignore
|
|
25
|
+
componentInsertConstructor.vm.id = id;
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
componentInsertConstructor.vm.vueComponent = options.vueComponent;
|
|
28
|
+
// @ts-ignore
|
|
29
|
+
componentInsertConstructor.componentProps = options.componentProps;
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
componentInsertConstructor.vm.init();
|
|
32
|
+
var ele = document.createElement('div');
|
|
33
|
+
ele.setAttribute('id', "dynamic-".concat(id));
|
|
34
|
+
var className;
|
|
35
|
+
if (options.customClassName != null) {
|
|
36
|
+
className = "dynamic ".concat(options.customClassName);
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
className = 'dynamic';
|
|
40
|
+
}
|
|
41
|
+
ele.setAttribute('class', className);
|
|
42
|
+
if (options.mountedDom) {
|
|
43
|
+
ele.style.height = '100%';
|
|
44
|
+
// @ts-ignore
|
|
45
|
+
componentInsertConstructor.vm.$el.style.height = '100%';
|
|
46
|
+
}
|
|
47
|
+
else {
|
|
48
|
+
ele.style.position = "fixed";
|
|
49
|
+
ele.style.zIndex = options.zIndex || '9999';
|
|
50
|
+
ele.style.top = "0px";
|
|
51
|
+
ele.style.left = "0px";
|
|
52
|
+
}
|
|
53
|
+
// @ts-ignore
|
|
54
|
+
ele.appendChild(componentInsertConstructor.dom);
|
|
55
|
+
if (options.mountedDom) {
|
|
56
|
+
options.mountedDom.appendChild(ele);
|
|
57
|
+
}
|
|
58
|
+
else {
|
|
59
|
+
document.body.appendChild(ele);
|
|
60
|
+
}
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
return componentInsertConstructor.vm;
|
|
63
|
+
};
|
|
64
|
+
exports["default"] = {
|
|
65
|
+
install: function (Vue, options) {
|
|
66
|
+
if (options === void 0) { options = {}; }
|
|
67
|
+
Vue.prototype.$dynmaicMount = Insert;
|
|
68
|
+
}
|
|
69
|
+
};
|