meixioacomponent 0.9.47 → 0.9.48-alpha-2
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 +10 -2
- package/lib/components/base/baseGuide/GuideControl.d.ts.map +1 -1
- package/lib/components/base/baseGuide/GuideControl.js +62 -9
- package/lib/components/dynamicmount/DynamicMountClass.d.ts.map +1 -1
- package/lib/components/dynamicmount/index.js +1 -1
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +1 -0
- package/lib/config/componentConfig.d.ts.map +1 -1
- package/lib/config/use/UseGuide.d.ts.map +1 -1
- package/lib/config/use/UseGuide.js +4 -3
- package/lib/config/use/UseImg.d.ts.map +1 -1
- package/lib/config/use/UseImg.js +1 -1
- package/lib/config/use/UseUpload.d.ts.map +1 -1
- package/lib/config/use/UseUpload.js +1 -1
- package/lib/meixioacomponent.common.js +163 -82
- package/lib/meixioacomponent.umd.js +163 -82
- package/lib/meixioacomponent.umd.min.js +7 -7
- package/lib/typings/type.d.ts +5 -2
- package/lib/typings/type.d.ts.map +1 -1
- package/package.json +2 -2
- package/packages/components/base/baseGuide/GuideControl.ts +71 -12
- package/packages/components/base/baseGuide/guideContent.vue +68 -20
- package/packages/components/base/baseGuide/guideLight.vue +5 -8
- package/packages/components/base/baseGuide/guideMixins.js +9 -0
- package/packages/components/base/baseGuide/index.vue +4 -0
- package/packages/components/dynamicmount/DynamicMountClass.ts +5 -1
- package/packages/components/dynamicmount/dynamicMount.vue +1 -1
- package/packages/components/dynamicmount/index.js +1 -1
- package/packages/components/dynamicmount/index.ts +2 -2
- package/packages/components/index.js +1 -0
- package/packages/components/index.ts +3 -1
- package/packages/components/proPageTable/TableCheckControl.js +0 -1
- package/packages/config/componentConfig.ts +1 -0
- package/packages/config/use/UseGuide.js +4 -3
- package/packages/config/use/UseGuide.ts +4 -3
- package/packages/config/use/UseImg.js +1 -1
- package/packages/config/use/UseImg.ts +1 -1
- package/packages/config/use/UseUpload.js +1 -1
- package/packages/config/use/UseUpload.ts +1 -3
- package/packages/typings/type.ts +7 -4
|
@@ -8,16 +8,24 @@ declare class GuideControl implements GuideControlInterface {
|
|
|
8
8
|
guideLight?: DynamicMountInterface | null;
|
|
9
9
|
guideContent?: DynamicMountInterface | null;
|
|
10
10
|
guideLightPosition: string | null;
|
|
11
|
+
errorIds: Set<String>;
|
|
11
12
|
constructor(defaultCurrent: number, steps: GuideStepsType[], component: any);
|
|
13
|
+
private init;
|
|
12
14
|
onStartGuide(): void;
|
|
15
|
+
onDomError(index: any): void;
|
|
13
16
|
createGuideOverlay(): void;
|
|
14
17
|
createGuideLight(): void;
|
|
18
|
+
/**
|
|
19
|
+
* 获取node节点
|
|
20
|
+
* @param element
|
|
21
|
+
*/
|
|
22
|
+
getGuideContentByElement(element: any): any;
|
|
15
23
|
createGuideContent(): void;
|
|
16
24
|
setGuideLightPosition(position: any): void;
|
|
17
25
|
getGuideHandleButtonConfig(value: any): {
|
|
18
26
|
text: string;
|
|
19
27
|
type: string;
|
|
20
|
-
click: () => void;
|
|
28
|
+
click: (type?: boolean) => void;
|
|
21
29
|
}[];
|
|
22
30
|
onNextStepClick: () => void;
|
|
23
31
|
/**
|
|
@@ -28,7 +36,7 @@ declare class GuideControl implements GuideControlInterface {
|
|
|
28
36
|
* 开始下一步
|
|
29
37
|
*/
|
|
30
38
|
startNextStep(): void;
|
|
31
|
-
onPrevStepClick: () => void;
|
|
39
|
+
onPrevStepClick: (type?: boolean) => void;
|
|
32
40
|
onFinish: () => void;
|
|
33
41
|
onSkip: () => void;
|
|
34
42
|
beforeDestroy(): void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"GuideControl.d.ts","sourceRoot":"","sources":["../../../../packages/components/base/baseGuide/GuideControl.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAE,qBAAqB,EAAE,cAAc,EAAC,MAAM,uBAAuB,CAAC;AAEnG,c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OAEG;IACH,YAAY;IAiBZ;;OAEG;IACH,aAAa;IAQb,eAAe,2BAgBd;IAED,QAAQ,aAOP;IACD,MAAM,aAOL;IAED,aAAa;IAYb,gBAAgB;CAYnB;AAED,eAAe,YAAY,CAAA"}
|
|
@@ -15,12 +15,23 @@ class GuideControl {
|
|
|
15
15
|
this.startNextStep();
|
|
16
16
|
}
|
|
17
17
|
};
|
|
18
|
-
this.onPrevStepClick = () => {
|
|
19
|
-
this.current
|
|
20
|
-
|
|
21
|
-
this.
|
|
18
|
+
this.onPrevStepClick = (type = false) => {
|
|
19
|
+
let index = this.current - 1;
|
|
20
|
+
if (index === 0 && this.errorIds.size > 0 && type) {
|
|
21
|
+
this.onSkip();
|
|
22
|
+
return;
|
|
22
23
|
}
|
|
23
|
-
|
|
24
|
+
if (this.errorIds.has(`${index}`)) {
|
|
25
|
+
this.current -= 1;
|
|
26
|
+
this.onPrevStepClick(true);
|
|
27
|
+
}
|
|
28
|
+
else {
|
|
29
|
+
this.current = index;
|
|
30
|
+
try {
|
|
31
|
+
this.component.onNextStepClick(this.current);
|
|
32
|
+
}
|
|
33
|
+
catch (error) {
|
|
34
|
+
}
|
|
24
35
|
}
|
|
25
36
|
};
|
|
26
37
|
this.onFinish = () => {
|
|
@@ -54,6 +65,17 @@ class GuideControl {
|
|
|
54
65
|
this.guideContent = null;
|
|
55
66
|
// 引导需要展示的位置
|
|
56
67
|
this.guideLightPosition = null;
|
|
68
|
+
// 记录dom节点没有导致的引导错误的节点
|
|
69
|
+
this.errorIds = new Set();
|
|
70
|
+
this.init();
|
|
71
|
+
}
|
|
72
|
+
init() {
|
|
73
|
+
this.steps.push({
|
|
74
|
+
element: 'logo-wrap',
|
|
75
|
+
placement: 'bottom-left',
|
|
76
|
+
title: '引导结束',
|
|
77
|
+
body: '本次引导已结束,快去试试吧!',
|
|
78
|
+
});
|
|
57
79
|
}
|
|
58
80
|
onStartGuide() {
|
|
59
81
|
setTimeout(() => {
|
|
@@ -69,6 +91,18 @@ class GuideControl {
|
|
|
69
91
|
}
|
|
70
92
|
}, 500);
|
|
71
93
|
}
|
|
94
|
+
// 当dom节点不存在时,跳过改次引导
|
|
95
|
+
onDomError(index) {
|
|
96
|
+
this.errorIds.add(`${index}`);
|
|
97
|
+
let _index = this.current + 1;
|
|
98
|
+
if (_index == this.steps.length) {
|
|
99
|
+
this.onFinish();
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
this.current = _index;
|
|
103
|
+
this.onBeforeNext();
|
|
104
|
+
}
|
|
105
|
+
}
|
|
72
106
|
// 创建遮罩层
|
|
73
107
|
createGuideOverlay() {
|
|
74
108
|
const { zIndex } = this.component;
|
|
@@ -86,12 +120,25 @@ class GuideControl {
|
|
|
86
120
|
componentProps: { _guideControl: this },
|
|
87
121
|
});
|
|
88
122
|
this.guideLight.on('mounted', (component) => {
|
|
89
|
-
console.log(component);
|
|
90
123
|
});
|
|
91
124
|
this.guideLight.on('destroyed', () => {
|
|
92
125
|
});
|
|
93
126
|
this.guideLight.init();
|
|
94
127
|
}
|
|
128
|
+
/**
|
|
129
|
+
* 获取node节点
|
|
130
|
+
* @param element
|
|
131
|
+
*/
|
|
132
|
+
getGuideContentByElement(element) {
|
|
133
|
+
let node = null;
|
|
134
|
+
if (element.indexOf('#') === 0) {
|
|
135
|
+
node = document.getElementById(element.slice(1));
|
|
136
|
+
}
|
|
137
|
+
else {
|
|
138
|
+
node = document.getElementsByClassName(element)[0];
|
|
139
|
+
}
|
|
140
|
+
return node;
|
|
141
|
+
}
|
|
95
142
|
// 创建引导内容
|
|
96
143
|
createGuideContent() {
|
|
97
144
|
const { zIndex } = this.component;
|
|
@@ -175,9 +222,15 @@ class GuideControl {
|
|
|
175
222
|
}
|
|
176
223
|
}
|
|
177
224
|
beforeDestroy() {
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
225
|
+
try {
|
|
226
|
+
let node = document.getElementsByClassName('base-guide-overlay')[0];
|
|
227
|
+
document.body.removeChild(node);
|
|
228
|
+
}
|
|
229
|
+
catch (error) {
|
|
230
|
+
}
|
|
231
|
+
finally {
|
|
232
|
+
this.component.onDestroy();
|
|
233
|
+
}
|
|
181
234
|
}
|
|
182
235
|
destroyComponent() {
|
|
183
236
|
if (this.guideLight) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DynamicMountClass.d.ts","sourceRoot":"","sources":["../../../packages/components/dynamicmount/DynamicMountClass.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"DynamicMountClass.d.ts","sourceRoot":"","sources":["../../../packages/components/dynamicmount/DynamicMountClass.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAI7E,cAAM,iBAAkB,YAAW,qBAAqB;IACpD,SAAS,EAAE,IAAI,GAAG,QAAQ,CAAA;IAC1B,QAAQ,EAAE,IAAI,GAAG,QAAQ,CAAA;IACzB,YAAY,EAAE,GAAG,CAAC;IAClB,MAAM,EAAE,kBAAkB,CAAC;IAC3B,YAAY,EAAE,GAAG,CAAC;gBAEN,YAAY,KAAA;IAQjB,IAAI;IAgBJ,YAAY,IAAI,MAAM;IAItB,EAAE,CAAC,IAAI,EAAE,SAAS,GAAG,WAAW,EAAE,EAAE,EAAE,QAAQ;IAarD,OAAO,CAAC,OAAO;IAMf,OAAO,CAAC,OAAO;CAOlB;AAED,eAAe,iBAAiB,CAAA"}
|
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const vue_1 = __importDefault(require("vue"));
|
|
7
6
|
// @ts-ignore
|
|
8
7
|
const dynamicMount_vue_1 = __importDefault(require("./dynamicMount.vue"));
|
|
9
8
|
const componentConfig_1 = __importDefault(require("../../config/componentConfig"));
|
|
9
|
+
const vue_1 = __importDefault(require("vue"));
|
|
10
10
|
const ComponentInsertConstructor = vue_1.default.extend(dynamicMount_vue_1.default);
|
|
11
11
|
//使用方法
|
|
12
12
|
// this.$dynmaicMount({
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/index.ts"],"names":[],"mappings":"AAqDA,OAAO,iBAAiB,MAAM,kCAAkC,CAAA;AAGhE,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAS5C,OAAO,aAAa,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../packages/components/index.ts"],"names":[],"mappings":"AAqDA,OAAO,iBAAiB,MAAM,kCAAkC,CAAA;AAGhE,OAAO,OAAO,MAAM,uBAAuB,CAAC;AAS5C,OAAO,aAAa,MAAM,yBAAyB,CAAC;AAmFpD,QAAA,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoErB,CAAA;AAID,eAAe,gBAAgB,CAAA"}
|
package/lib/components/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"componentConfig.d.ts","sourceRoot":"","sources":["../../packages/config/componentConfig.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,QAAA,MAAM,eAAe,EAAE,
|
|
1
|
+
{"version":3,"file":"componentConfig.d.ts","sourceRoot":"","sources":["../../packages/config/componentConfig.ts"],"names":[],"mappings":"AAOA,OAAO,EAAC,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAEpD,QAAA,MAAM,eAAe,EAAE,mBAiEtB,CAAA;AAED,eAAe,eAAe,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseGuide.d.ts","sourceRoot":"","sources":["../../../packages/config/use/UseGuide.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAE,iBAAiB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;
|
|
1
|
+
{"version":3,"file":"UseGuide.d.ts","sourceRoot":"","sources":["../../../packages/config/use/UseGuide.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAE,iBAAiB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAGhG,cAAM,QAAS,YAAW,iBAAiB;IACvC,cAAc,EAAE,qBAAqB,GAAG,IAAI,CAAA;;IAM5C,UAAU,CAAC,MAAM,EAAE,kBAAkB;CAsBxC;AAED,QAAA,MAAM,QAAQ,UAAiB,CAAA;AAE/B,eAAe,QAAQ,CAAA"}
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
6
6
|
// @ts-ignore
|
|
7
7
|
const index_vue_1 = __importDefault(require("../../components/base/baseGuide/index.vue"));
|
|
8
8
|
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
const vue_1 = __importDefault(require("vue"));
|
|
9
10
|
class UseGuide {
|
|
10
11
|
constructor() {
|
|
11
12
|
this.guideComponent = null;
|
|
@@ -17,12 +18,12 @@ class UseGuide {
|
|
|
17
18
|
componentProps: Object.assign({}, params),
|
|
18
19
|
});
|
|
19
20
|
this.guideComponent.on('mounted', (component) => {
|
|
20
|
-
|
|
21
|
+
vue_1.default.nextTick(() => {
|
|
22
|
+
component.guideControl.onStartGuide();
|
|
23
|
+
});
|
|
21
24
|
});
|
|
22
25
|
this.guideComponent.on('destroyed', () => {
|
|
23
|
-
console.log('destroyed');
|
|
24
26
|
this.guideComponent = null;
|
|
25
|
-
console.log(this.guideComponent);
|
|
26
27
|
});
|
|
27
28
|
this.guideComponent.init();
|
|
28
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseImg.d.ts","sourceRoot":"","sources":["../../../packages/config/use/UseImg.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UseImg.d.ts","sourceRoot":"","sources":["../../../packages/config/use/UseImg.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAE,gBAAgB,EAAC,MAAM,oBAAoB,CAAC;AAG3E,cAAM,MAAO,YAAW,gBAAgB;IACpC,YAAY,EAAE,qBAAqB,GAAG,IAAI,CAAC;;IAM3C,MAAM,CAAC,IAAI,EAAE,GAAG,EAAE;IAoBlB,OAAO;CAOV;AAED,QAAA,IAAI,MAAM,QAAe,CAAC;AAE1B,eAAe,MAAM,CAAC"}
|
package/lib/config/use/UseImg.js
CHANGED
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const vue_1 = __importDefault(require("vue"));
|
|
7
6
|
// @ts-ignore
|
|
8
7
|
const image_viewer_vue_1 = __importDefault(require("../../components/base/baseImageViewer/image-viewer.vue"));
|
|
9
8
|
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
const vue_1 = __importDefault(require("vue"));
|
|
10
10
|
class UseImg {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.dynamicMount = null;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"UseUpload.d.ts","sourceRoot":"","sources":["../../../packages/config/use/UseUpload.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"UseUpload.d.ts","sourceRoot":"","sources":["../../../packages/config/use/UseUpload.ts"],"names":[],"mappings":"AAGA,OAAO,EAAC,qBAAqB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAG7E,cAAM,SAAU,YAAW,kBAAkB;IACzC,MAAM,EAAE,GAAG,EAAE,CAAC;IACd,YAAY,EAAE,qBAAqB,GAAG,IAAI,CAAC;IAC3C,IAAI,EAAE,OAAO,CAAC;;IAQd,QAAQ,CAAC,UAAU,KAAA,EAAE,EAAE,KAAA;IA2BvB,QAAQ,CAAC,GAAG,OAAO;IAmBnB,gBAAgB,CAAC,IAAI,KAAA;CAYxB;AAED,QAAA,IAAI,SAAS,WAAkB,CAAA;AAE/B,eAAe,SAAS,CAAA"}
|
|
@@ -3,10 +3,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const vue_1 = __importDefault(require("vue"));
|
|
7
6
|
// @ts-ignore
|
|
8
7
|
const upload_vue_1 = __importDefault(require("../../components/base/upload/upload.vue"));
|
|
9
8
|
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
const vue_1 = __importDefault(require("vue"));
|
|
10
10
|
class UseUpload {
|
|
11
11
|
constructor() {
|
|
12
12
|
this.cbList = [];
|