1
0
mirror of https://github.com/sahadev/vue-component-creater-ui.git synced 2025-12-18 16:34:17 +08:00

feat: Vue二次编辑集成进入VCC

This commit is contained in:
shangbin
2021-11-17 14:53:44 +08:00
parent 0b83a65061
commit 08235dcdd1
6 changed files with 133 additions and 16 deletions

View File

@@ -53,4 +53,19 @@ export function ergodic(jsonObj) {
jsonObj["lc_id"] = cryptoRandomString({ length: 10, type: "base64" });
}
}
}
/**
* 从解析后的Vue结构中找到关键的根节点
* 根节点分包是template/script/style
*
* @param {*} array
* @param {*} propertyName
* @returns
*/
export function findAObject(array, propertyName) {
const module = array.find(function (ele) {
return ele[propertyName];
});
return module || null;
}