@whitesev/pops 2.5.3 → 2.5.4
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/index.amd.js +15 -39
- package/dist/index.amd.js.map +1 -1
- package/dist/index.amd.min.js +1 -1
- package/dist/index.amd.min.js.map +1 -1
- package/dist/index.cjs.js +15 -39
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.cjs.min.js +1 -1
- package/dist/index.cjs.min.js.map +1 -1
- package/dist/index.esm.js +15 -39
- package/dist/index.esm.js.map +1 -1
- package/dist/index.esm.min.js +1 -1
- package/dist/index.esm.min.js.map +1 -1
- package/dist/index.iife.js +15 -39
- package/dist/index.iife.js.map +1 -1
- package/dist/index.iife.min.js +1 -1
- package/dist/index.iife.min.js.map +1 -1
- package/dist/index.system.js +15 -39
- package/dist/index.system.js.map +1 -1
- package/dist/index.system.min.js +1 -1
- package/dist/index.system.min.js.map +1 -1
- package/dist/index.umd.js +15 -39
- package/dist/index.umd.js.map +1 -1
- package/dist/index.umd.min.js +1 -1
- package/dist/index.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/panel/config.ts +1 -36
- package/src/components/panel/index.ts +12 -2
package/package.json
CHANGED
|
@@ -490,42 +490,7 @@ export const PopsPanelConfig = (): DeepRequired<PopsPanelDetails> => {
|
|
|
490
490
|
},
|
|
491
491
|
},
|
|
492
492
|
],
|
|
493
|
-
bottomContentConfig: [
|
|
494
|
-
{
|
|
495
|
-
text: "Github",
|
|
496
|
-
position: "left",
|
|
497
|
-
className: "user-home",
|
|
498
|
-
attributes: {
|
|
499
|
-
"data-url": "https://github.com/whitesevs",
|
|
500
|
-
},
|
|
501
|
-
props: {
|
|
502
|
-
"data-test": 1,
|
|
503
|
-
},
|
|
504
|
-
disableHoverCSS: false,
|
|
505
|
-
clickCallback() {
|
|
506
|
-
const userHomeUrl = (this.attributes as { [key: string]: any })["data-url"];
|
|
507
|
-
console.log("打开个人主页:" + userHomeUrl);
|
|
508
|
-
window.open(userHomeUrl, "_blank");
|
|
509
|
-
},
|
|
510
|
-
afterRender(config) {
|
|
511
|
-
console.log(config);
|
|
512
|
-
},
|
|
513
|
-
},
|
|
514
|
-
{
|
|
515
|
-
text: "0.0.1",
|
|
516
|
-
position: "right",
|
|
517
|
-
className: "script-version",
|
|
518
|
-
attributes: {},
|
|
519
|
-
props: {},
|
|
520
|
-
disableHoverCSS: true,
|
|
521
|
-
clickCallback() {
|
|
522
|
-
console.log("当前版本:" + this.text);
|
|
523
|
-
},
|
|
524
|
-
afterRender(config) {
|
|
525
|
-
console.log(config);
|
|
526
|
-
},
|
|
527
|
-
},
|
|
528
|
-
],
|
|
493
|
+
bottomContentConfig: [],
|
|
529
494
|
btn: {
|
|
530
495
|
close: {
|
|
531
496
|
enable: true,
|
|
@@ -19,8 +19,18 @@ export const PopsPanel = {
|
|
|
19
19
|
let config: Required<PopsPanelDetails> = PopsPanelConfig();
|
|
20
20
|
config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
|
|
21
21
|
config = popsUtils.assign(config, details);
|
|
22
|
-
if (details
|
|
23
|
-
|
|
22
|
+
if (details) {
|
|
23
|
+
if (Array.isArray(details.content)) {
|
|
24
|
+
// 存在内容配置
|
|
25
|
+
config.content = details.content;
|
|
26
|
+
}
|
|
27
|
+
if (Array.isArray(details.bottomContentConfig)) {
|
|
28
|
+
// 存在底部配置
|
|
29
|
+
config.bottomContentConfig = details.bottomContentConfig;
|
|
30
|
+
} else {
|
|
31
|
+
// 不存在底部配置 清空默认的
|
|
32
|
+
config.bottomContentConfig = [];
|
|
33
|
+
}
|
|
24
34
|
}
|
|
25
35
|
config = PopsHandler.handleOnly(popsType, config);
|
|
26
36
|
|