@whitesev/pops 2.0.8 → 2.0.9
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 +14 -0
- package/dist/index.amd.js.map +1 -1
- package/dist/index.cjs.js +14 -0
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +14 -0
- package/dist/index.esm.js.map +1 -1
- package/dist/index.iife.js +14 -0
- package/dist/index.iife.js.map +1 -1
- package/dist/index.system.js +14 -0
- package/dist/index.system.js.map +1 -1
- package/dist/index.umd.js +14 -0
- package/dist/index.umd.js.map +1 -1
- package/dist/types/src/Pops.d.ts +1 -0
- package/dist/types/src/components/tooltip/index.d.ts +1 -0
- package/dist/types/src/components/tooltip/indexType.d.ts +7 -0
- package/package.json +1 -1
- package/src/components/tooltip/config.ts +1 -0
- package/src/components/tooltip/index.ts +13 -0
- package/src/components/tooltip/indexType.ts +7 -0
package/dist/index.iife.js
CHANGED
|
@@ -9916,6 +9916,7 @@ var pops = (function () {
|
|
|
9916
9916
|
useShadowRoot: true,
|
|
9917
9917
|
target: null,
|
|
9918
9918
|
content: "默认文字",
|
|
9919
|
+
isDiffContent: false,
|
|
9919
9920
|
position: "top",
|
|
9920
9921
|
className: "",
|
|
9921
9922
|
isFixed: false,
|
|
@@ -10041,6 +10042,19 @@ var pops = (function () {
|
|
|
10041
10042
|
if (text == null) {
|
|
10042
10043
|
text = this.getContent();
|
|
10043
10044
|
}
|
|
10045
|
+
if (this.$data.config.isDiffContent) {
|
|
10046
|
+
let contentPropKey = "data-content";
|
|
10047
|
+
// @ts-ignore
|
|
10048
|
+
let originContentText = this.$el.$content[contentPropKey];
|
|
10049
|
+
if (typeof originContentText === "string") {
|
|
10050
|
+
if (originContentText === text) {
|
|
10051
|
+
// 内容未改变,不修改避免渲染
|
|
10052
|
+
return;
|
|
10053
|
+
}
|
|
10054
|
+
}
|
|
10055
|
+
// @ts-ignore
|
|
10056
|
+
this.$el.$content[contentPropKey] = text;
|
|
10057
|
+
}
|
|
10044
10058
|
PopsSafeUtils.setSafeHTML(this.$el.$content, text);
|
|
10045
10059
|
}
|
|
10046
10060
|
/**
|