@fast-china/utils 1.0.21 → 1.0.22
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.global.js +12 -6
- package/dist/index.global.js.map +1 -1
- package/dist/index.global.min.js +1 -1
- package/dist/index.global.min.js.map +1 -1
- package/es/dom/style.d.ts +1 -1
- package/es/dom/style.mjs +13 -7
- package/es/dom/style.mjs.map +1 -1
- package/lib/dom/style.d.ts +1 -1
- package/lib/dom/style.js +1 -1
- package/lib/dom/style.js.map +1 -1
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -13552,12 +13552,18 @@ var FastUtils = function(exports, vue) {
|
|
|
13552
13552
|
}
|
|
13553
13553
|
consoleWarn("document", "binding value must be a string or number");
|
|
13554
13554
|
};
|
|
13555
|
-
const styleToString = (
|
|
13556
|
-
if (!
|
|
13557
|
-
|
|
13558
|
-
|
|
13559
|
-
|
|
13560
|
-
|
|
13555
|
+
const styleToString = (styles) => {
|
|
13556
|
+
if (!styles) return "";
|
|
13557
|
+
if (isArray(styles)) {
|
|
13558
|
+
return styles.filter((item) => item && (item == null ? void 0 : item.length) > 0).map((item) => styleToString(item)).join(" ");
|
|
13559
|
+
} else if (isString(styles)) {
|
|
13560
|
+
return styles.trimEnd().endsWith(";") ? styles.trimEnd() : `${styles.trimEnd()};`;
|
|
13561
|
+
} else {
|
|
13562
|
+
return Object.entries(styles).filter(([_, value]) => value !== null && value !== "").map(([key, value]) => {
|
|
13563
|
+
const keyName = key.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
13564
|
+
return `${keyName}: ${value};`;
|
|
13565
|
+
}).join(" ");
|
|
13566
|
+
}
|
|
13561
13567
|
};
|
|
13562
13568
|
const envUtil = {
|
|
13563
13569
|
/**
|