meixioacomponent 2.0.45 → 2.0.47
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 +110 -110
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +242 -242
- package/lib/config/LinkViewClass.d.ts +56 -56
- package/lib/config/LinkViewClass.js +154 -154
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.d.ts +12 -12
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +68 -68
- 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 +44 -44
- 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/UseWait.d.ts +4 -4
- package/lib/config/use/UseWait.js +21 -21
- package/lib/config/use/WaitPlugin.d.ts +25 -25
- package/lib/config/use/WaitPlugin.js +106 -106
- package/lib/config/use/useConfirm/UseConfirm.d.ts +6 -6
- package/lib/config/use/useConfirm/UseConfirm.js +33 -33
- package/lib/config/use/useConfirm/UseNotify.d.ts +6 -6
- package/lib/config/use/useConfirm/UseNotify.js +18 -18
- package/lib/config/use/useConfirm/executeConfirm.d.ts +2 -2
- package/lib/config/use/useConfirm/executeConfirm.js +11 -11
- package/lib/config/use/useConfirm/registerConfirm.d.ts +4 -4
- package/lib/config/use/useConfirm/registerConfirm.js +8 -8
- package/lib/meixioacomponent.common.js +23005 -22961
- package/lib/meixioacomponent.umd.js +23123 -23079
- package/lib/meixioacomponent.umd.min.js +3 -3
- package/lib/style/tableStyle.less +5 -5
- package/lib/style/tdesignStyle.less +21 -21
- package/lib/typings/type.d.ts +405 -405
- 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/baseAnchor/baseAnchor.vue +168 -168
- package/packages/components/base/baseAnchor/baseAnchorV2.vue +165 -165
- package/packages/components/base/baseArea/api.js +6 -6
- package/packages/components/base/baseArea/area.js +14979 -14979
- package/packages/components/base/baseArea/areaConfig.js +7 -7
- package/packages/components/base/baseArea/baseArea.vue +590 -590
- package/packages/components/base/baseArea/baseAreaV2.vue +144 -144
- package/packages/components/base/baseArea/baseAreaV21.vue +156 -156
- package/packages/components/base/baseArea/index.js +6 -6
- package/packages/components/base/baseAreaByMultiple/baseAreaByMultiple.vue +70 -70
- package/packages/components/base/baseAreaByMultiple/index.js +7 -7
- package/packages/components/base/baseButton/baseButton.vue +85 -85
- package/packages/components/base/baseButton/index.js +6 -6
- package/packages/components/base/baseInput/baseInput.vue +98 -98
- package/packages/components/base/baseSelect/baseSelect.vue +102 -102
- package/packages/components/base/baseSelect/index.js +6 -6
- package/packages/components/base/baseText/index.vue +4 -4
- package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
- package/packages/components/base/baseTimeRangePicker/index.js +7 -7
- package/packages/components/base/baseToggle/toggle.vue +59 -13
- package/packages/components/base/tDateRangePicker/index.js +5 -5
- package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +95 -95
- package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
- package/packages/components/dynamicmount/index.js +69 -69
- package/packages/components/hooks/useHookByBaseArea.js +49 -49
- package/packages/components/hooks/useHookByGuide.js +46 -46
- package/packages/components/hooks/useHookByUpload.js +130 -130
- package/packages/components/index.js +239 -239
- package/packages/components/index.ts +0 -2
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/proPageTable/oa_pro_table.vue +13 -13
- package/packages/components/searchHeader/searchHeader.vue +2 -2
- package/packages/components/style/tableStyle.less +5 -5
- package/packages/components/style/tdesignStyle.less +21 -21
- package/packages/config/LinkViewClass.js +152 -152
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +75 -75
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.ts +99 -99
- package/packages/config/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +44 -44
- package/packages/config/use/UseUpload.js +79 -79
- package/packages/config/use/UseViewVideo.js +40 -40
- package/packages/config/use/UseWait.js +18 -18
- package/packages/config/use/WaitPlugin.js +106 -106
- package/packages/config/use/useConfirm/UseConfirm.js +31 -31
- package/packages/config/use/useConfirm/UseConfirm.ts +34 -34
- package/packages/config/use/useConfirm/UseNotify.js +16 -16
- package/packages/config/use/useConfirm/UseNotify.ts +18 -18
- package/packages/config/use/useConfirm/executeConfirm.js +8 -8
- package/packages/config/use/useConfirm/executeConfirm.ts +6 -6
- package/packages/config/use/useConfirm/registerConfirm.js +8 -8
- package/packages/config/use/useConfirm/registerConfirm.ts +7 -7
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -1,96 +1,96 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<date-range-picker v-model="module"
|
|
3
|
-
v-bind="$attrs"
|
|
4
|
-
@blur="onBlur"
|
|
5
|
-
@change="onChange"
|
|
6
|
-
@confirm="onConfirm"
|
|
7
|
-
@focus="onFocus"
|
|
8
|
-
@input="onInput"
|
|
9
|
-
@pick="onPick"
|
|
10
|
-
@preset-click="onPresetClick"
|
|
11
|
-
:presets="computedPresets"/>
|
|
12
|
-
</template>
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
<script>
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
export default {
|
|
19
|
-
name: "tDateRangePicker",
|
|
20
|
-
data() {
|
|
21
|
-
return {}
|
|
22
|
-
},
|
|
23
|
-
props: {
|
|
24
|
-
value: {
|
|
25
|
-
type: Array,
|
|
26
|
-
default: () => {
|
|
27
|
-
return []
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
},
|
|
31
|
-
components: {},
|
|
32
|
-
created() {
|
|
33
|
-
},
|
|
34
|
-
computed: {
|
|
35
|
-
module: {
|
|
36
|
-
set(val) {
|
|
37
|
-
this.$emit('input', val);
|
|
38
|
-
},
|
|
39
|
-
get() {
|
|
40
|
-
return this.$props.value;
|
|
41
|
-
}
|
|
42
|
-
},
|
|
43
|
-
computedPresets() {
|
|
44
|
-
const now = {
|
|
45
|
-
'此刻': () => {
|
|
46
|
-
if (this.$attrs['valueType'] === 'time-stamp') {
|
|
47
|
-
return [new Date().valueOf(), new Date().valueOf()]
|
|
48
|
-
}
|
|
49
|
-
return [new Date(), new Date()];
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
if (this.$attrs[`presets`] && typeof this.$attrs[`presets`] === 'object') {
|
|
53
|
-
return {
|
|
54
|
-
...this.$attrs['presets'],
|
|
55
|
-
...now,
|
|
56
|
-
}
|
|
57
|
-
} else {
|
|
58
|
-
return {
|
|
59
|
-
...now
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
methods: {
|
|
65
|
-
onBlur(event) {
|
|
66
|
-
this.$emit('blur', event);
|
|
67
|
-
},
|
|
68
|
-
onChange(event) {
|
|
69
|
-
this.$emit('change', event);
|
|
70
|
-
},
|
|
71
|
-
onConfirm(event) {
|
|
72
|
-
this.$emit('confirm', event);
|
|
73
|
-
},
|
|
74
|
-
onFocus(event) {
|
|
75
|
-
this.$emit('focus', event);
|
|
76
|
-
},
|
|
77
|
-
onInput(event) {
|
|
78
|
-
this.$emit('input', event);
|
|
79
|
-
},
|
|
80
|
-
onPick(event) {
|
|
81
|
-
this.$emit('pick', event);
|
|
82
|
-
},
|
|
83
|
-
onPresetClick(event) {
|
|
84
|
-
this.$emit('preset-click', event);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
</script>
|
|
89
|
-
|
|
90
|
-
<style scoped lang="less">
|
|
91
|
-
.t_date_range_picker-wrap {
|
|
92
|
-
width: auto;
|
|
93
|
-
height: auto;
|
|
94
|
-
}
|
|
95
|
-
|
|
1
|
+
<template>
|
|
2
|
+
<date-range-picker v-model="module"
|
|
3
|
+
v-bind="$attrs"
|
|
4
|
+
@blur="onBlur"
|
|
5
|
+
@change="onChange"
|
|
6
|
+
@confirm="onConfirm"
|
|
7
|
+
@focus="onFocus"
|
|
8
|
+
@input="onInput"
|
|
9
|
+
@pick="onPick"
|
|
10
|
+
@preset-click="onPresetClick"
|
|
11
|
+
:presets="computedPresets"/>
|
|
12
|
+
</template>
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
|
|
18
|
+
export default {
|
|
19
|
+
name: "tDateRangePicker",
|
|
20
|
+
data() {
|
|
21
|
+
return {}
|
|
22
|
+
},
|
|
23
|
+
props: {
|
|
24
|
+
value: {
|
|
25
|
+
type: Array,
|
|
26
|
+
default: () => {
|
|
27
|
+
return []
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
},
|
|
31
|
+
components: {},
|
|
32
|
+
created() {
|
|
33
|
+
},
|
|
34
|
+
computed: {
|
|
35
|
+
module: {
|
|
36
|
+
set(val) {
|
|
37
|
+
this.$emit('input', val);
|
|
38
|
+
},
|
|
39
|
+
get() {
|
|
40
|
+
return this.$props.value;
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
computedPresets() {
|
|
44
|
+
const now = {
|
|
45
|
+
'此刻': () => {
|
|
46
|
+
if (this.$attrs['valueType'] === 'time-stamp') {
|
|
47
|
+
return [new Date().valueOf(), new Date().valueOf()]
|
|
48
|
+
}
|
|
49
|
+
return [new Date(), new Date()];
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
if (this.$attrs[`presets`] && typeof this.$attrs[`presets`] === 'object') {
|
|
53
|
+
return {
|
|
54
|
+
...this.$attrs['presets'],
|
|
55
|
+
...now,
|
|
56
|
+
}
|
|
57
|
+
} else {
|
|
58
|
+
return {
|
|
59
|
+
...now
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
},
|
|
64
|
+
methods: {
|
|
65
|
+
onBlur(event) {
|
|
66
|
+
this.$emit('blur', event);
|
|
67
|
+
},
|
|
68
|
+
onChange(event) {
|
|
69
|
+
this.$emit('change', event);
|
|
70
|
+
},
|
|
71
|
+
onConfirm(event) {
|
|
72
|
+
this.$emit('confirm', event);
|
|
73
|
+
},
|
|
74
|
+
onFocus(event) {
|
|
75
|
+
this.$emit('focus', event);
|
|
76
|
+
},
|
|
77
|
+
onInput(event) {
|
|
78
|
+
this.$emit('input', event);
|
|
79
|
+
},
|
|
80
|
+
onPick(event) {
|
|
81
|
+
this.$emit('pick', event);
|
|
82
|
+
},
|
|
83
|
+
onPresetClick(event) {
|
|
84
|
+
this.$emit('preset-click', event);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style scoped lang="less">
|
|
91
|
+
.t_date_range_picker-wrap {
|
|
92
|
+
width: auto;
|
|
93
|
+
height: auto;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
96
|
</style>
|
|
@@ -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
|
+
};
|
|
@@ -1,50 +1,50 @@
|
|
|
1
|
-
import {GetAreaTree} from "../base/baseArea/api";
|
|
2
|
-
import {ref} from "vue";
|
|
3
|
-
|
|
4
|
-
const useHookByBaseArea = () => {
|
|
5
|
-
const loading = ref(false);
|
|
6
|
-
const options = ref([]);
|
|
7
|
-
const placeholder = ref('请选择省市区镇')
|
|
8
|
-
|
|
9
|
-
const load = (node) => {
|
|
10
|
-
const {value, data} = node;
|
|
11
|
-
return new Promise((resolve) => {
|
|
12
|
-
loadArea(data ? data.code : '').then(res => {
|
|
13
|
-
resolve(res);
|
|
14
|
-
})
|
|
15
|
-
})
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
const loadArea = (keyword) => {
|
|
20
|
-
return new Promise((resolve) => {
|
|
21
|
-
loading.value = true;
|
|
22
|
-
GetAreaTree({
|
|
23
|
-
keyword: keyword
|
|
24
|
-
}).then(res => {
|
|
25
|
-
if (Array.isArray(res)) {
|
|
26
|
-
res.forEach(item => {
|
|
27
|
-
item[`children`] = item.level !== 4;
|
|
28
|
-
item[`value`] = `${item.name}-${item.code}`
|
|
29
|
-
})
|
|
30
|
-
loading.value = false;
|
|
31
|
-
resolve(res);
|
|
32
|
-
} else {
|
|
33
|
-
resolve([]);
|
|
34
|
-
}
|
|
35
|
-
})
|
|
36
|
-
})
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
return {
|
|
40
|
-
loading,
|
|
41
|
-
options,
|
|
42
|
-
placeholder,
|
|
43
|
-
load, loadArea
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
|
|
1
|
+
import {GetAreaTree} from "../base/baseArea/api";
|
|
2
|
+
import {ref} from "vue";
|
|
3
|
+
|
|
4
|
+
const useHookByBaseArea = () => {
|
|
5
|
+
const loading = ref(false);
|
|
6
|
+
const options = ref([]);
|
|
7
|
+
const placeholder = ref('请选择省市区镇')
|
|
8
|
+
|
|
9
|
+
const load = (node) => {
|
|
10
|
+
const {value, data} = node;
|
|
11
|
+
return new Promise((resolve) => {
|
|
12
|
+
loadArea(data ? data.code : '').then(res => {
|
|
13
|
+
resolve(res);
|
|
14
|
+
})
|
|
15
|
+
})
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
const loadArea = (keyword) => {
|
|
20
|
+
return new Promise((resolve) => {
|
|
21
|
+
loading.value = true;
|
|
22
|
+
GetAreaTree({
|
|
23
|
+
keyword: keyword
|
|
24
|
+
}).then(res => {
|
|
25
|
+
if (Array.isArray(res)) {
|
|
26
|
+
res.forEach(item => {
|
|
27
|
+
item[`children`] = item.level !== 4;
|
|
28
|
+
item[`value`] = `${item.name}-${item.code}`
|
|
29
|
+
})
|
|
30
|
+
loading.value = false;
|
|
31
|
+
resolve(res);
|
|
32
|
+
} else {
|
|
33
|
+
resolve([]);
|
|
34
|
+
}
|
|
35
|
+
})
|
|
36
|
+
})
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return {
|
|
40
|
+
loading,
|
|
41
|
+
options,
|
|
42
|
+
placeholder,
|
|
43
|
+
load, loadArea
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
|
|
50
50
|
export default useHookByBaseArea;
|
|
@@ -1,47 +1,47 @@
|
|
|
1
|
-
import {computed} from "vue";
|
|
2
|
-
|
|
3
|
-
const useHookByGuide = (paramsByGuideControl) => {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const _guideControl = computed(() => {
|
|
9
|
-
return paramsByGuideControl
|
|
10
|
-
})
|
|
11
|
-
|
|
12
|
-
const currentStep = computed(() => {
|
|
13
|
-
return _guideControl.value.current;
|
|
14
|
-
})
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
const steps = computed(() => {
|
|
18
|
-
return _guideControl.value.steps;
|
|
19
|
-
})
|
|
20
|
-
|
|
21
|
-
const currentStepContent = computed(() => {
|
|
22
|
-
return steps.value[currentStep.value]
|
|
23
|
-
})
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
const errorIds = computed(() => {
|
|
27
|
-
return _guideControl.value.errorIds;
|
|
28
|
-
})
|
|
29
|
-
|
|
30
|
-
const useStepShow = computed(() => {
|
|
31
|
-
return _guideControl.value.useStepShow;
|
|
32
|
-
})
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
return {
|
|
36
|
-
steps,
|
|
37
|
-
useStepShow,
|
|
38
|
-
errorIds,
|
|
39
|
-
_guideControl,
|
|
40
|
-
currentStep,
|
|
41
|
-
currentStepContent
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
1
|
+
import {computed} from "vue";
|
|
2
|
+
|
|
3
|
+
const useHookByGuide = (paramsByGuideControl) => {
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
const _guideControl = computed(() => {
|
|
9
|
+
return paramsByGuideControl
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
const currentStep = computed(() => {
|
|
13
|
+
return _guideControl.value.current;
|
|
14
|
+
})
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
const steps = computed(() => {
|
|
18
|
+
return _guideControl.value.steps;
|
|
19
|
+
})
|
|
20
|
+
|
|
21
|
+
const currentStepContent = computed(() => {
|
|
22
|
+
return steps.value[currentStep.value]
|
|
23
|
+
})
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
const errorIds = computed(() => {
|
|
27
|
+
return _guideControl.value.errorIds;
|
|
28
|
+
})
|
|
29
|
+
|
|
30
|
+
const useStepShow = computed(() => {
|
|
31
|
+
return _guideControl.value.useStepShow;
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
return {
|
|
36
|
+
steps,
|
|
37
|
+
useStepShow,
|
|
38
|
+
errorIds,
|
|
39
|
+
_guideControl,
|
|
40
|
+
currentStep,
|
|
41
|
+
currentStepContent
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
|
|
47
47
|
export default useHookByGuide;
|