1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-12-20 09:45:43 +08:00
This commit is contained in:
shangbin
2021-04-09 20:06:44 +08:00
commit e87ebafdcb
97 changed files with 33753 additions and 0 deletions

24
src/utils/common.js Normal file
View File

@@ -0,0 +1,24 @@
import isEqual from "lodash/isEqual";
export function getRawComponentKey(__rawVueInfo__) {
return Object.keys(__rawVueInfo__)[0];
}
export function getRawComponentContent(__rawVueInfo__) {
return __rawVueInfo__[getRawComponentKey(__rawVueInfo__)];
}
/**
* 比较两个对象是否完全相等
*/
export function compareTwoObjectIsEqual(o1, o2) {
return isEqual(o1, o2);
}
export function isArray(arr) {
return Object.prototype.toString.apply(arr) === "[object Array]";
}
export function isObject(obj) {
return Object.prototype.toString.apply(obj) === "[object Object]";
}