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