@fast-china/utils 1.0.20 → 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.
@@ -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 = (style) => {
13556
- if (!style) return "";
13557
- return Object.entries(style).map(([key, value]) => {
13558
- const keyName = key.replace(/([A-Z])/g, "-$1").toLowerCase();
13559
- return `${keyName}: ${value};`;
13560
- }).join(" ");
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
  /**