mirror of
https://github.com/sahadev/vue-component-creater-ui.git
synced 2025-09-28 07:13:21 +08:00
update: 消除当下运行时警告
This commit is contained in:
@@ -38,14 +38,12 @@
|
||||
<el-tooltip effect="dark" content="查看实时代码" placement="top-start">
|
||||
<img class="round-icon" :src="iconCode" alt="" @click="codeDialogVisible = true">
|
||||
</el-tooltip>
|
||||
<el-tooltip effect="dark" content="清空当前编辑内容" placement="top-start">
|
||||
<el-popconfirm confirmButtonText="确认" cancelButtonText="点错了" icon="el-icon-info" iconColor="red"
|
||||
title="点我将清空所有编辑的内容, 确认吗?" @onConfirm="clear">
|
||||
<template #reference>
|
||||
<img class="round-icon" :src="iconClear" alt="">
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-tooltip>
|
||||
<el-popconfirm confirmButtonText="确认" cancelButtonText="点错了" icon="el-icon-info" iconColor="red"
|
||||
title="点我将清空所有编辑的内容, 确认吗?" @confirm="clear">
|
||||
<template #reference>
|
||||
<img class="round-icon" :src="iconClear" alt="">
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
|
@@ -12,7 +12,7 @@
|
||||
<el-col :span="16" style="height: 100%;">
|
||||
<div style="overflow: scroll;height:100%; margin: 0 20px;padding: 10px;">
|
||||
|
||||
<vue-nestable v-model="treeData" @change="onLevelChange">
|
||||
<!-- <vue-nestable v-model="treeData" @change="onLevelChange">
|
||||
<template v-slot="{ item }">
|
||||
<vue-nestable-handle :item="item">
|
||||
<i class="el-icon-rank icon-s"></i>
|
||||
@@ -24,7 +24,7 @@
|
||||
<template v-slot:placeholder>
|
||||
<div><b>The editor is empty.</b></div>
|
||||
</template>
|
||||
</vue-nestable>
|
||||
</vue-nestable> -->
|
||||
|
||||
</div>
|
||||
</el-col>
|
||||
@@ -44,14 +44,15 @@
|
||||
import "./halower-tree.min.css";
|
||||
import "@/assets/nestable.css"
|
||||
import { isObject, getRawComponentKey, getRawComponentContent } from "@/utils/common";
|
||||
import { VueNestable, VueNestableHandle } from 'vue-nestable';
|
||||
// import { VueNestable, VueNestableHandle } from 'vue-nestable';
|
||||
|
||||
export default {
|
||||
props: ['visible'],
|
||||
emits: ['codeRefresh', 'onLevelChange', 'remove', 'save', 'update:visible'],
|
||||
components: {
|
||||
AttributeInput: resolve => { require(["./AttributeInput"], resolve) },
|
||||
VueNestable,
|
||||
VueNestableHandle
|
||||
// VueNestable,
|
||||
// VueNestableHandle
|
||||
},
|
||||
|
||||
data() {
|
||||
|
@@ -18,6 +18,7 @@ import dedent from 'dedent'
|
||||
|
||||
export default {
|
||||
props: ['codeDialogVisible'],
|
||||
emits: ['saveJSCode'],
|
||||
components: {
|
||||
// CodeEditor
|
||||
},
|
||||
|
@@ -20,6 +20,7 @@ import { ergodic, findAObject } from '../utils/common';
|
||||
|
||||
export default {
|
||||
props: ['vueDialogVisible'],
|
||||
emits: ['codeParseSucess', 'update:vueDialogVisible'],
|
||||
components: {
|
||||
CodeEditor
|
||||
},
|
||||
|
@@ -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);
|
||||
|
Reference in New Issue
Block a user