style: 调整反向代理的源文页面大小 (#4917)

#### What this PR does / why we need it?

#### Summary of your change

#### Please indicate you've done the following:

- [ ] Made sure tests are passing and test coverage is added if needed.
- [ ] Made sure commit message follow the rule of [Conventional Commits specification](https://www.conventionalcommits.org/).
- [ ] Considered the docs impact and opened a new docs issue or PR with docs changes if needed.
pull/4921/head
zhengkunwang 7 months ago committed by GitHub
parent be12c2397d
commit a6f354fed9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,5 +1,5 @@
<template> <template>
<el-drawer v-model="open" :close-on-click-modal="false" size="40%" :before-close="handleClose"> <el-drawer v-model="open" :close-on-click-modal="false" :size="size" :before-close="handleClose">
<template #header> <template #header>
<DrawerHeader :header="$t('website.proxyFile')" :back="handleClose" /> <DrawerHeader :header="$t('website.proxyFile')" :back="handleClose" />
</template> </template>
@ -35,13 +35,19 @@
import DrawerHeader from '@/components/drawer-header/index.vue'; import DrawerHeader from '@/components/drawer-header/index.vue';
import i18n from '@/lang'; import i18n from '@/lang';
import { FormInstance } from 'element-plus'; import { FormInstance } from 'element-plus';
import { reactive, ref } from 'vue'; import { computed, reactive, ref } from 'vue';
import { MsgSuccess } from '@/utils/message'; import { MsgSuccess } from '@/utils/message';
import { Codemirror } from 'vue-codemirror'; import { Codemirror } from 'vue-codemirror';
import { UpdateProxyConfigFile } from '@/api/modules/website'; import { UpdateProxyConfigFile } from '@/api/modules/website';
import { StreamLanguage } from '@codemirror/language'; import { StreamLanguage } from '@codemirror/language';
import { nginx } from '@codemirror/legacy-modes/mode/nginx'; import { nginx } from '@codemirror/legacy-modes/mode/nginx';
import { oneDark } from '@codemirror/theme-one-dark'; import { oneDark } from '@codemirror/theme-one-dark';
import { GlobalStore } from '@/store';
const globalStore = GlobalStore();
const mobile = computed(() => {
return globalStore.isMobile();
});
const extensions = [StreamLanguage.define(nginx), oneDark]; const extensions = [StreamLanguage.define(nginx), oneDark];
const proxyForm = ref<FormInstance>(); const proxyForm = ref<FormInstance>();
@ -58,12 +64,17 @@ const req = reactive({
websiteID: 0, websiteID: 0,
content: '', content: '',
}); });
const size = ref('50%');
const acceptParams = async (proxyreq: any) => { const acceptParams = async (proxyreq: any) => {
req.name = proxyreq.name; req.name = proxyreq.name;
req.websiteID = proxyreq.websiteID; req.websiteID = proxyreq.websiteID;
req.content = proxyreq.content; req.content = proxyreq.content;
open.value = true; open.value = true;
if (mobile.value) {
size.value = '100%';
}
}; };
const submit = async () => { const submit = async () => {

Loading…
Cancel
Save