mirror of
https://github.com/acepanel/panel.git
synced 2026-02-04 09:13:49 +08:00
fix: lint
This commit is contained in:
@@ -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({
|
||||
<template>
|
||||
<Editor
|
||||
v-model:value="data"
|
||||
:language="languageByPath(props.path!)"
|
||||
:language="languageByPath(props.path)"
|
||||
theme="vs-dark"
|
||||
height="60vh"
|
||||
:options="{
|
||||
|
||||
@@ -3,7 +3,10 @@ import ws from '@/api/ws'
|
||||
import type { LogInst } from 'naive-ui'
|
||||
|
||||
const props = defineProps({
|
||||
path: String
|
||||
path: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const log = ref('')
|
||||
|
||||
@@ -4,7 +4,10 @@ import type { LogInst } from 'naive-ui'
|
||||
|
||||
const show = defineModel<boolean>('show', { type: Boolean, required: true })
|
||||
const props = defineProps({
|
||||
path: String
|
||||
path: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const log = ref('')
|
||||
|
||||
@@ -7,7 +7,10 @@ import systemctl from '@/api/panel/systemctl'
|
||||
import { renderIcon } from '@/utils'
|
||||
|
||||
const props = defineProps({
|
||||
version: Number
|
||||
version: {
|
||||
type: Number,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { version } = toRefs(props)
|
||||
|
||||
@@ -13,8 +13,14 @@ import cert from '@/api/panel/cert'
|
||||
import type { Account } from '@/views/cert/types'
|
||||
|
||||
const props = defineProps({
|
||||
caProviders: Array<any>,
|
||||
algorithms: Array<any>
|
||||
caProviders: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
algorithms: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { caProviders, algorithms } = toRefs(props)
|
||||
@@ -54,7 +60,7 @@ const columns: any = [
|
||||
},
|
||||
{
|
||||
default: () => {
|
||||
return caProviders?.value?.find((item: any) => item.value === row.ca)?.label
|
||||
return caProviders.value?.find((item: any) => item.value === row.ca)?.label
|
||||
}
|
||||
}
|
||||
)
|
||||
|
||||
@@ -9,10 +9,22 @@ import ObtainModal from '@/views/cert/ObtainModal.vue'
|
||||
import type { Cert } from '@/views/cert/types'
|
||||
|
||||
const props = defineProps({
|
||||
algorithms: Array<any>,
|
||||
websites: Array<any>,
|
||||
accounts: Array<any>,
|
||||
dns: Array<any>
|
||||
algorithms: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
websites: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
accounts: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
dns: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { algorithms, websites, accounts, dns } = toRefs(props)
|
||||
@@ -114,7 +126,7 @@ const columns: any = [
|
||||
default: () =>
|
||||
row.account_id == 0
|
||||
? '无'
|
||||
: accounts?.value?.find((item: any) => item.value === row.account_id)?.label
|
||||
: accounts.value?.find((item: any) => item.value === row.account_id)?.label
|
||||
})
|
||||
]
|
||||
})
|
||||
|
||||
@@ -6,8 +6,14 @@ import { NButton, NInput, NSpace } from 'naive-ui'
|
||||
const show = defineModel<boolean>('show', { type: Boolean, required: true })
|
||||
|
||||
const props = defineProps({
|
||||
caProviders: Array<any>,
|
||||
algorithms: Array<any>
|
||||
caProviders: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
algorithms: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { caProviders, algorithms } = toRefs(props)
|
||||
|
||||
@@ -5,10 +5,22 @@ import { NButton, NSpace } from 'naive-ui'
|
||||
const show = defineModel<boolean>('show', { type: Boolean, required: true })
|
||||
|
||||
const props = defineProps({
|
||||
algorithms: Array<any>,
|
||||
websites: Array<any>,
|
||||
accounts: Array<any>,
|
||||
dns: Array<any>
|
||||
algorithms: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
websites: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
accounts: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
},
|
||||
dns: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { algorithms, websites, accounts, dns } = toRefs(props)
|
||||
|
||||
@@ -5,7 +5,10 @@ import { NButton, NInput, NSpace } from 'naive-ui'
|
||||
const show = defineModel<boolean>('show', { type: Boolean, required: true })
|
||||
|
||||
const props = defineProps({
|
||||
dnsProviders: Array<any>
|
||||
dnsProviders: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { dnsProviders } = toRefs(props)
|
||||
|
||||
@@ -5,7 +5,10 @@ import cert from '@/api/panel/cert'
|
||||
import type { DNS } from '@/views/cert/types'
|
||||
|
||||
const props = defineProps({
|
||||
dnsProviders: Array<any>
|
||||
dnsProviders: {
|
||||
type: Array<any>,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { dnsProviders } = toRefs(props)
|
||||
|
||||
@@ -2,7 +2,10 @@
|
||||
import container from '@/api/panel/container'
|
||||
|
||||
const props = defineProps({
|
||||
show: Boolean
|
||||
show: {
|
||||
type: Boolean,
|
||||
required: true
|
||||
}
|
||||
})
|
||||
|
||||
const { show } = toRefs(props)
|
||||
|
||||
Reference in New Issue
Block a user