mirror of
https://github.com/1Panel-dev/1Panel.git
synced 2025-03-01 11:34:13 +08:00
fix: 解决 codemirror 样式问题
This commit is contained in:
parent
2cc3613e41
commit
2737155a7f
@ -11,7 +11,7 @@
|
|||||||
placeholder="None data"
|
placeholder="None data"
|
||||||
:indent-with-tab="true"
|
:indent-with-tab="true"
|
||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
style="max-height: 500px"
|
style="max-height: 500px; min-height: 200px; width: 100%"
|
||||||
:lineWrapping="true"
|
:lineWrapping="true"
|
||||||
:matchBrackets="true"
|
:matchBrackets="true"
|
||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
|
@ -23,6 +23,7 @@
|
|||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
|
@ready="handleReady"
|
||||||
v-model="logInfo"
|
v-model="logInfo"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
@ -33,7 +34,7 @@
|
|||||||
import { logContainer } from '@/api/modules/container';
|
import { logContainer } from '@/api/modules/container';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { dateFromatForName } from '@/utils/util';
|
import { dateFromatForName } from '@/utils/util';
|
||||||
import { reactive, ref } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
@ -41,6 +42,11 @@ import { oneDark } from '@codemirror/theme-one-dark';
|
|||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
|
|
||||||
const logInfo = ref();
|
const logInfo = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
|
|
||||||
const logSearch = reactive({
|
const logSearch = reactive({
|
||||||
isWatch: false,
|
isWatch: false,
|
||||||
container: '',
|
container: '',
|
||||||
@ -78,6 +84,13 @@ const onCloseLog = async () => {
|
|||||||
const searchLogs = async () => {
|
const searchLogs = async () => {
|
||||||
const res = await logContainer(logSearch);
|
const res = await logContainer(logSearch);
|
||||||
logInfo.value = res.data;
|
logInfo.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDownload = async () => {
|
const onDownload = async () => {
|
||||||
|
@ -39,7 +39,7 @@
|
|||||||
placeholder="None data"
|
placeholder="None data"
|
||||||
:indent-with-tab="true"
|
:indent-with-tab="true"
|
||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
style="max-height: 500px; width: 100%"
|
style="max-height: 500px; width: 100%; min-height: 200px"
|
||||||
:lineWrapping="true"
|
:lineWrapping="true"
|
||||||
:matchBrackets="true"
|
:matchBrackets="true"
|
||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
|
@ -2,11 +2,13 @@
|
|||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<LayoutContent :header="composeName" back-name="Compose" :reload="true">
|
<LayoutContent :header="composeName" back-name="Compose" :reload="true">
|
||||||
<div v-if="createdBy === '1Panel'">
|
<div v-if="createdBy === '1Panel'">
|
||||||
<el-button icon="VideoPlay" @click="onComposeOperate('start')">{{ $t('container.start') }}</el-button>
|
<el-button-group>
|
||||||
<el-button icon="VideoPause" @click="onComposeOperate('stop')">{{ $t('container.stop') }}</el-button>
|
<el-button @click="onComposeOperate('start')">{{ $t('container.start') }}</el-button>
|
||||||
<el-button icon="Delete" @click="onComposeOperate('down')" plain type="danger">
|
<el-button @click="onComposeOperate('stop')">{{ $t('container.stop') }}</el-button>
|
||||||
|
<el-button @click="onComposeOperate('down')">
|
||||||
{{ $t('container.remove') }}
|
{{ $t('container.remove') }}
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</el-button-group>
|
||||||
</div>
|
</div>
|
||||||
<div v-else>
|
<div v-else>
|
||||||
<el-alert :closable="false" show-icon :title="$t('container.composeDetailHelper')" type="info" />
|
<el-alert :closable="false" show-icon :title="$t('container.composeDetailHelper')" type="info" />
|
||||||
|
@ -7,12 +7,11 @@
|
|||||||
</template>
|
</template>
|
||||||
<div v-loading="loading">
|
<div v-loading="loading">
|
||||||
<codemirror
|
<codemirror
|
||||||
ref="mymirror"
|
|
||||||
:autofocus="true"
|
:autofocus="true"
|
||||||
placeholder="None data"
|
placeholder="None data"
|
||||||
:indent-with-tab="true"
|
:indent-with-tab="true"
|
||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
style="max-height: 500px"
|
style="max-height: 500px; width: 100%; min-height: 200px"
|
||||||
:lineWrapping="true"
|
:lineWrapping="true"
|
||||||
:matchBrackets="true"
|
:matchBrackets="true"
|
||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
|
@ -170,7 +170,7 @@ const buttons = [
|
|||||||
onEdit(row);
|
onEdit(row);
|
||||||
},
|
},
|
||||||
disabled: (row: any) => {
|
disabled: (row: any) => {
|
||||||
return row.createdBy !== 'Local';
|
return row.createdBy !== '1Panel';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@ -179,7 +179,7 @@ const buttons = [
|
|||||||
onDelete(row);
|
onDelete(row);
|
||||||
},
|
},
|
||||||
disabled: (row: any) => {
|
disabled: (row: any) => {
|
||||||
return row.createdBy === 'Apps';
|
return row.createdBy !== '1Panel';
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
@ -35,6 +35,7 @@
|
|||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
v-model="logInfo"
|
v-model="logInfo"
|
||||||
|
@ready="handleReady"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
@ -49,7 +50,7 @@
|
|||||||
import { logContainer } from '@/api/modules/container';
|
import { logContainer } from '@/api/modules/container';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { dateFromatForName } from '@/utils/util';
|
import { dateFromatForName } from '@/utils/util';
|
||||||
import { reactive, ref } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
@ -59,6 +60,11 @@ const extensions = [javascript(), oneDark];
|
|||||||
const logVisiable = ref(false);
|
const logVisiable = ref(false);
|
||||||
|
|
||||||
const logInfo = ref();
|
const logInfo = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
|
|
||||||
const logSearch = reactive({
|
const logSearch = reactive({
|
||||||
isWatch: false,
|
isWatch: false,
|
||||||
container: '',
|
container: '',
|
||||||
@ -94,6 +100,13 @@ const onCloseLog = async () => {
|
|||||||
const searchLogs = async () => {
|
const searchLogs = async () => {
|
||||||
const res = await logContainer(logSearch);
|
const res = await logContainer(logSearch);
|
||||||
logInfo.value = res.data;
|
logInfo.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onDownload = async () => {
|
const onDownload = async () => {
|
||||||
|
@ -22,7 +22,20 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-if="form.from === 'edit'" :rules="Rules.requiredInput">
|
<el-form-item v-if="form.from === 'edit'" :rules="Rules.requiredInput">
|
||||||
<el-input type="textarea" :autosize="{ minRows: 2, maxRows: 10 }" v-model="form.dockerfile" />
|
<codemirror
|
||||||
|
:autofocus="true"
|
||||||
|
placeholder="None data"
|
||||||
|
:indent-with-tab="true"
|
||||||
|
:tabSize="4"
|
||||||
|
style="max-height: 500px; width: 100%; min-height: 200px"
|
||||||
|
:lineWrapping="true"
|
||||||
|
:matchBrackets="true"
|
||||||
|
theme="cobalt"
|
||||||
|
:styleActiveLine="true"
|
||||||
|
:extensions="extensions"
|
||||||
|
v-model="form.dockerfile"
|
||||||
|
:readOnly="true"
|
||||||
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item v-else :rules="Rules.requiredSelect" prop="dockerfile">
|
<el-form-item v-else :rules="Rules.requiredSelect" prop="dockerfile">
|
||||||
<el-input clearable v-model="form.dockerfile">
|
<el-input clearable v-model="form.dockerfile">
|
||||||
@ -53,6 +66,7 @@
|
|||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
|
@ready="handleReady"
|
||||||
v-model="logInfo"
|
v-model="logInfo"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
@ -75,7 +89,7 @@ import FileList from '@/components/file-list/index.vue';
|
|||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { reactive, ref } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm, ElMessage } from 'element-plus';
|
||||||
@ -84,6 +98,10 @@ import { LoadFile } from '@/api/modules/files';
|
|||||||
|
|
||||||
const logVisiable = ref<boolean>(false);
|
const logVisiable = ref<boolean>(false);
|
||||||
const logInfo = ref();
|
const logInfo = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
let timer: NodeJS.Timer | null = null;
|
let timer: NodeJS.Timer | null = null;
|
||||||
|
|
||||||
@ -143,6 +161,13 @@ const loadLogs = async (path: string) => {
|
|||||||
if (logVisiable.value) {
|
if (logVisiable.value) {
|
||||||
const res = await LoadFile({ path: path });
|
const res = await LoadFile({ path: path });
|
||||||
logInfo.value = res.data;
|
logInfo.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, 1000 * 3);
|
}, 1000 * 3);
|
||||||
};
|
};
|
||||||
|
@ -44,6 +44,7 @@
|
|||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
|
@ready="handleReady"
|
||||||
v-model="logInfo"
|
v-model="logInfo"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
@ -61,7 +62,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm, ElMessage } from 'element-plus';
|
||||||
@ -83,6 +84,10 @@ const buttonDisabled = ref(false);
|
|||||||
|
|
||||||
const logVisiable = ref(false);
|
const logVisiable = ref(false);
|
||||||
const logInfo = ref();
|
const logInfo = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
let timer: NodeJS.Timer | null = null;
|
let timer: NodeJS.Timer | null = null;
|
||||||
|
|
||||||
@ -125,6 +130,13 @@ const loadLogs = async (path: string) => {
|
|||||||
if (logVisiable.value) {
|
if (logVisiable.value) {
|
||||||
const res = await LoadFile({ path: path });
|
const res = await LoadFile({ path: path });
|
||||||
logInfo.value = res.data;
|
logInfo.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, 1000 * 3);
|
}, 1000 * 3);
|
||||||
};
|
};
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
|
@ready="handleReady"
|
||||||
v-model="logInfo"
|
v-model="logInfo"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
@ -58,7 +59,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { reactive, ref } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Rules } from '@/global/form-rules';
|
import { Rules } from '@/global/form-rules';
|
||||||
import i18n from '@/lang';
|
import i18n from '@/lang';
|
||||||
import { ElForm, ElMessage } from 'element-plus';
|
import { ElForm, ElMessage } from 'element-plus';
|
||||||
@ -81,6 +82,10 @@ const buttonDisabled = ref(false);
|
|||||||
|
|
||||||
const logVisiable = ref(false);
|
const logVisiable = ref(false);
|
||||||
const logInfo = ref();
|
const logInfo = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
let timer: NodeJS.Timer | null = null;
|
let timer: NodeJS.Timer | null = null;
|
||||||
|
|
||||||
@ -124,6 +129,13 @@ const loadLogs = async (path: string) => {
|
|||||||
if (logVisiable.value) {
|
if (logVisiable.value) {
|
||||||
const res = await LoadFile({ path: path });
|
const res = await LoadFile({ path: path });
|
||||||
logInfo.value = res.data;
|
logInfo.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}, 1000 * 3);
|
}, 1000 * 3);
|
||||||
};
|
};
|
||||||
|
@ -18,7 +18,7 @@
|
|||||||
placeholder="None data"
|
placeholder="None data"
|
||||||
:indent-with-tab="true"
|
:indent-with-tab="true"
|
||||||
:tabSize="4"
|
:tabSize="4"
|
||||||
style="max-height: 500px; width: 100%"
|
style="max-height: 500px; width: 100%; min-height: 200px"
|
||||||
:lineWrapping="true"
|
:lineWrapping="true"
|
||||||
:matchBrackets="true"
|
:matchBrackets="true"
|
||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
|
@ -37,6 +37,7 @@
|
|||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
|
@ready="handleReady"
|
||||||
v-model="slowLogs"
|
v-model="slowLogs"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
@ -50,7 +51,7 @@
|
|||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { reactive, ref } from 'vue';
|
import { nextTick, reactive, ref, shallowRef } from 'vue';
|
||||||
import { Database } from '@/api/interface/database';
|
import { Database } from '@/api/interface/database';
|
||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
import ConfirmDialog from '@/components/confirm-dialog/index.vue';
|
||||||
@ -62,6 +63,10 @@ import i18n from '@/lang';
|
|||||||
const loading = ref();
|
const loading = ref();
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
const slowLogs = ref();
|
const slowLogs = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
|
|
||||||
const confirmDialogRef = ref();
|
const confirmDialogRef = ref();
|
||||||
|
|
||||||
@ -142,6 +147,13 @@ const onDownload = async () => {
|
|||||||
const loadMysqlSlowlogs = async (path: string) => {
|
const loadMysqlSlowlogs = async (path: string) => {
|
||||||
const res = await LoadFile({ path: path });
|
const res = await LoadFile({ path: path });
|
||||||
slowLogs.value = res.data;
|
slowLogs.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const onCloseLog = async () => {
|
const onCloseLog = async () => {
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
theme="cobalt"
|
theme="cobalt"
|
||||||
:styleActiveLine="true"
|
:styleActiveLine="true"
|
||||||
:extensions="extensions"
|
:extensions="extensions"
|
||||||
|
@ready="handleReady"
|
||||||
v-model="logs"
|
v-model="logs"
|
||||||
:readOnly="true"
|
:readOnly="true"
|
||||||
/>
|
/>
|
||||||
@ -24,16 +25,27 @@
|
|||||||
import { Codemirror } from 'vue-codemirror';
|
import { Codemirror } from 'vue-codemirror';
|
||||||
import { javascript } from '@codemirror/lang-javascript';
|
import { javascript } from '@codemirror/lang-javascript';
|
||||||
import { oneDark } from '@codemirror/theme-one-dark';
|
import { oneDark } from '@codemirror/theme-one-dark';
|
||||||
import { onMounted, ref } from 'vue';
|
import { nextTick, onMounted, ref, shallowRef } from 'vue';
|
||||||
import Submenu from '@/views/log/index.vue';
|
import Submenu from '@/views/log/index.vue';
|
||||||
import { LoadFile } from '@/api/modules/files';
|
import { LoadFile } from '@/api/modules/files';
|
||||||
|
|
||||||
const extensions = [javascript(), oneDark];
|
const extensions = [javascript(), oneDark];
|
||||||
const logs = ref();
|
const logs = ref();
|
||||||
|
const view = shallowRef();
|
||||||
|
const handleReady = (payload) => {
|
||||||
|
view.value = payload.view;
|
||||||
|
};
|
||||||
|
|
||||||
const loadSystemlogs = async () => {
|
const loadSystemlogs = async () => {
|
||||||
const res = await LoadFile({ path: '/opt/1Panel/log/1Panel.log' });
|
const res = await LoadFile({ path: '/opt/1Panel/log/1Panel.log' });
|
||||||
logs.value = res.data;
|
logs.value = res.data;
|
||||||
|
nextTick(() => {
|
||||||
|
const state = view.value.state;
|
||||||
|
view.value.dispatch({
|
||||||
|
selection: { anchor: state.doc.length, head: state.doc.length },
|
||||||
|
scrollIntoView: true,
|
||||||
|
});
|
||||||
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
|
@ -194,6 +194,7 @@ const onSubmit = async (formEl: FormInstance | undefined) => {
|
|||||||
formEl.validate(async (valid) => {
|
formEl.validate(async (valid) => {
|
||||||
if (!valid) return;
|
if (!valid) return;
|
||||||
if (!dialogData.value.rowData) return;
|
if (!dialogData.value.rowData) return;
|
||||||
|
dialogData.value.rowData.vars = JSON.stringify(dialogData.value.rowData!.varsJson);
|
||||||
if (dialogData.value.title === 'create') {
|
if (dialogData.value.title === 'create') {
|
||||||
await addBackup(dialogData.value.rowData);
|
await addBackup(dialogData.value.rowData);
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div>
|
<div>
|
||||||
<el-card class="topCard">
|
<el-card class="topCard">
|
||||||
<el-radio-group v-model="active">
|
<el-radio-group v-model="active">
|
||||||
<el-radio-button class="topButton" size="large" @click="routerTo('/setting/panel')" label="panel">
|
<el-radio-button class="topButton" size="large" @click="routerTo('/setting')" label="panel">
|
||||||
{{ $t('setting.panel') }}
|
{{ $t('setting.panel') }}
|
||||||
</el-radio-button>
|
</el-radio-button>
|
||||||
<el-radio-button class="topButton" size="large" @click="routerTo('/setting/safe')" label="safe">
|
<el-radio-button class="topButton" size="large" @click="routerTo('/setting/safe')" label="safe">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user