From ff34cc72cce61406549b3cf23e01edcda453090f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=80=97=E5=AD=90?= Date: Fri, 1 Nov 2024 21:54:06 +0800 Subject: [PATCH] fix: lint --- web/src/components/common/CodeEditor.vue | 16 +++++++++----- web/src/components/common/RealtimeLog.vue | 5 ++++- .../components/common/RealtimeLogModal.vue | 5 ++++- web/src/views/apps/php/PhpView.vue | 5 ++++- web/src/views/cert/AccountView.vue | 12 +++++++--- web/src/views/cert/CertView.vue | 22 ++++++++++++++----- web/src/views/cert/CreateAccountModal.vue | 10 +++++++-- web/src/views/cert/CreateCertModal.vue | 20 +++++++++++++---- web/src/views/cert/CreateDnsModal.vue | 5 ++++- web/src/views/cert/DnsView.vue | 5 ++++- web/src/views/container/ContainerCreate.vue | 5 ++++- 11 files changed, 85 insertions(+), 25 deletions(-) diff --git a/web/src/components/common/CodeEditor.vue b/web/src/components/common/CodeEditor.vue index e01d788646..03546bb8ba 100644 --- a/web/src/components/common/CodeEditor.vue +++ b/web/src/components/common/CodeEditor.vue @@ -4,8 +4,14 @@ import { languageByPath } from '@/utils/file' import Editor from '@guolao/vue-monaco-editor' const props = defineProps({ - path: String, - readOnly: Boolean + path: { + type: String, + required: true + }, + readOnly: { + type: Boolean, + required: true + } }) const disabled = ref(false) // 在出现错误的情况下禁用保存 @@ -13,7 +19,7 @@ const data = ref('') const get = async () => { await file - .content(props.path!) + .content(props.path) .then((res) => { data.value = res.data window.$message.success('获取成功') @@ -28,7 +34,7 @@ const save = async () => { window.$message.error('当前状态下不可保存') return } - await file.save(props.path!, data.value) + await file.save(props.path, data.value) window.$message.success('保存成功') } @@ -45,7 +51,7 @@ defineExpose({