@whitesev/domutils 1.5.3 → 1.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@whitesev/domutils",
3
- "version": "1.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "使用js重新对jQuery的部分函数进行了仿写",
5
5
  "main": "dist/index.cjs.js",
6
6
  "module": "dist/index.esm.js",
package/src/DOMUtils.ts CHANGED
@@ -20,7 +20,7 @@ class DOMUtils extends DOMUtilsEvent {
20
20
  super(option);
21
21
  }
22
22
  /** 版本号 */
23
- version = "2025.4.23";
23
+ version = "2025.5.12";
24
24
  /**
25
25
  * 获取元素的属性值
26
26
  * @param element 目标元素
@@ -284,7 +284,10 @@ class DOMUtils extends DOMUtilsEvent {
284
284
  propertyName: string,
285
285
  propertyValue: string | number
286
286
  ) => {
287
- if (propertyValue === "string" && propertyValue.includes("!important")) {
287
+ if (
288
+ typeof propertyValue === "string" &&
289
+ propertyValue.trim().endsWith("!important")
290
+ ) {
288
291
  propertyValue = propertyValue
289
292
  .trim()
290
293
  .replace(/!important$/gi, "")