@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.cjs.js CHANGED
@@ -6537,42 +6537,7 @@ const PopsPanelConfig = () => {
6537
6537
  },
6538
6538
  },
6539
6539
  ],
6540
- bottomContentConfig: [
6541
- {
6542
- text: "Github",
6543
- position: "left",
6544
- className: "user-home",
6545
- attributes: {
6546
- "data-url": "https://github.com/whitesevs",
6547
- },
6548
- props: {
6549
- "data-test": 1,
6550
- },
6551
- disableHoverCSS: false,
6552
- clickCallback() {
6553
- const userHomeUrl = this.attributes["data-url"];
6554
- console.log("打开个人主页:" + userHomeUrl);
6555
- window.open(userHomeUrl, "_blank");
6556
- },
6557
- afterRender(config) {
6558
- console.log(config);
6559
- },
6560
- },
6561
- {
6562
- text: "0.0.1",
6563
- position: "right",
6564
- className: "script-version",
6565
- attributes: {},
6566
- props: {},
6567
- disableHoverCSS: true,
6568
- clickCallback() {
6569
- console.log("当前版本:" + this.text);
6570
- },
6571
- afterRender(config) {
6572
- console.log(config);
6573
- },
6574
- },
6575
- ],
6540
+ bottomContentConfig: [],
6576
6541
  btn: {
6577
6542
  close: {
6578
6543
  enable: true,
@@ -10089,8 +10054,19 @@ const PopsPanel = {
10089
10054
  let config = PopsPanelConfig();
10090
10055
  config = popsUtils.assign(config, GlobalConfig.getGlobalConfig());
10091
10056
  config = popsUtils.assign(config, details);
10092
- if (details && Array.isArray(details.content)) {
10093
- config.content = details.content;
10057
+ if (details) {
10058
+ if (Array.isArray(details.content)) {
10059
+ // 存在内容配置
10060
+ config.content = details.content;
10061
+ }
10062
+ if (Array.isArray(details.bottomContentConfig)) {
10063
+ // 存在底部配置
10064
+ config.bottomContentConfig = details.bottomContentConfig;
10065
+ }
10066
+ else {
10067
+ // 不存在底部配置 清空默认的
10068
+ config.bottomContentConfig = [];
10069
+ }
10094
10070
  }
10095
10071
  config = PopsHandler.handleOnly(popsType, config);
10096
10072
  const { $shadowContainer, $shadowRoot } = PopsHandler.handlerShadow(config);
@@ -11944,7 +11920,7 @@ const PopsSearchSuggestion = {
11944
11920
  },
11945
11921
  };
11946
11922
 
11947
- const version = "2.5.3";
11923
+ const version = "2.5.4";
11948
11924
 
11949
11925
  class Pops {
11950
11926
  /** 配置 */