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