【新增】百度云DNS解析功能和宝塔waf部署功能

【新增】本机部署方式
【修复】已知问题
This commit is contained in:
chudong
2025-05-15 10:42:24 +08:00
parent e6947ec5c4
commit 151cec10a0
129 changed files with 28549 additions and 9082 deletions

View File

@@ -19,6 +19,8 @@ export default defineComponent({
const { locale } = useI18n() // 国际化
const { naiveLocale, naiveDateLocale } = useNaiveI18nSync(locale) // i18n 同步
const { theme, themeOverrides } = useTheme() // 主题
console.log(theme.value, themeOverrides.value)
// 国际化配置
return () => (
<NConfigProvider

View File

@@ -1,4 +1,4 @@
import { defineComponent, PropType } from 'vue'
import { computed, defineComponent, PropType } from 'vue'
import { NDropdown, NIcon, NButton } from 'naive-ui'
import { Sunny, Moon } from '@vicons/ionicons5'
@@ -6,6 +6,8 @@ import { useTheme } from '../theme/index'
import type { DropdownOption } from 'naive-ui'
interface Props {
type?: 'button' | 'link'
size?: 'small' | 'medium' | 'large'
text?: boolean
}
export default defineComponent({
@@ -14,6 +16,14 @@ export default defineComponent({
type: String as PropType<'button' | 'link'>,
default: 'button',
},
size: {
type: String as PropType<'small' | 'medium' | 'large'>,
default: 'medium',
},
text: {
type: Boolean,
default: false,
},
},
setup(props: Props) {
const { isDark, cutDarkMode, themeActive } = useTheme()
@@ -29,16 +39,29 @@ export default defineComponent({
},
]
const iconSize = computed(() => {
return props.size === 'small' ? 16 : props.size === 'large' ? 24 : 20
})
const buttonSize = computed(() => {
return props.size === 'small' ? 'tiny' : props.size === 'large' ? 'large' : 'medium'
})
const text = computed(() => {
return !isDark.value ? '亮色模式' : '暗色模式'
})
return () => (
<NDropdown options={dropdownOptions} onSelect={() => cutDarkMode(true, this)} value={themeActive.value}>
<div style={{ cursor: 'pointer', display: 'flex', alignItems: 'center' }}>
{props.type === 'button' ? (
<NButton quaternary strong circle type="primary">
<NIcon size={20}>{isDark.value ? <Moon /> : <Sunny />}</NIcon>
<NButton quaternary strong circle type="primary" size={buttonSize.value}>
<NIcon size={iconSize.value}>{isDark.value ? <Moon /> : <Sunny />}</NIcon>
</NButton>
) : (
<NIcon size={20}>{isDark.value ? <Moon /> : <Sunny />}</NIcon>
<NIcon size={iconSize.value}>{isDark.value ? <Moon /> : <Sunny />}</NIcon>
)}
<span class="ml-[0.6rem]">{props.text && text.value}</span>
</div>
</NDropdown>
)