mirror of
https://gitee.com/devlive-community/datacap.git
synced 2024-12-02 20:17:45 +08:00
[web] fix editor bugs
This commit is contained in:
parent
2d1c565ddb
commit
97ab813ccb
27319
core/datacap-web/console-fe/package-lock.json
generated
Normal file
27319
core/datacap-web/console-fe/package-lock.json
generated
Normal file
File diff suppressed because it is too large
Load Diff
@ -14,7 +14,7 @@ export class HttpCommon
|
||||
{
|
||||
if (process.env.NODE_ENV === 'development' ||
|
||||
window.location.hostname === 'localhost') {
|
||||
axios.defaults.baseURL = 'http://localhost:9096';
|
||||
axios.defaults.baseURL = 'http://139.198.158.103:9096';
|
||||
}
|
||||
else {
|
||||
axios.defaults.baseURL = window.location.protocol + "//" + window.location.hostname + (window.location.port ? ':' + window.location.port : '');
|
||||
|
@ -62,11 +62,11 @@
|
||||
<Button @click="handlerPlusEditor" size="small" type="primary" icon="md-add"/>
|
||||
</template>
|
||||
<TabPane v-for="editor in editors" :key="editor.key" :name="editor.key" :label="editor.title" :closable="editor.closable">
|
||||
<MonacoEditor theme="vs" :options="{theme: 'vs-dark', fontSize: 15}" language="sql" :height="300"
|
||||
:key="activeKey.value" @change="handlerChangeEditorValue"
|
||||
v-model:value="activeEditorValue" @editorDidMount="handlerEditorDidMount($event, 'mysql')">
|
||||
</MonacoEditor>
|
||||
</TabPane>
|
||||
<MonacoEditor theme="vs" :options="{theme: 'vs-dark', fontSize: 15}" language="sql" :height="300"
|
||||
:key="activeKey.value" @change="handlerChangeEditorValue" :width="'100%'"
|
||||
v-model:value="activeEditorValue" @editorDidMount="handlerEditorDidMount($event, 'mysql')">
|
||||
</MonacoEditor>
|
||||
</Tabs>
|
||||
</div>
|
||||
</Card>
|
||||
@ -147,6 +147,13 @@ export default defineComponent({
|
||||
{
|
||||
this.handlerInitialize();
|
||||
},
|
||||
mounted(){
|
||||
window.onresize=()=>{
|
||||
if(editorMap.values().next().value){
|
||||
editorMap.values().next().value.layout({width: this.$refs.editorContainer.offsetWidth,height:300})
|
||||
}
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handlerInitialize()
|
||||
{
|
||||
@ -229,6 +236,9 @@ export default defineComponent({
|
||||
});
|
||||
}
|
||||
});
|
||||
setTimeout(()=>{
|
||||
editorMap.values().next().value?.layout({width: this.$refs.editorContainer.offsetWidth,height:300})
|
||||
},200)
|
||||
},
|
||||
handlerRun()
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user