@fast-china/utils 1.0.13 → 1.0.14
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 +23 -0
- package/dist/index.global.js.map +1 -1
- package/dist/index.global.min.js +5 -5
- package/dist/index.global.min.js.map +1 -1
- package/es/object/index.d.ts +4 -0
- package/es/object/index.mjs +25 -0
- package/es/object/index.mjs.map +1 -1
- package/lib/object/index.d.ts +4 -0
- package/lib/object/index.js +1 -1
- package/lib/object/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.global.js
CHANGED
|
@@ -14031,6 +14031,29 @@ var FastUtils = function(exports, vue) {
|
|
|
14031
14031
|
}
|
|
14032
14032
|
}
|
|
14033
14033
|
return params;
|
|
14034
|
+
},
|
|
14035
|
+
/**
|
|
14036
|
+
* 将外部传入的样式格式化成可读的 CSS 样式。
|
|
14037
|
+
*/
|
|
14038
|
+
objectToStyle(styles) {
|
|
14039
|
+
if (isArray(styles)) {
|
|
14040
|
+
return styles.filter(function(item) {
|
|
14041
|
+
return item != null && item !== "";
|
|
14042
|
+
}).map(function(item) {
|
|
14043
|
+
return objectUtil.objectToStyle(item);
|
|
14044
|
+
}).join(";");
|
|
14045
|
+
}
|
|
14046
|
+
if (isString(styles)) {
|
|
14047
|
+
return styles;
|
|
14048
|
+
}
|
|
14049
|
+
if (isObject(styles)) {
|
|
14050
|
+
return Object.keys(styles).filter(function(key) {
|
|
14051
|
+
return styles[key] != null && styles[key] !== "";
|
|
14052
|
+
}).map(function(key) {
|
|
14053
|
+
return [stringUtil.toCamelCase(key), styles[key]].join(":");
|
|
14054
|
+
}).join(";");
|
|
14055
|
+
}
|
|
14056
|
+
return "";
|
|
14034
14057
|
}
|
|
14035
14058
|
};
|
|
14036
14059
|
const useExpose = (expose, exposed) => {
|