初始化

This commit is contained in:
2025-08-19 14:56:38 +08:00
parent 83b8ee11de
commit 9c9387f6c2
45 changed files with 4567 additions and 8 deletions

View File

@@ -0,0 +1,10 @@
import {
create,
NButton,
NCard,
NConfigProvider,
} from 'naive-ui'
export const naiveUi = create({
components: [NButton, NCard, NConfigProvider]
})

View File

@@ -0,0 +1,21 @@
import { createDiscreteApi } from 'naive-ui'
import { configProviderProps } from './theme.ts'
const { message, notification, dialog, loadingBar, modal } = createDiscreteApi(
['message', 'dialog', 'notification', 'loadingBar', 'modal'],
{
configProviderProps: configProviderProps,
notificationProviderProps: {
placement: 'bottom-right',
max: 3
}
}
)
export const { messageApi, notificationApi, dialogApi, loadingBarApi, modalApi } = {
messageApi: message,
notificationApi: notification,
dialogApi: dialog,
loadingBarApi: loadingBar,
modalApi: modal
}

View File

@@ -0,0 +1,15 @@
import { type ConfigProviderProps, darkTheme, dateZhCN, type GlobalTheme, lightTheme, zhCN } from 'naive-ui'
const lTheme: GlobalTheme = {
...lightTheme,
common: {
...lightTheme.common,
primaryColor: '#0070f3'
}
}
export const configProviderProps: ConfigProviderProps = {
theme: lTheme,
dateLocale: dateZhCN,
locale: zhCN,
}

View File

@@ -0,0 +1,29 @@
/**
* 版本信息
*/
export interface Version {
/**
* 公司名称
*/
company: string
/**
* 版本号
*/
major: number
/**
* 子版本号
*/
minor: number
/**
* 修订号
*/
build: number
/**
* 私有版本号
*/
private: number
}