@whitesev/pops 2.0.8 → 2.0.10

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.
@@ -298,6 +298,7 @@ declare class Pops {
298
298
  config: {
299
299
  target: HTMLElement;
300
300
  content: string | (() => string);
301
+ isDiffContent: boolean;
301
302
  position: import("./components/tooltip/indexType").PopsTooltipPosition;
302
303
  className: string;
303
304
  isFixed: boolean;
@@ -8,9 +8,14 @@ export interface PopsPanelSelectMultipleDataOption<T> {
8
8
  /**
9
9
  * 显示的文字
10
10
  */
11
- text: string;
11
+ text: string | ((
12
+ /** 当前的值 */
13
+ value: T,
14
+ /** 所有选中的配置信息 */
15
+ allSelectedInfo: PopsPanelSelectMultipleDataOption<T>[]) => string);
12
16
  /**
13
17
  * 显示的文字是否是html
18
+ * @default false
14
19
  */
15
20
  isHTML?: boolean;
16
21
  /**
@@ -18,8 +23,10 @@ export interface PopsPanelSelectMultipleDataOption<T> {
18
23
  * 触发条件:
19
24
  * + 点击select元素
20
25
  * + select元素触发change事件
26
+ * @param value 当前的值
27
+ * @param allSelectedInfo 所有选中的配置信息
21
28
  */
22
- disable?(value: T): boolean;
29
+ disable?(value: T, allSelectedInfo: PopsPanelSelectMultipleDataOption<T>[]): boolean;
23
30
  }
24
31
  /**
25
32
  * pops.panel的 select
@@ -77,12 +84,7 @@ export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommon
77
84
  */
78
85
  callback?(
79
86
  /** 当前已选中的信息 */
80
- isSelectedInfo: {
81
- /** 值 */
82
- value: T;
83
- /** 显示的文字 */
84
- text: string;
85
- }[]): void;
87
+ isSelectedInfo: PopsPanelSelectMultipleDataOption<any>[]): void;
86
88
  /**
87
89
  * 点击某个项的元素触发该回调
88
90
  * @param event 点击事件
@@ -91,12 +93,7 @@ export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommon
91
93
  */
92
94
  clickCallBack?(event: PointerEvent | MouseEvent,
93
95
  /** 当前已选中的信息 */
94
- isSelectedInfo: {
95
- /** 值 */
96
- value: T;
97
- /** 显示的文字 */
98
- text: string;
99
- }[]): void | boolean;
96
+ isSelectedInfo: PopsPanelSelectMultipleDataOption<any>[]): void | boolean;
100
97
  /**
101
98
  * 点击标签tag的关闭图标触发该回调
102
99
  * 如果返回boolean类型且为false,则阻止默认的事件
@@ -109,7 +106,7 @@ export interface PopsPanelSelectMultipleDetails<T = any> extends PopsPanelCommon
109
106
  /** 值 */
110
107
  value: T;
111
108
  /** 显示的文字 */
112
- text: string;
109
+ text: PopsPanelSelectMultipleDataOption<T>["text"];
113
110
  }) => void | boolean;
114
111
  /**
115
112
  * 选择器内的数据组
@@ -184,6 +184,7 @@ export declare const PopsTooltip: {
184
184
  config: {
185
185
  target: HTMLElement;
186
186
  content: string | (() => string);
187
+ isDiffContent: boolean;
187
188
  position: import("./indexType").PopsTooltipPosition;
188
189
  className: string;
189
190
  isFixed: boolean;
@@ -13,6 +13,13 @@ export interface PopsToolTipDetails extends Pick<PopsCommonConfig, "useShadowRoo
13
13
  * 显示的文字
14
14
  */
15
15
  content: string | (() => string);
16
+ /**
17
+ * 是否比较获取到的content的内容是否改变
18
+ *
19
+ * 如果未改变,则在触发.show时不修改内容
20
+ * @default false
21
+ */
22
+ isDiffContent?: boolean;
16
23
  /**
17
24
  * 位置
18
25
  * + `follow` 跟随鼠标|触摸位置移动
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/pops",
3
- "version": "2.0.8",
3
+ "version": "2.0.10",
4
4
  "description": "弹窗库",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
@@ -51,6 +51,7 @@
51
51
  "scripts": {
52
52
  "dev": "rollup --config --watch",
53
53
  "build": "rollup --config",
54
- "build:all": "rollup --config"
54
+ "build:all": "rollup --config",
55
+ "build:all-new": "rollup --config"
55
56
  }
56
57
  }