@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.umd.js CHANGED
@@ -9919,6 +9919,7 @@
9919
9919
  useShadowRoot: true,
9920
9920
  target: null,
9921
9921
  content: "默认文字",
9922
+ isDiffContent: false,
9922
9923
  position: "top",
9923
9924
  className: "",
9924
9925
  isFixed: false,
@@ -10044,6 +10045,19 @@
10044
10045
  if (text == null) {
10045
10046
  text = this.getContent();
10046
10047
  }
10048
+ if (this.$data.config.isDiffContent) {
10049
+ let contentPropKey = "data-content";
10050
+ // @ts-ignore
10051
+ let originContentText = this.$el.$content[contentPropKey];
10052
+ if (typeof originContentText === "string") {
10053
+ if (originContentText === text) {
10054
+ // 内容未改变,不修改避免渲染
10055
+ return;
10056
+ }
10057
+ }
10058
+ // @ts-ignore
10059
+ this.$el.$content[contentPropKey] = text;
10060
+ }
10047
10061
  PopsSafeUtils.setSafeHTML(this.$el.$content, text);
10048
10062
  }
10049
10063
  /**