fix: 修复build后无法获取组件ctx

This commit is contained in:
meilin.huang
2022-02-09 10:41:48 +08:00
parent 1d2f1a69b9
commit 2698157ce7
3 changed files with 10 additions and 10 deletions

View File

@@ -33,7 +33,7 @@ const SqlExecBox = (props: SqlExecProps): void => {
if (boxInstance) {
const boxVue = boxInstance.component
// 调用open方法显示弹框
boxVue.ctx.open(props);
boxVue.proxy.open(props);
} else {
boxInstance = renderBox()
SqlExecBox(props)

View File

@@ -2,7 +2,7 @@
<div>
<el-dialog title="待执行SQL" v-model="dialogVisible" :show-close="false" width="600px">
<codemirror height="350px" class="codesql" ref="cmEditor" language="sql" v-model="sql" :options="cmOptions" />
<div class="dialog-footer mt10">
<div class="footer mt10">
<el-button @click="runSql" type="primary" :loading="btnLoading"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
@@ -122,7 +122,7 @@ export default defineComponent({
font-size: 9pt;
font-weight: 600;
}
.dialog-footer {
.footer {
float: right;
}
</style>

View File

@@ -50,14 +50,14 @@
</el-dialog>
<el-dialog :title="tree.title" v-model="tree.visible" :close-on-click-modal="false" width="680px">
<el-progress
v-if="uploadProgressShow"
style="width: 90%; margin-left: 20px"
:text-inside="true"
:stroke-width="20"
:percentage="progressNum"
/>
<div style="height: 45vh; overflow: auto">
<el-progress
v-if="uploadProgressShow"
style="width: 90%; margin-left: 20px"
:text-inside="true"
:stroke-width="20"
:percentage="progressNum"
/>
<el-tree v-if="tree.visible" ref="fileTree" :load="loadNode" :props="props" lazy node-key="id" :expand-on-click-node="true">
<template #default="{ node, data }">
<span class="custom-tree-node">