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

update: 消除当下运行时警告

This commit is contained in:
shangbin
2021-12-06 14:13:00 +08:00
parent d6f575c503
commit 1f52b5da21
6 changed files with 94 additions and 100 deletions

View File

@@ -64,13 +64,8 @@ export class MainPanelProvider {
let newScript = script.content.replace(/\s*export default\s*/, "")
const componentOptions = (new Function(`return ${newScript}`))();
const render = compile(template.content);
componentOptions.render = function () {
const rootVNode = render.apply(this, arguments);
return rootVNode;
};
// componentOptions.staticRenderFns = render.staticRenderFns;
componentOptions.template = template.content;
// 渲染当前代码
createBaseApp(componentOptions).mount(readyForMoutedElement);