feat: 风格统一格式化改动暂存

This commit is contained in:
XiaoDaiGua-Ray 2025-12-27 17:42:58 +08:00
parent d1cedda1f7
commit 6d2b557d27
277 changed files with 2623 additions and 3808 deletions

View File

@ -5,7 +5,6 @@ components.d.ts
.gitignore .gitignore
public public
yarn.* yarn.*
.prettierrc.*
visualizer.* visualizer.*
visualizer.html visualizer.html
.env.* .env.*

View File

@ -1,21 +1,22 @@
module.exports = { module.exports = {
printWidth: 80, // 一行最多 `80` 字符 printWidth: 80,
tabWidth: 2, // 使用 `2` 个空格缩进 tabWidth: 2,
useTabs: false, // 不使用缩进符, 而使用空格 useTabs: false,
semi: false, // 行尾不需要有分号 semi: false,
singleQuote: true, // 使用单引号 singleQuote: true,
quoteProps: 'as-needed', // 对象的 `key` 仅在必要时用引号 quoteProps: 'as-needed',
jsxSingleQuote: false, // `jsx` 不使用单引号, 而使用双引号 jsxSingleQuote: false,
trailingComma: 'all', // 尾随逗号 trailingComma: 'all',
bracketSpacing: true, // 大括号内的首尾需要空格 bracketSpacing: true,
arrowParens: 'always', // 箭头函数, 只有一个参数的时候, 也需要括号 arrowParens: 'always',
rangeStart: 0, // 每个文件格式化的范围是文件的全部内容 rangeStart: 0,
rangeEnd: Infinity, rangeEnd: Infinity,
requirePragma: false, // 不需要写文件开头的 `@prettier` requirePragma: false,
insertPragma: false, // 不需要自动在文件开头插入 `@prettier` insertPragma: false,
proseWrap: 'preserve', // 使用默认的折行标准 proseWrap: 'preserve',
htmlWhitespaceSensitivity: 'css', // 根据显示样式决定 `html` 要不要折行 htmlWhitespaceSensitivity: 'css',
endOfLine: 'lf', // 换行符使用 `lf`, endOfLine: 'lf',
singleAttributePerLine: false, singleAttributePerLine: false,
bracketSameLine: false, bracketSameLine: false,
plugins: ['@ianvs/prettier-plugin-sort-imports'],
} }

14
.vscode/settings.json vendored
View File

@ -1,8 +1,17 @@
{ {
//
"editor.formatOnSave": true, "editor.formatOnSave": true,
"editor.defaultFormatter": "esbenp.prettier-vscode", "editor.defaultFormatter": "esbenp.prettier-vscode",
// "eslint.enable": true,
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript",
"typescriptreact",
"vue"
],
"editor.codeActionsOnSave": {
"source.fixAll.eslint": "explicit"
},
"[typescript]": { "[typescript]": {
"editor.defaultFormatter": "esbenp.prettier-vscode" "editor.defaultFormatter": "esbenp.prettier-vscode"
}, },
@ -64,6 +73,7 @@
"depcheckrc", "depcheckrc",
"domtoimage", "domtoimage",
"EDITMSG", "EDITMSG",
"ianvs",
"iife", "iife",
"internalkey", "internalkey",
"jsbarcode", "jsbarcode",

View File

@ -1,3 +1,13 @@
## 5.2.5
## Feats
- 升级 `vite` 版本至 `7.x`,为了后面无缝衔接 `rolldown-vite` 做准备
- 升级所有主流依赖为 `7.x` 的配套
- 增强 `eslint`, `prettier` 规则,加强项目统一化的范式
- `typescript` 版本更新至 `5.9.3`
- 移除 `UnknownObjectKey` 类型,现在统一使用 `Recordable` 类型替代,或者全局的 `GlobalRecordable` 类型替代
## 5.2.4 ## 5.2.4
## Feats ## Feats
@ -779,7 +789,7 @@ const [
补充拓展了 `useModal` 方法,支持 `dad`, `fullscreen` 等拓展配置项。 补充拓展了 `useModal` 方法,支持 `dad`, `fullscreen` 等拓展配置项。
```ts ```ts
import { useTable, useForm } from '@/components' import { useForm, useTable } from '@/components'
const [registerTable, { getTableInstance }] = useTable() const [registerTable, { getTableInstance }] = useTable()
const [registerForm, { getFormInstance }] = useForm() const [registerForm, { getFormInstance }] = useForm()
@ -799,8 +809,7 @@ const [registerForm, { getFormInstance }] = useForm()
> 该方法比起常见的 `ref` 注册,然后 `tableRef.value.xxx` 的方法获取表格方法更为简洁一点。但是也值得注意的是,需要手动调用一次 `register` 方法,否则会报错;还有值得注意的是,需要注意表格方法的调用时机,需要等待表格注册完成后才能正常调用。如果需要在 `Parent Create` 阶段调用,可以尝试 `nextTick` 包裹一层。 > 该方法比起常见的 `ref` 注册,然后 `tableRef.value.xxx` 的方法获取表格方法更为简洁一点。但是也值得注意的是,需要手动调用一次 `register` 方法,否则会报错;还有值得注意的是,需要注意表格方法的调用时机,需要等待表格注册完成后才能正常调用。如果需要在 `Parent Create` 阶段调用,可以尝试 `nextTick` 包裹一层。
```tsx ```tsx
import { RTable } from '@/components' import { RTable, useTable } from '@/components'
import { useTable } from '@/components'
defineComponent({ defineComponent({
setup() { setup() {
@ -1972,7 +1981,7 @@ const demo2 = null
- 新增切换路由自动取消上一路由所有请求。但是可以通过配置 `useRequest``request` 方法的 `cancelConfig.cancel` 属性控制是否需要自动取消该请求。该配置默认为 `true`,当配置为 `false` 时,则不会被取消器取消 - 新增切换路由自动取消上一路由所有请求。但是可以通过配置 `useRequest``request` 方法的 `cancelConfig.cancel` 属性控制是否需要自动取消该请求。该配置默认为 `true`,当配置为 `false` 时,则不会被取消器取消
```ts ```ts
import { useRequest, useHookPlusRequest } from '@/axios/index' import { useHookPlusRequest, useRequest } from '@/axios/index'
// useRequest // useRequest
const { data, loading, run } = useRequest<{ const { data, loading, run } = useRequest<{
@ -2038,8 +2047,8 @@ request({
- useHookPlusRequest 支持接收一个 Promise 返回值的方法,可以用来包裹 axios 方法然后进行请求配置 - useHookPlusRequest 支持接收一个 Promise 返回值的方法,可以用来包裹 axios 方法然后进行请求配置
```ts ```ts
import { useHookPlusRequest, useRequest } from '@/axios/index'
import axiosInstance from '@/axios/instance' import axiosInstance from '@/axios/instance'
import { useRequest, useHookPlusRequest } from '@/axios/index'
// 使用 useRequest // 使用 useRequest
const { data, loading, run } = useRequest<{ const { data, loading, run } = useRequest<{

View File

@ -1,8 +1,8 @@
import { import {
hasStorage,
setStorage,
getStorage, getStorage,
hasStorage,
removeStorage, removeStorage,
setStorage,
} from '../../src/utils/cache' } from '../../src/utils/cache'
describe('cache utils', () => { describe('cache utils', () => {

View File

@ -1,5 +1,5 @@
import { RModal } from '../../src/components/base/RModal/index'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { RModal } from '../../src/components/base/RModal/index'
describe('RModal', () => { describe('RModal', () => {
it('should execute the onAfterEnter callback', () => { it('should execute the onAfterEnter callback', () => {

View File

@ -1,5 +1,5 @@
import { printDom } from '../../src/utils/dom'
import { mount } from '@vue/test-utils' import { mount } from '@vue/test-utils'
import { printDom } from '../../src/utils/dom'
import renderHook from '../utils/renderHook' import renderHook from '../utils/renderHook'
// happy-dom 官方有一个 bug无法使用 canvas.toDataURL 方法。所以该模块单测暂时无法通过 // happy-dom 官方有一个 bug无法使用 canvas.toDataURL 方法。所以该模块单测暂时无法通过

View File

@ -1,4 +1,4 @@
import { setClass, hasClass, removeClass } from '../../src/utils/element' import { hasClass, removeClass, setClass } from '../../src/utils/element'
import createRefElement from '../utils/createRefElement' import createRefElement from '../utils/createRefElement'
describe('setClass', () => { describe('setClass', () => {

View File

@ -1,4 +1,4 @@
import { setStyle, removeStyle } from '../../src/utils/element' import { removeStyle, setStyle } from '../../src/utils/element'
import createRefElement from '../utils/createRefElement' import createRefElement from '../utils/createRefElement'
describe('setStyle', () => { describe('setStyle', () => {

View File

@ -1,5 +1,5 @@
import setupMiniApp from '../utils/setupMiniApp'
import { useAppRoot } from '../../src/hooks/template/useAppRoot' import { useAppRoot } from '../../src/hooks/template/useAppRoot'
import setupMiniApp from '../utils/setupMiniApp'
describe('useAppRoot', async () => { describe('useAppRoot', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,8 +1,7 @@
import setupMiniApp from '../utils/setupMiniApp'
import { useBadge } from '../../src/hooks/template/useBadge' import { useBadge } from '../../src/hooks/template/useBadge'
import { useMenuGetters } from '../../src/store'
import type { AppMenuExtraOptions } from '../../src/router/types' import type { AppMenuExtraOptions } from '../../src/router/types'
import { useMenuGetters } from '../../src/store'
import setupMiniApp from '../utils/setupMiniApp'
describe('useBadge', async () => { describe('useBadge', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,6 +1,6 @@
import { useContextmenuCoordinate } from '../../src/hooks/components/useContextmenuCoordinate' import { useContextmenuCoordinate } from '../../src/hooks/components/useContextmenuCoordinate'
import renderHook from '../utils/renderHook'
import createRefElement from '../utils/createRefElement' import createRefElement from '../utils/createRefElement'
import renderHook from '../utils/renderHook'
describe('useContextmenuCoordinate', () => { describe('useContextmenuCoordinate', () => {
const wrapperRef = createRefElement() const wrapperRef = createRefElement()

View File

@ -1,5 +1,5 @@
import { useDayjs } from '../../src/hooks/web/useDayjs'
import dayjs from 'dayjs' import dayjs from 'dayjs'
import { useDayjs } from '../../src/hooks/web/useDayjs'
describe('useDayjs', () => { describe('useDayjs', () => {
const { const {

View File

@ -1,9 +1,8 @@
import setupMiniApp from '../utils/setupMiniApp'
import { useSiderBar } from '../../src/hooks/template/useSiderBar' import { useSiderBar } from '../../src/hooks/template/useSiderBar'
import { useMenuGetters, useMenuActions } from '../../src/store'
import { useVueRouter } from '../../src/hooks/web/useVueRouter' import { useVueRouter } from '../../src/hooks/web/useVueRouter'
import { useMenuActions, useMenuGetters } from '../../src/store'
import type { AppMenuOption, MenuTagOptions } from '../../src/types/modules/app' import type { AppMenuOption, MenuTagOptions } from '../../src/types/modules/app'
import setupMiniApp from '../utils/setupMiniApp'
describe('useSiderBar', async () => { describe('useSiderBar', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,6 +1,6 @@
import setupMiniApp from '../utils/setupMiniApp' import { getVariableToRefs, setVariable } from '../../src/global-variable'
import { useSpinning } from '../../src/hooks/template/useSpinning' import { useSpinning } from '../../src/hooks/template/useSpinning'
import { setVariable, getVariableToRefs } from '../../src/global-variable' import setupMiniApp from '../utils/setupMiniApp'
describe('useSpinning', async () => { describe('useSpinning', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,5 +1,5 @@
import setupMiniApp from '../utils/setupMiniApp'
import { useTheme } from '../../src/hooks/template/useTheme' import { useTheme } from '../../src/hooks/template/useTheme'
import setupMiniApp from '../utils/setupMiniApp'
describe('useTheme', async () => { describe('useTheme', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,5 +1,5 @@
import setupMiniApp from '../utils/setupMiniApp'
import { useVueRouter } from '../../src/hooks/web/useVueRouter' import { useVueRouter } from '../../src/hooks/web/useVueRouter'
import setupMiniApp from '../utils/setupMiniApp'
describe('useVueRouter', async () => { describe('useVueRouter', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,6 +1,6 @@
import setupMiniApp from '../utils/setupMiniApp'
import { useWatermark } from '../../src/hooks/template/useWatermark' import { useWatermark } from '../../src/hooks/template/useWatermark'
import { useSettingGetters } from '../../src/store' import { useSettingGetters } from '../../src/store'
import setupMiniApp from '../utils/setupMiniApp'
describe('useWatermark', async () => { describe('useWatermark', async () => {
await setupMiniApp() await setupMiniApp()

View File

@ -1,11 +1,11 @@
import { import {
isCurrency,
format,
add, add,
subtract,
multiply,
divide,
distribute, distribute,
divide,
format,
isCurrency,
multiply,
subtract,
} from '../../src/utils/precision' } from '../../src/utils/precision'
describe('precision', () => { describe('precision', () => {

View File

@ -1,6 +1,5 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import { createApp, defineComponent } from 'vue' import { createApp, defineComponent } from 'vue'
import type { App } from 'vue' import type { App } from 'vue'
export default function renderHook<R = any>( export default function renderHook<R = any>(

View File

@ -1,6 +1,6 @@
import { setupStore } from '../../src/store'
import { setupRouter } from '../../src/router'
import { setupI18n } from '../../src/locales' import { setupI18n } from '../../src/locales'
import { setupRouter } from '../../src/router'
import { setupStore } from '../../src/store'
import renderHook from '../utils/renderHook' import renderHook from '../utils/renderHook'
/** /**

View File

@ -1,12 +1,12 @@
import vue from 'eslint-plugin-vue'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import prettier from 'eslint-plugin-prettier'
import globals from 'globals'
import parser from 'vue-eslint-parser'
import path from 'node:path' import path from 'node:path'
import { fileURLToPath } from 'node:url' import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc' import { FlatCompat } from '@eslint/eslintrc'
import js from '@eslint/js'
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import prettier from 'eslint-plugin-prettier'
import vue from 'eslint-plugin-vue'
import globals from 'globals'
import parser from 'vue-eslint-parser'
const __filename = fileURLToPath(import.meta.url) const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename) const __dirname = path.dirname(__filename)
@ -44,14 +44,11 @@ export default [
{ {
files: ['**/*.js', '**/*.ts', '**/*.jsx', '**/*.tsx', '**/*.vue'], files: ['**/*.js', '**/*.ts', '**/*.jsx', '**/*.tsx', '**/*.vue'],
}, },
js.configs.recommended,
...vue.configs['flat/recommended'],
...compat.extends( ...compat.extends(
'eslint-config-prettier',
'eslint:recommended',
'plugin:@typescript-eslint/recommended', 'plugin:@typescript-eslint/recommended',
'plugin:vue/vue3-recommended',
'plugin:vue/vue3-essential',
'plugin:prettier/recommended', 'plugin:prettier/recommended',
'prettier',
'./unplugin/.eslintrc-auto-import.json', './unplugin/.eslintrc-auto-import.json',
), ),
{ {
@ -213,7 +210,7 @@ export default [
}, },
], ],
'vue/v-on-event-hyphenation': ['error', 'never'], 'vue/v-on-event-hyphenation': ['error', 'never'],
'vue/component-tags-order': [ 'vue/block-order': [
'error', 'error',
{ {
order: ['template', 'script', 'style'], order: ['template', 'script', 'style'],
@ -258,92 +255,30 @@ export default [
], ],
'padding-line-between-statements': [ 'padding-line-between-statements': [
'error', 'error',
{ { blankLine: 'always', prev: 'import', next: '*' },
blankLine: 'always', { blankLine: 'any', prev: 'import', next: 'import' },
prev: ['import'], { blankLine: 'always', prev: '*', next: 'export' },
next: '*', { blankLine: 'always', prev: 'export', next: '*' },
}, { blankLine: 'any', prev: 'export', next: 'export' },
{ { blankLine: 'always', prev: ['const', 'let', 'var'], next: '*' },
blankLine: 'any',
prev: 'import',
next: 'import',
},
{
blankLine: 'always',
prev: '*',
next: 'export',
},
{
blankLine: 'any',
prev: 'export',
next: 'export',
},
{
blankLine: 'always',
prev: ['const', 'let', 'var'],
next: '*',
},
{ {
blankLine: 'any', blankLine: 'any',
prev: ['const', 'let', 'var'], prev: ['const', 'let', 'var'],
next: ['const', 'let', 'var'], next: ['const', 'let', 'var'],
}, },
{ { blankLine: 'always', prev: '*', next: 'function' },
blankLine: 'always', { blankLine: 'always', prev: 'function', next: '*' },
prev: 'directive', { blankLine: 'always', prev: '*', next: 'return' },
next: '*', { blankLine: 'always', prev: '*', next: 'if' },
}, { blankLine: 'always', prev: 'if', next: '*' },
{ { blankLine: 'always', prev: '*', next: 'for' },
blankLine: 'any', { blankLine: 'always', prev: 'for', next: '*' },
prev: 'directive', { blankLine: 'always', prev: '*', next: 'while' },
next: 'directive', { blankLine: 'always', prev: 'while', next: '*' },
}, { blankLine: 'always', prev: '*', next: 'class' },
{ { blankLine: 'always', prev: 'class', next: '*' },
blankLine: 'always', { blankLine: 'always', prev: '*', next: 'try' },
prev: '*', { blankLine: 'always', prev: 'try', next: '*' },
next: [
'if',
'class',
'for',
'do',
'while',
'switch',
'try',
'with',
'function',
'block',
'block-like',
'break',
'case',
'continue',
'return',
'throw',
'debugger',
],
},
{
blankLine: 'always',
prev: [
'if',
'class',
'for',
'do',
'while',
'switch',
'try',
'with',
'function',
'block',
'block-like',
'break',
'case',
'continue',
'return',
'throw',
'debugger',
],
next: '*',
},
], ],
'@typescript-eslint/no-unused-expressions': [ '@typescript-eslint/no-unused-expressions': [
'error', 'error',

View File

@ -1,7 +1,7 @@
import { defineMock } from 'vite-plugin-mock-dev-server'
import { pagination, stringify, response, array } from '@mock/shared/utils'
import { tableMock } from '@mock/shared/database' import { tableMock } from '@mock/shared/database'
import { array, pagination, response, stringify } from '@mock/shared/utils'
import Mock from 'mockjs' import Mock from 'mockjs'
import { defineMock } from 'vite-plugin-mock-dev-server'
export const getPersonList = defineMock({ export const getPersonList = defineMock({
url: '/api/list', url: '/api/list',

51
package.json Executable file → Normal file
View File

@ -1,10 +1,10 @@
{ {
"name": "ray-template", "name": "ray-template",
"private": false, "private": false,
"version": "5.2.4", "version": "5.2.5",
"type": "module", "type": "module",
"engines": { "engines": {
"node": "^18.0.0 || ^20.0.0 || >=22.0.0", "node": "^20.0.0 || >=22.0.0",
"pnpm": ">=9.0.0" "pnpm": ">=9.0.0"
}, },
"scripts": { "scripts": {
@ -47,14 +47,14 @@
"jsbarcode": "3.11.6", "jsbarcode": "3.11.6",
"lodash-es": "^4.17.21", "lodash-es": "^4.17.21",
"mockjs": "1.1.0", "mockjs": "1.1.0",
"naive-ui": "^2.42.0", "naive-ui": "^2.43.2",
"pinia": "^3.0.3", "pinia": "^3.0.3",
"pinia-plugin-persistedstate": "^4.4.1", "pinia-plugin-persistedstate": "^4.4.1",
"print-js": "^1.6.0", "print-js": "^1.6.0",
"vue": "^3.5.24", "vue": "^3.5.25",
"vue-demi": "0.14.10", "vue-demi": "0.14.10",
"vue-hooks-plus": "2.4.1", "vue-hooks-plus": "2.4.1",
"vue-i18n": "^9.13.1", "vue-i18n": "^11.1.3",
"vue-router": "^4.6.3", "vue-router": "^4.6.3",
"vue3-next-qrcode": "3.0.2" "vue3-next-qrcode": "3.0.2"
}, },
@ -62,28 +62,29 @@
"@commitlint/cli": "19.7.1", "@commitlint/cli": "19.7.1",
"@commitlint/config-conventional": "19.7.1", "@commitlint/config-conventional": "19.7.1",
"@eslint/eslintrc": "3.3.1", "@eslint/eslintrc": "3.3.1",
"@eslint/js": "9.30.1", "@eslint/js": "9.39.1",
"@ianvs/prettier-plugin-sort-imports": "4.7.0",
"@interactjs/types": "1.10.27", "@interactjs/types": "1.10.27",
"@intlify/unplugin-vue-i18n": "4.0.0", "@intlify/unplugin-vue-i18n": "11.0.1",
"@types/crypto-js": "4.2.2", "@types/crypto-js": "4.2.2",
"@types/jsbarcode": "3.11.4", "@types/jsbarcode": "3.11.4",
"@types/lodash-es": "4.17.12", "@types/lodash-es": "4.17.12",
"@types/mockjs": "1.0.10", "@types/mockjs": "1.0.10",
"@typescript-eslint/eslint-plugin": "8.36.0", "@typescript-eslint/eslint-plugin": "8.47.0",
"@typescript-eslint/parser": "8.36.0", "@typescript-eslint/parser": "8.47.0",
"@vitejs/plugin-vue": "6.0.1", "@vitejs/plugin-vue": "6.0.2",
"@vitejs/plugin-vue-jsx": "5.1.1", "@vitejs/plugin-vue-jsx": "5.1.2",
"@vitest/ui": "3.0.5", "@vitest/ui": "4.0.12",
"@vue/eslint-config-prettier": "10.1.0", "@vue/eslint-config-prettier": "10.1.0",
"@vue/eslint-config-typescript": "14.2.0", "@vue/eslint-config-typescript": "14.2.0",
"@vue/test-utils": "2.4.6", "@vue/test-utils": "2.4.6",
"autoprefixer": "10.4.21", "autoprefixer": "10.4.21",
"depcheck": "1.4.7", "depcheck": "1.4.7",
"eslint": "9.31.0", "eslint": "9.39.1",
"eslint-config-prettier": "10.1.8", "eslint-config-prettier": "10.1.8",
"eslint-plugin-prettier": "5.5.4", "eslint-plugin-prettier": "5.5.4",
"eslint-plugin-vue": "9.32.0", "eslint-plugin-vue": "10.6.0",
"globals": "16.3.0", "globals": "16.5.0",
"happy-dom": "17.1.0", "happy-dom": "17.1.0",
"husky": "8.0.3", "husky": "8.0.3",
"lint-staged": "15.4.3", "lint-staged": "15.4.3",
@ -91,23 +92,23 @@
"postcss-px-to-viewport-8-with-include": "1.2.2", "postcss-px-to-viewport-8-with-include": "1.2.2",
"prettier": "3.6.2", "prettier": "3.6.2",
"rollup-plugin-gzip": "4.0.1", "rollup-plugin-gzip": "4.0.1",
"sass": "1.86.3", "sass": "1.94.2",
"svg-sprite-loader": "6.0.11", "svg-sprite-loader": "6.0.11",
"typescript": "5.8.3", "typescript": "5.9.3",
"unocss": "66.3.3", "unocss": "66.5.9",
"unplugin-auto-import": "19.1.2", "unplugin-auto-import": "20.2.0",
"unplugin-vue-components": "0.28.0", "unplugin-vue-components": "0.28.0",
"vite": "6.3.5", "vite": "7.2.6",
"vite-bundle-analyzer": "0.16.0", "vite-bundle-analyzer": "1.2.3",
"vite-plugin-cdn2": "1.1.0", "vite-plugin-cdn2": "1.1.0",
"vite-plugin-ejs": "1.7.0", "vite-plugin-ejs": "1.7.0",
"vite-plugin-eslint": "1.8.1", "vite-plugin-eslint": "1.8.1",
"vite-plugin-inspect": "0.10.6", "vite-plugin-inspect": "11.3.3",
"vite-plugin-mock-dev-server": "1.8.3", "vite-plugin-mock-dev-server": "2.0.4",
"vite-plugin-svg-icons": "2.0.1", "vite-plugin-svg-icons": "2.0.1",
"vite-svg-loader": "5.1.0", "vite-svg-loader": "5.1.0",
"vitest": "2.1.8", "vitest": "4.0.12",
"vue-eslint-parser": "9.4.3", "vue-eslint-parser": "10.2.0",
"vue-tsc": "2.2.8" "vue-tsc": "2.2.8"
}, },
"description": "<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->", "description": "<!-- ALL-CONTRIBUTORS-BADGE:START - Do not remove or modify this section -->",

4055
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,12 +1,11 @@
import { RouterView } from 'vue-router' import AppGlobalSpin from '@/app-components/app/AppGlobalSpin'
import AppLockScreen from '@/app-components/app/AppLockScreen'
import AppNaiveGlobalProvider from '@/app-components/provider/AppNaiveGlobalProvider' import AppNaiveGlobalProvider from '@/app-components/provider/AppNaiveGlobalProvider'
import AppStyleProvider from '@/app-components/provider/AppStyleProvider' import AppStyleProvider from '@/app-components/provider/AppStyleProvider'
import AppLockScreen from '@/app-components/app/AppLockScreen'
import AppWatermarkProvider from '@/app-components/provider/AppWatermarkProvider'
import AppGlobalSpin from '@/app-components/app/AppGlobalSpin'
import AppVersionProvider from '@/app-components/provider/AppVersionProvider' import AppVersionProvider from '@/app-components/provider/AppVersionProvider'
import AppWatermarkProvider from '@/app-components/provider/AppWatermarkProvider'
import { APP_GLOBAL_LOADING } from '@/app-config' import { APP_GLOBAL_LOADING } from '@/app-config'
import { RouterView } from 'vue-router'
export default defineComponent({ export default defineComponent({
name: 'App', name: 'App',

View File

@ -1,5 +1,5 @@
import { useSettingGetters } from '@/store'
import { useVueRouter } from '@/hooks' import { useVueRouter } from '@/hooks'
import { useSettingGetters } from '@/store'
/** /**
* *

View File

@ -1,9 +1,9 @@
import { import {
DAYJS_LOCAL_MAP,
DEFAULT_DAYJS_LOCAL,
LOCAL_OPTIONS, LOCAL_OPTIONS,
SYSTEM_DEFAULT_LOCAL, SYSTEM_DEFAULT_LOCAL,
SYSTEM_FALLBACK_LOCALE, SYSTEM_FALLBACK_LOCALE,
DAYJS_LOCAL_MAP,
DEFAULT_DAYJS_LOCAL,
} from '@/app-config' } from '@/app-config'
/** /**

View File

@ -1,5 +1,4 @@
import { request } from '@/axios' import { request } from '@/axios'
import type { PaginationResponse } from '@/types' import type { PaginationResponse } from '@/types'
export interface MockListParams { export interface MockListParams {

View File

@ -9,11 +9,10 @@
*/ */
import { request } from '@/axios' import { request } from '@/axios'
import type { BasicResponse } from '@/types' import type { BasicResponse } from '@/types'
interface AxiosTestResponse extends UnknownObjectKey { interface AxiosTestResponse extends GlobalRecordable {
data: UnknownObjectKey[] data: GlobalRecordable[]
city?: string city?: string
} }

View File

@ -6,13 +6,10 @@
* session catch * session catch
*/ */
import { NAvatar, NButton, NFlex } from 'naive-ui'
import { avatarProps } from 'naive-ui'
import { useSigningGetters } from '@/store' import { useSigningGetters } from '@/store'
import { avatarProps, NAvatar, NButton, NFlex } from 'naive-ui'
import type { PropType } from 'vue'
import type { AvatarProps, FlexProps } from 'naive-ui' import type { AvatarProps, FlexProps } from 'naive-ui'
import type { PropType } from 'vue'
const AppAvatar = defineComponent({ const AppAvatar = defineComponent({
name: 'AppAvatar', name: 'AppAvatar',

View File

@ -15,11 +15,8 @@
* 2. 使 * 2. 使
*/ */
import { NSpin } from 'naive-ui'
import { spinProps } from 'naive-ui'
import { getVariableToRefs } from '@/global-variable' import { getVariableToRefs } from '@/global-variable'
import { NSpin, spinProps } from 'naive-ui'
import type { SpinProps } from 'naive-ui' import type { SpinProps } from 'naive-ui'
const GlobalSpin = defineComponent({ const GlobalSpin = defineComponent({

View File

@ -1,5 +1,5 @@
import { useStorage } from '@vueuse/core'
import { APP_CATCH_KEY } from '@/app-config' import { APP_CATCH_KEY } from '@/app-config'
import { useStorage } from '@vueuse/core'
const appLockScreen = useStorage( const appLockScreen = useStorage(
APP_CATCH_KEY.isAppLockScreen, APP_CATCH_KEY.isAppLockScreen,

View File

@ -1,16 +1,13 @@
import { NInput, NFormItem, NButton } from 'naive-ui'
import AppAvatar from '@/app-components/app/AppAvatar' import AppAvatar from '@/app-components/app/AppAvatar'
import { RForm } from '@/components'
import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar' import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar'
import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared' import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared'
import { useSettingActions } from '@/store'
import { useTemplateRef } from 'vue'
import { useForm } from '@/components'
import { APP_CATCH_KEY } from '@/app-config' import { APP_CATCH_KEY } from '@/app-config'
import { setStorage, encrypt } from '@/utils' import { RForm, useForm } from '@/components'
import { useSettingActions } from '@/store'
import { encrypt, setStorage } from '@/utils'
import { NButton, NFormItem, NInput } from 'naive-ui'
import type { InputInst } from 'naive-ui' import type { InputInst } from 'naive-ui'
import { useTemplateRef } from 'vue'
const LockScreen = defineComponent({ const LockScreen = defineComponent({
name: 'LockScreen', name: 'LockScreen',

View File

@ -1,17 +1,14 @@
import '../../index.scss' import '../../index.scss'
import { NInput, NFormItem, NButton, NFlex } from 'naive-ui'
import AppAvatar from '@/app-components/app/AppAvatar' import AppAvatar from '@/app-components/app/AppAvatar'
import { RForm } from '@/components'
import dayjs from 'dayjs'
import { useSigningActions, useSettingActions } from '@/store'
import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared'
import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar' import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar'
import { useDevice } from '@/hooks' import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared'
import { useForm } from '@/components'
import { APP_CATCH_KEY } from '@/app-config' import { APP_CATCH_KEY } from '@/app-config'
import { removeStorage, decrypt, getStorage } from '@/utils' import { RForm, useForm } from '@/components'
import { useDevice } from '@/hooks'
import { useSettingActions, useSigningActions } from '@/store'
import { decrypt, getStorage, removeStorage } from '@/utils'
import dayjs from 'dayjs'
import { NButton, NFlex, NFormItem, NInput } from 'naive-ui'
export default defineComponent({ export default defineComponent({
name: 'UnlockScreen', name: 'UnlockScreen',

View File

@ -1,8 +1,7 @@
import { RModal } from '@/components' import { RModal } from '@/components'
import { useSettingActions, useSettingGetters } from '@/store'
import LockScreen from './components/LockScreen' import LockScreen from './components/LockScreen'
import { useSettingGetters, useSettingActions } from '@/store'
const AppLockScreen = defineComponent({ const AppLockScreen = defineComponent({
name: 'AppLockScreen', name: 'AppLockScreen',
setup() { setup() {

View File

@ -1,4 +1,4 @@
import { NAvatar, NTooltip, NFlex } from 'naive-ui' import { NAvatar, NFlex, NTooltip } from 'naive-ui'
interface AvatarOptions { interface AvatarOptions {
key: string key: string

View File

@ -6,21 +6,20 @@
* , * ,
*/ */
import { import { MESSAGE_PROVIDER } from '@/app-config'
NDialogProvider,
NLoadingBarProvider,
NMessageProvider,
NNotificationProvider,
NConfigProvider,
createDiscreteApi,
darkTheme,
NGlobalStyle,
NModalProvider,
} from 'naive-ui'
import { getNaiveLocales } from '@/locales/utils' import { getNaiveLocales } from '@/locales/utils'
import { useSettingGetters } from '@/store' import { useSettingGetters } from '@/store'
import { MESSAGE_PROVIDER } from '@/app-config' import {
createDiscreteApi,
darkTheme,
NConfigProvider,
NDialogProvider,
NGlobalStyle,
NLoadingBarProvider,
NMessageProvider,
NModalProvider,
NNotificationProvider,
} from 'naive-ui'
export default defineComponent({ export default defineComponent({
name: 'GlobalProvider', name: 'GlobalProvider',

View File

@ -1,16 +1,15 @@
import { get } from 'lodash-es' import { APP_CATCH_KEY, APP_THEME, GLOBAL_CLASS_NAMES } from '@/app-config'
import { useSettingGetters } from '@/store'
import type { SettingState } from '@/store/modules/setting/types'
import { import {
setClass,
removeClass,
setStyle,
colorToRgba, colorToRgba,
getStorage, getStorage,
removeClass,
setClass,
setStyle,
} from '@/utils' } from '@/utils'
import { useSettingGetters } from '@/store'
import { APP_CATCH_KEY, GLOBAL_CLASS_NAMES, APP_THEME } from '@/app-config'
import { useWindowSize } from '@vueuse/core' import { useWindowSize } from '@vueuse/core'
import { get } from 'lodash-es'
import type { SettingState } from '@/store/modules/setting/types'
export default defineComponent({ export default defineComponent({
name: 'AppStyleProvider', name: 'AppStyleProvider',

View File

@ -4,11 +4,10 @@
* 退 * 退
*/ */
import { RModal } from '@/components'
import { getStorage, setStorage } from '@/utils'
import { useSigningActions } from '@/store'
import { APP_CATCH_KEY } from '@/app-config' import { APP_CATCH_KEY } from '@/app-config'
import { RModal } from '@/components'
import { useSigningActions } from '@/store'
import { getStorage, setStorage } from '@/utils'
export default defineComponent({ export default defineComponent({
name: 'AppVersionProvider', name: 'AppVersionProvider',

View File

@ -8,9 +8,8 @@
* useWatermark hook * useWatermark hook
*/ */
import { NWatermark } from 'naive-ui'
import { useSettingGetters } from '@/store' import { useSettingGetters } from '@/store'
import { NWatermark } from 'naive-ui'
export default defineComponent({ export default defineComponent({
name: 'AppWatermarkProvider', name: 'AppWatermarkProvider',

View File

@ -1,5 +1,9 @@
import type { TemplateLocale, LocalOptions, DayjsLocalMap } from '@/types' import type {
import type { ValueOf } from '@/types' DayjsLocalMap,
LocalOptions,
TemplateLocale,
ValueOf,
} from '@/types'
/** /**
* *

View File

@ -1,6 +1,5 @@
import { axiosCanceler } from '@/axios/utils/interceptor'
import type { AxiosRequestInterceptor, FetchErrorFunction } from '@/axios/types' import type { AxiosRequestInterceptor, FetchErrorFunction } from '@/axios/types'
import { axiosCanceler } from '@/axios/utils/interceptor'
/** /**
* *

View File

@ -1,11 +1,10 @@
import { appendRequestHeaders } from '@/axios/utils/append-request-headers'
import { APP_CATCH_KEY } from '@/app-config' import { APP_CATCH_KEY } from '@/app-config'
import { getStorage } from '@/utils'
import type { import type {
RequestInterceptorConfig,
AxiosRequestInterceptor, AxiosRequestInterceptor,
RequestInterceptorConfig,
} from '@/axios/types' } from '@/axios/types'
import { appendRequestHeaders } from '@/axios/utils/append-request-headers'
import { getStorage } from '@/utils'
/** /**
* *

View File

@ -1,9 +1,8 @@
import { axiosCanceler } from '@/axios/utils/interceptor'
import type { import type {
AxiosResponseInterceptor, AxiosResponseInterceptor,
FetchErrorFunction, FetchErrorFunction,
} from '@/axios/types' } from '@/axios/types'
import { axiosCanceler } from '@/axios/utils/interceptor'
/** /**
* *

View File

@ -10,11 +10,10 @@
* 使 * 使
*/ */
import useHookPlusRequest from 'vue-hooks-plus/es/useRequest'
import request from '@/axios/instance' import request from '@/axios/instance'
import type { UseRequestOptions } from 'vue-hooks-plus/es/useRequest/types'
import type { AppRawRequestConfig } from '@/axios/types' import type { AppRawRequestConfig } from '@/axios/types'
import useHookPlusRequest from 'vue-hooks-plus/es/useRequest'
import type { UseRequestOptions } from 'vue-hooks-plus/es/useRequest/types'
/** /**
* *

View File

@ -1,15 +1,14 @@
import axios from 'axios'
import { AXIOS_CONFIG } from '@/app-config' import { AXIOS_CONFIG } from '@/app-config'
import { axiosInterceptor } from '@/axios/utils/interceptor'
import { import {
setupResponseInterceptor,
setupResponseErrorInterceptor,
} from '@/axios/axios-interceptor/response'
import {
setupRequestInterceptor,
setupRequestErrorInterceptor, setupRequestErrorInterceptor,
setupRequestInterceptor,
} from '@/axios/axios-interceptor/request' } from '@/axios/axios-interceptor/request'
import {
setupResponseErrorInterceptor,
setupResponseInterceptor,
} from '@/axios/axios-interceptor/response'
import { axiosInterceptor } from '@/axios/utils/interceptor'
import axios from 'axios'
import type { AxiosInstanceExpand, RequestInterceptorConfig } from './types' import type { AxiosInstanceExpand, RequestInterceptorConfig } from './types'
// 创建 axios 实例 // 创建 axios 实例

View File

@ -1,16 +1,16 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import type { AnyFn } from '@/types'
import type { import type {
Axios,
AxiosDefaults,
AxiosError,
AxiosHeaders, AxiosHeaders,
AxiosRequestConfig, AxiosRequestConfig,
HeadersDefaults,
AxiosDefaults,
Axios,
AxiosResponse,
AxiosError,
InternalAxiosRequestConfig,
AxiosRequestHeaders, AxiosRequestHeaders,
AxiosResponse,
HeadersDefaults,
InternalAxiosRequestConfig,
} from 'axios' } from 'axios'
import type { AnyFC } from '@/types'
export type AxiosHeaderValue = export type AxiosHeaderValue =
| AxiosHeaders | AxiosHeaders
@ -136,13 +136,13 @@ export type RequestInterceptorConfig<T = any> = AppRawRequestConfig<T>
export type ResponseInterceptorConfig<T = any, K = any> = AxiosResponse<T, K> export type ResponseInterceptorConfig<T = any, K = any> = AxiosResponse<T, K>
export interface ImplementQueue { export interface ImplementQueue {
implementRequestInterceptorArray: AnyFC[] implementRequestInterceptorArray: AnyFn[]
implementResponseInterceptorArray: AnyFC[] implementResponseInterceptorArray: AnyFn[]
} }
export interface ErrorImplementQueue { export interface ErrorImplementQueue {
implementRequestInterceptorErrorArray: AnyFC[] implementRequestInterceptorErrorArray: AnyFn[]
implementResponseInterceptorErrorArray: AnyFC[] implementResponseInterceptorErrorArray: AnyFn[]
} }
export type FetchType = 'ok' | 'error' export type FetchType = 'ok' | 'error'

View File

@ -1,4 +1,4 @@
import type { RawAxiosRequestHeaders, AxiosRequestConfig } from 'axios' import type { AxiosRequestConfig, RawAxiosRequestHeaders } from 'axios'
import type { RequestHeaderOptions } from '../types' import type { RequestHeaderOptions } from '../types'
/** /**

View File

@ -1,4 +1,4 @@
import type { RawAxiosRequestHeaders, AxiosRequestConfig } from 'axios' import type { AxiosRequestConfig, RawAxiosRequestHeaders } from 'axios'
import type { RequestHeaderOptions } from '../types' import type { RequestHeaderOptions } from '../types'
/** /**

View File

@ -1,16 +1,15 @@
import RequestCanceler from '@/axios/utils/RequestCanceler'
import { getAppEnvironment } from '@/utils'
import type { import type {
RequestInterceptorConfig, AxiosFetchError,
ResponseInterceptorConfig, AxiosFetchInstance,
ImplementQueue,
ErrorImplementQueue, ErrorImplementQueue,
FetchType, FetchType,
AxiosFetchInstance, ImplementQueue,
AxiosFetchError, RequestInterceptorConfig,
ResponseInterceptorConfig,
} from '@/axios/types' } from '@/axios/types'
import type { AnyFC } from '@/types' import RequestCanceler from '@/axios/utils/RequestCanceler'
import type { AnyFn } from '@/types'
import { getAppEnvironment } from '@/utils'
import type { AxiosError } from 'axios' import type { AxiosError } from 'axios'
type ImplementKeys = keyof ImplementQueue type ImplementKeys = keyof ImplementQueue
@ -88,7 +87,7 @@ export const axiosInterceptor = () => {
*/ */
const setImplement = ( const setImplement = (
key: ImplementKeys | ErrorImplementKeys, key: ImplementKeys | ErrorImplementKeys,
func: AnyFC[], func: AnyFn[],
fetchType: FetchType, fetchType: FetchType,
): void => { ): void => {
if (fetchType === 'ok') { if (fetchType === 'ok') {
@ -111,7 +110,7 @@ export const axiosInterceptor = () => {
const getImplement = ( const getImplement = (
key: ImplementKeys | ErrorImplementKeys, key: ImplementKeys | ErrorImplementKeys,
fetchType: FetchType, fetchType: FetchType,
): AnyFC[] => { ): AnyFn[] => {
return fetchType === 'ok' return fetchType === 'ok'
? implement[key as ImplementKeys] ? implement[key as ImplementKeys]
: errorImplement[key as ErrorImplementKeys] : errorImplement[key as ErrorImplementKeys]
@ -125,7 +124,7 @@ export const axiosInterceptor = () => {
* @description * @description
* - * -
*/ */
const executeQueue = (funcs: AnyFC[], ...args: unknown[]): void => { const executeQueue = (funcs: AnyFn[], ...args: unknown[]): void => {
funcs.forEach((func) => { funcs.forEach((func) => {
if (typeof func === 'function') { if (typeof func === 'function') {
func(...args) func(...args)

View File

@ -1,7 +1,6 @@
import type { ExtractPublicPropTypes } from 'vue'
import RBarcode from './src/Barcode' import RBarcode from './src/Barcode'
import barcodeProps from './src/props' import barcodeProps from './src/props'
import type { ExtractPublicPropTypes } from 'vue'
import type { RBarcodeSize } from './src/types' import type { RBarcodeSize } from './src/types'
// 扩展 BarcodeProps 以提供更好的类型提示 // 扩展 BarcodeProps 以提供更好的类型提示

View File

@ -1,15 +1,12 @@
import './index.scss' import './index.scss'
import { call, completeSize } from '@/utils'
import { NSpin } from 'naive-ui'
import barcode from 'jsbarcode'
import props from './props'
import { completeSize, call } from '@/utils'
import { useTemplateRef } from 'vue'
import { useResizeObserver } from '@vueuse/core' import { useResizeObserver } from '@vueuse/core'
import type { WatchStopHandle } from 'vue'
import type { UseResizeObserverReturn } from '@vueuse/core' import type { UseResizeObserverReturn } from '@vueuse/core'
import barcode from 'jsbarcode'
import { NSpin } from 'naive-ui'
import { useTemplateRef } from 'vue'
import type { WatchStopHandle } from 'vue'
import props from './props'
export default defineComponent({ export default defineComponent({
name: 'RBarcode', name: 'RBarcode',

View File

@ -1,11 +1,11 @@
import type { MaybeArray } from '@/types'
import type { PropType } from 'vue'
import type { import type {
RBarcodeRender,
RBarcodeOptions,
RBarcodeFormat, RBarcodeFormat,
RBarcodeOptions,
RBarcodeRender,
RBarcodeSize, RBarcodeSize,
} from './types' } from './types'
import type { PropType } from 'vue'
import type { MaybeArray } from '@/types'
const props = { const props = {
/** /**

View File

@ -1,10 +1,9 @@
import RChart from './src/Chart'
import chartProps from './src/props'
import useChart from './src/hooks/useChart'
import type { ExtractPublicPropTypes } from 'vue' import type { ExtractPublicPropTypes } from 'vue'
import type * as RChartType from './src/types' import RChart from './src/Chart'
import useChart from './src/hooks/useChart'
import type { UseChartReturn } from './src/hooks/useChart' import type { UseChartReturn } from './src/hooks/useChart'
import chartProps from './src/props'
import type * as RChartType from './src/types'
export type ChartProps = ExtractPublicPropTypes<typeof chartProps> export type ChartProps = ExtractPublicPropTypes<typeof chartProps>
export type { RChartType, UseChartReturn } export type { RChartType, UseChartReturn }

View File

@ -1,52 +1,53 @@
import './index.scss' import './index.scss'
import { use, registerTheme, init } from 'echarts/core' // echarts 核心模块
import {
TitleComponent,
TooltipComponent,
GridComponent,
DatasetComponent,
TransformComponent,
LegendComponent,
ToolboxComponent,
AriaComponent,
} from 'echarts/components' // 提示框, 标题, 直角坐标系, 数据集, 内置数据转换器等组件(组件后缀都为 Component)
import {
BarChart,
LineChart,
PieChart,
CandlestickChart,
ScatterChart,
PictorialBarChart,
} from 'echarts/charts' // 系列类型(后缀都为 SeriesOption)
import { LegacyGridContainLabel, UniversalTransition } from 'echarts/features' // 标签自动布局, 全局过渡动画等特性
import { CanvasRenderer } from 'echarts/renderers' // echarts 渲染器
import { NCard } from 'naive-ui'
import props from './props'
import { throttle } from 'lodash-es'
import { completeSize, downloadBase64File, call, renderNode } from '@/utils'
import { getCustomEchartTheme, loadingOptions, setEchartOptions } from './utils'
import { APP_THEME } from '@/app-config' import { APP_THEME } from '@/app-config'
import {
useResizeObserver,
useIntersectionObserver,
watchThrottled,
} from '@vueuse/core'
import { RMoreDropdown } from '@/components' import { RMoreDropdown } from '@/components'
import { useSettingGetters } from '@/store' import { useSettingGetters } from '@/store'
import { useTemplateRef } from 'vue' import type { AnyFn } from '@/types'
import { USE_CHART_PROVIDER_KEY } from './config' import { call, completeSize, downloadBase64File, renderNode } from '@/utils'
import {
import type { WatchStopHandle } from 'vue' useIntersectionObserver,
import type { AnyFC } from '@/types' useResizeObserver,
import type { DebouncedFunc } from 'lodash-es' watchThrottled,
import type {
UseResizeObserverReturn,
UseIntersectionObserverReturn,
} from '@vueuse/core' } from '@vueuse/core'
import type {
UseIntersectionObserverReturn,
UseResizeObserverReturn,
} from '@vueuse/core'
// 提示框, 标题, 直角坐标系, 数据集, 内置数据转换器等组件(组件后缀都为 Component)
import {
BarChart,
CandlestickChart,
LineChart,
PictorialBarChart,
PieChart,
ScatterChart,
} from 'echarts/charts'
import {
AriaComponent,
DatasetComponent,
GridComponent,
LegendComponent,
TitleComponent,
ToolboxComponent,
TooltipComponent,
TransformComponent,
} from 'echarts/components'
import { init, registerTheme, use } from 'echarts/core' // echarts 核心模块
import type { ECharts, EChartsCoreOption } from 'echarts/core' import type { ECharts, EChartsCoreOption } from 'echarts/core'
import type { DropdownProps, DropdownOption } from 'naive-ui' // 系列类型(后缀都为 SeriesOption)
import { LegacyGridContainLabel, UniversalTransition } from 'echarts/features' // 标签自动布局, 全局过渡动画等特性
import { CanvasRenderer } from 'echarts/renderers' // echarts 渲染器
import { throttle } from 'lodash-es'
import type { DebouncedFunc } from 'lodash-es'
import { NCard } from 'naive-ui'
import type { DropdownOption, DropdownProps } from 'naive-ui'
import { useTemplateRef } from 'vue'
import type { WatchStopHandle } from 'vue'
import { USE_CHART_PROVIDER_KEY } from './config'
import props from './props'
import { getCustomEchartTheme, loadingOptions, setEchartOptions } from './utils'
// 获取 chart 主题 // 获取 chart 主题
const echartThemes = getCustomEchartTheme() const echartThemes = getCustomEchartTheme()
@ -94,7 +95,7 @@ export default defineComponent({
// echart 实例 // echart 实例
const echartInstanceRef = shallowRef<ECharts>() const echartInstanceRef = shallowRef<ECharts>()
// resize 防抖方法实例 // resize 防抖方法实例
let resizeThrottleReturn: DebouncedFunc<AnyFC> | null let resizeThrottleReturn: DebouncedFunc<AnyFn> | null
// resize observer 实例 // resize observer 实例
let resizeObserverReturn: UseResizeObserverReturn | null let resizeObserverReturn: UseResizeObserverReturn | null
// 当前配置主题 // 当前配置主题
@ -366,7 +367,7 @@ export default defineComponent({
if (!resizeObserverReturn) { if (!resizeObserverReturn) {
resizeObserverReturn = useResizeObserver( resizeObserverReturn = useResizeObserver(
props.autoResizeObserverTarget || rayChartWrapperRef, props.autoResizeObserverTarget || rayChartWrapperRef,
resizeThrottleReturn as AnyFC, resizeThrottleReturn as AnyFn,
) )
} }
} }

View File

@ -1,5 +1,5 @@
import type { ECharts } from 'echarts/core'
import type { VoidFC } from '@/types' import type { VoidFC } from '@/types'
import type { ECharts } from 'echarts/core'
/** /**
* *

View File

@ -1,5 +1,4 @@
import { USE_CHART_PROVIDER_KEY } from '../config' import { USE_CHART_PROVIDER_KEY } from '../config'
import type { ChartTheme } from '../types' import type { ChartTheme } from '../types'
export interface ChartProviderOptions { export interface ChartProviderOptions {

View File

@ -1,23 +1,22 @@
import { loadingOptions, setEchartOptions } from './utils' import type { MaybeArray, VoidFC } from '@/types'
import type * as echarts from 'echarts/core' // echarts 核心模块
import type { PropType, VNode } from 'vue'
import type { MaybeArray } from '@/types'
import type { ECharts, SetOptionOpts } from 'echarts/core'
import type { import type {
MaybeComputedElementRef, MaybeComputedElementRef,
MaybeElement, MaybeElement,
UseIntersectionObserverOptions, UseIntersectionObserverOptions,
} from '@vueuse/core' } from '@vueuse/core'
import type * as echarts from 'echarts/core' // echarts 核心模块
import type { ECharts, SetOptionOpts } from 'echarts/core'
import type { CardProps, DropdownOption, DropdownProps } from 'naive-ui'
import type { PropType, VNode } from 'vue'
import type { import type {
LoadingOptions,
ChartTheme, ChartTheme,
EChartsExtensionInstallRegisters, EChartsExtensionInstallRegisters,
RChartPresetType, LoadingOptions,
RChartDownloadOptions, RChartDownloadOptions,
RChartPresetType,
} from './types' } from './types'
import type { CardProps, DropdownProps, DropdownOption } from 'naive-ui' import { loadingOptions, setEchartOptions } from './utils'
import type { VoidFC } from '@/types'
const props = { const props = {
/** /**

View File

@ -13,12 +13,12 @@ import type { ECharts } from 'echarts/core'
import type { CanvasRenderer } from 'echarts/renderers' // `echarts` 渲染器 import type { CanvasRenderer } from 'echarts/renderers' // `echarts` 渲染器
export interface ChartThemeRawModules { export interface ChartThemeRawModules {
default: Record<string, UnknownObjectKey> default: Record<string, GlobalRecordable>
} }
export interface ChartThemeRawArray { export interface ChartThemeRawArray {
name: string name: string
theme: UnknownObjectKey theme: GlobalRecordable
} }
export interface LoadingOptions { export interface LoadingOptions {

View File

@ -1,6 +1,5 @@
import { useTheme } from '@/hooks'
import type { LoadingOptions } from '@/components/base/RChart/src/types' import type { LoadingOptions } from '@/components/base/RChart/src/types'
import { useTheme } from '@/hooks'
/** /**
* *

View File

@ -1,8 +1,7 @@
import type { ExtractPublicPropTypes } from 'vue'
import RCollapseGrid from './src' import RCollapseGrid from './src'
import collapseGridProps from './src/props' import collapseGridProps from './src/props'
import type * as RCollapseGridType from './src/types' import type * as RCollapseGridType from './src/types'
import type { ExtractPublicPropTypes } from 'vue'
export type CollapseGridProps = ExtractPublicPropTypes<typeof collapseGridProps> export type CollapseGridProps = ExtractPublicPropTypes<typeof collapseGridProps>
export type { RCollapseGridType } export type { RCollapseGridType }

View File

@ -9,14 +9,11 @@
*/ */
import './index.scss' import './index.scss'
import { NCard, NGrid, NGridItem, NFlex } from 'naive-ui'
import { RIcon } from '@/components' import { RIcon } from '@/components'
import { call } from '@/utils' import { call } from '@/utils'
import props from './props' import { NCard, NFlex, NGrid, NGridItem } from 'naive-ui'
import type { GridProps } from 'naive-ui' import type { GridProps } from 'naive-ui'
import props from './props'
export default defineComponent({ export default defineComponent({
name: 'RCollapseGrid', name: 'RCollapseGrid',

View File

@ -1,8 +1,7 @@
import type { AnyFn, MaybeArray } from '@/types'
import { gridProps } from 'naive-ui' import { gridProps } from 'naive-ui'
import type { PropType } from 'vue' import type { PropType } from 'vue'
import type { CollapseToggleText, ActionAlignType } from './types' import type { ActionAlignType, CollapseToggleText } from './types'
import type { AnyFC, MaybeArray } from '@/types'
const props = { const props = {
/** /**

View File

@ -1,15 +1,11 @@
import './index.scss' import './index.scss'
import type { AnyFn } from '@/types'
import { NCard } from 'naive-ui' import { completeSize, queryElements, unrefElement } from '@/utils'
import { Teleport, Transition } from 'vue'
import interact from 'interactjs'
import { cardProps } from 'naive-ui'
import { unrefElement, completeSize, queryElements } from '@/utils'
import type { VNode } from 'vue'
import type { MaybeElement, MaybeRefOrGetter } from '@vueuse/core' import type { MaybeElement, MaybeRefOrGetter } from '@vueuse/core'
import type { AnyFC } from '@/types' import interact from 'interactjs'
import { cardProps, NCard } from 'naive-ui'
import { Teleport, Transition } from 'vue'
import type { VNode } from 'vue'
type RestrictRectOptions = Parameters<typeof interact.modifiers.restrictRect>[0] type RestrictRectOptions = Parameters<typeof interact.modifiers.restrictRect>[0]
@ -323,7 +319,7 @@ export default defineComponent({
} }
// 更新拖拽 // 更新拖拽
const refreshDraggableWhenPropsChange = (fn: AnyFC) => { const refreshDraggableWhenPropsChange = (fn: AnyFn) => {
isSetup = false isSetup = false
fn() fn()

View File

@ -1,8 +1,7 @@
import RFlow from './src/Flow'
import flowProps from './src/props'
import { useFlow } from './src/hooks'
import type { ExtractPublicPropTypes } from 'vue' import type { ExtractPublicPropTypes } from 'vue'
import RFlow from './src/Flow'
import { useFlow } from './src/hooks'
import flowProps from './src/props'
export type FlowProps = ExtractPublicPropTypes<typeof flowProps> export type FlowProps = ExtractPublicPropTypes<typeof flowProps>

View File

@ -1,14 +1,12 @@
import './index.scss' import './index.scss'
import '@logicflow/core/lib/style/index.css' import '@logicflow/core/lib/style/index.css'
import { call, completeSize } from '@/utils'
import { useTemplateRef } from 'vue'
import props from './props'
import { completeSize, call } from '@/utils'
import LogicFlow from '@logicflow/core' import LogicFlow from '@logicflow/core'
import { omit } from 'lodash-es' import { omit } from 'lodash-es'
import { useTemplateRef } from 'vue'
import type { FlowGraphData, G } from './types'
import type { WatchStopHandle } from 'vue' import type { WatchStopHandle } from 'vue'
import props from './props'
import type { FlowGraphData, G } from './types'
// 是否首次注册插件 // 是否首次注册插件
let isSetup = false let isSetup = false

View File

@ -1,8 +1,7 @@
import { getDefaultFlowOptions } from './constant'
import type { FlowGraphData, FlowOptions, ExtensionType } from './types'
import type LogicFlow from '@logicflow/core'
import type { MaybeArray } from '@/types' import type { MaybeArray } from '@/types'
import type LogicFlow from '@logicflow/core'
import { getDefaultFlowOptions } from './constant'
import type { ExtensionType, FlowGraphData, FlowOptions } from './types'
const props = { const props = {
/** /**

View File

@ -1,5 +1,5 @@
import type LogicFlow from '@logicflow/core'
import type { Recordable, SetRequired } from '@/types' import type { Recordable, SetRequired } from '@/types'
import type LogicFlow from '@logicflow/core'
/** /**
* *

View File

@ -1,10 +1,9 @@
import RForm from './src/Form'
import formProps from './src/props'
import useForm from './src/hooks/useForm'
import type * as RFormType from './src/types'
import type { ExtractPublicPropTypes } from 'vue' import type { ExtractPublicPropTypes } from 'vue'
import RForm from './src/Form'
import useForm from './src/hooks/useForm'
import type { UseFormReturn } from './src/hooks/useForm' import type { UseFormReturn } from './src/hooks/useForm'
import formProps from './src/props'
import type * as RFormType from './src/types'
export type FormProps = ExtractPublicPropTypes<typeof formProps> export type FormProps = ExtractPublicPropTypes<typeof formProps>
export type { RFormType, UseFormReturn } export type { RFormType, UseFormReturn }

View File

@ -1,12 +1,10 @@
import { NForm, NSpin } from 'naive-ui'
import props from './props'
import { call, unrefElement } from '@/utils' import { call, unrefElement } from '@/utils'
import { useTemplateRef } from 'vue'
import { useEventListener } from '@vueuse/core' import { useEventListener } from '@vueuse/core'
import { NForm, NSpin } from 'naive-ui'
import type { RFormInst } from './types' import { useTemplateRef } from 'vue'
import type { ShallowRef } from 'vue' import type { ShallowRef } from 'vue'
import props from './props'
import type { RFormInst } from './types'
export default defineComponent({ export default defineComponent({
name: 'RForm', name: 'RForm',

View File

@ -1,12 +1,11 @@
import { cloneDeep } from 'lodash-es'
import type {
RFormInst,
FormValidateCallback,
ShouldRuleBeApplied,
RFormRules,
} from '../types'
import type { Recordable } from '@/types' import type { Recordable } from '@/types'
import { cloneDeep } from 'lodash-es'
import type {
FormValidateCallback,
RFormInst,
RFormRules,
ShouldRuleBeApplied,
} from '../types'
/** /**
* *

View File

@ -1,7 +1,6 @@
import { formProps } from 'naive-ui' import type { AnyFn, MaybeArray } from '@/types'
import { omit } from 'lodash-es' import { omit } from 'lodash-es'
import { formProps } from 'naive-ui'
import type { MaybeArray, AnyFC } from '@/types'
import type { RFormInst } from './types' import type { RFormInst } from './types'
const props = { const props = {
@ -67,7 +66,7 @@ const props = {
* @default null * @default null
*/ */
onFinish: { onFinish: {
type: Function as PropType<AnyFC>, type: Function as PropType<AnyFn>,
default: null, default: null,
}, },
/** /**

View File

@ -1,8 +1,7 @@
import type { ExtractPublicPropTypes } from 'vue'
import RIcon from './src/Icon' import RIcon from './src/Icon'
import iconProps from './src/props' import iconProps from './src/props'
import type { ExtractPublicPropTypes } from 'vue'
export type IconProps = ExtractPublicPropTypes<typeof iconProps> export type IconProps = ExtractPublicPropTypes<typeof iconProps>
export { RIcon, iconProps } export { RIcon, iconProps }

View File

@ -1,6 +1,5 @@
import './index.scss' import './index.scss'
import { call, completeSize } from '@/utils'
import { completeSize, call } from '@/utils'
import props from './props' import props from './props'
export default defineComponent({ export default defineComponent({

View File

@ -1,5 +1,5 @@
import type { PropType } from 'vue'
import type { MaybeArray } from '@/types' import type { MaybeArray } from '@/types'
import type { PropType } from 'vue'
const props = { const props = {
color: { color: {

View File

@ -1,8 +1,7 @@
import type { ExtractPublicPropTypes } from 'vue'
import RIframe from './src/Iframe' import RIframe from './src/Iframe'
import iframeProps from './src/props' import iframeProps from './src/props'
import type * as RIframeType from './src/types' import type * as RIframeType from './src/types'
import type { ExtractPublicPropTypes } from 'vue'
export type IframeProps = ExtractPublicPropTypes<typeof iframeProps> export type IframeProps = ExtractPublicPropTypes<typeof iframeProps>
export type { RIframeType } export type { RIframeType }

View File

@ -1,11 +1,9 @@
import './index.scss' import './index.scss'
import { NSpin } from 'naive-ui'
import { call, completeSize } from '@/utils' import { call, completeSize } from '@/utils'
import props from './props'
import { useEventListener } from '@vueuse/core' import { useEventListener } from '@vueuse/core'
import { NSpin } from 'naive-ui'
import { useTemplateRef } from 'vue' import { useTemplateRef } from 'vue'
import props from './props'
export default defineComponent({ export default defineComponent({
name: 'RIframe', name: 'RIframe',

View File

@ -1,6 +1,6 @@
import type { PropType } from 'vue'
import type { MaybeArray } from '@/types' import type { MaybeArray } from '@/types'
import type { SpinProps } from 'naive-ui' import type { SpinProps } from 'naive-ui'
import type { PropType } from 'vue'
import type { Lazy } from './types' import type { Lazy } from './types'
const props = { const props = {

View File

@ -1,10 +1,9 @@
import type { ExtractPublicPropTypes } from 'vue'
import useModal from './src/hooks/useModal'
import type { UseModalReturn } from './src/hooks/useModal'
import RModal from './src/Modal' import RModal from './src/Modal'
import modalProps from './src/props' import modalProps from './src/props'
import useModal from './src/hooks/useModal'
import type * as RModalType from './src/types' import type * as RModalType from './src/types'
import type { ExtractPublicPropTypes } from 'vue'
import type { UseModalReturn } from './src/hooks/useModal'
export type ModalProps = ExtractPublicPropTypes<typeof modalProps> export type ModalProps = ExtractPublicPropTypes<typeof modalProps>
export type { RModalType, UseModalReturn } export type { RModalType, UseModalReturn }

View File

@ -1,16 +1,13 @@
import './index.scss' import './index.scss'
import { NModal } from 'naive-ui'
import props from './props'
import { completeSize, uuid } from '@/utils' import { completeSize, uuid } from '@/utils'
import { NModal } from 'naive-ui'
import type { ModalProps } from 'naive-ui'
import { import {
CSS_VARS_KEYS,
FULLSCREEN_CARD_TYPE_CLASS, FULLSCREEN_CARD_TYPE_CLASS,
R_MODAL_CLASS, R_MODAL_CLASS,
CSS_VARS_KEYS,
} from './constant' } from './constant'
import props from './props'
import type { ModalProps } from 'naive-ui'
export default defineComponent({ export default defineComponent({
name: 'RModal', name: 'RModal',

View File

@ -1,7 +1,6 @@
import { useModal as useNaiveModal, NScrollbar } from 'naive-ui' import { completeSize, queryElements, setClass, setStyle } from '@/utils'
import { queryElements, setStyle, completeSize, setClass } from '@/utils' import { NScrollbar, useModal as useNaiveModal } from 'naive-ui'
import { R_MODAL_CLASS, CSS_VARS_KEYS } from '../constant' import { CSS_VARS_KEYS, R_MODAL_CLASS } from '../constant'
import type { RModalProps } from '../types' import type { RModalProps } from '../types'
/** /**

View File

@ -1,8 +1,7 @@
import type { ExtractPublicPropTypes } from 'vue'
import RMoreDropdown from './src/MoreDropdown' import RMoreDropdown from './src/MoreDropdown'
import moreDropdownProps from './src/props' import moreDropdownProps from './src/props'
import type { ExtractPublicPropTypes } from 'vue'
export type MoreDropdownProps = ExtractPublicPropTypes<typeof moreDropdownProps> export type MoreDropdownProps = ExtractPublicPropTypes<typeof moreDropdownProps>
export { RMoreDropdown, moreDropdownProps } export { RMoreDropdown, moreDropdownProps }

View File

@ -1,10 +1,8 @@
import { NDropdown } from 'naive-ui'
import { RIcon } from '@/components' import { RIcon } from '@/components'
import props from './props'
import { renderNode } from '@/utils' import { renderNode } from '@/utils'
import { NDropdown } from 'naive-ui'
import type { DropdownProps } from 'naive-ui' import type { DropdownProps } from 'naive-ui'
import props from './props'
export default defineComponent({ export default defineComponent({
name: 'RMoreDropdown', name: 'RMoreDropdown',

View File

@ -1,7 +1,6 @@
import RSegment from './src/Segment'
import segmentProps from './src/props'
import type { ExtractPublicPropTypes } from 'vue' import type { ExtractPublicPropTypes } from 'vue'
import segmentProps from './src/props'
import RSegment from './src/Segment'
import type { RSegmentOptions } from './src/types' import type { RSegmentOptions } from './src/types'
export type SegmentProps = ExtractPublicPropTypes<typeof segmentProps> export type SegmentProps = ExtractPublicPropTypes<typeof segmentProps>

View File

@ -1,12 +1,9 @@
import './index.scss' import './index.scss'
import { NTabs, NTab, NPopover, NFlex } from 'naive-ui'
import props from './props'
import { themeOverrides } from './constant'
import { completeSize, isValueType, renderNode } from '@/utils' import { completeSize, isValueType, renderNode } from '@/utils'
import { NFlex, NPopover, NTab, NTabs } from 'naive-ui'
import type { TabsProps } from 'naive-ui' import type { TabsProps } from 'naive-ui'
import { themeOverrides } from './constant'
import props from './props'
import type { RSegmentOptions } from './types' import type { RSegmentOptions } from './types'
const iconSegmentTab = (option: RSegmentOptions) => { const iconSegmentTab = (option: RSegmentOptions) => {

View File

@ -1,9 +1,8 @@
import { tabsProps } from 'naive-ui'
import { omit } from 'lodash-es' import { omit } from 'lodash-es'
import { OMIT_TABS_PROPS_KEYS } from './constant' import { tabsProps } from 'naive-ui'
import type { RSegmentOptions, RSegmentWidth } from './types'
import type { PropType } from 'vue' import type { PropType } from 'vue'
import { OMIT_TABS_PROPS_KEYS } from './constant'
import type { RSegmentOptions, RSegmentWidth } from './types'
/** /**
* *

View File

@ -1,6 +1,6 @@
import type { TabsProps, TabPaneProps, PopoverProps } from 'naive-ui' import type { PopoverProps, TabPaneProps, TabsProps } from 'naive-ui'
import type { ExtractPublicPropTypes, VNode, VNodeChild } from 'vue'
import type { OMIT_TABS_PROPS_KEYS } from './constant' import type { OMIT_TABS_PROPS_KEYS } from './constant'
import type { VNode, VNodeChild, ExtractPublicPropTypes } from 'vue'
export type OmitTabsPropsKeys = (typeof OMIT_TABS_PROPS_KEYS)[number] export type OmitTabsPropsKeys = (typeof OMIT_TABS_PROPS_KEYS)[number]

View File

@ -1,12 +1,11 @@
import RTable from './src/Table'
import tableProps from './src/props'
import useTable from './src/hooks/useTable'
import useCheckedRowKeys from './src/hooks/useCheckedRowKeys'
import type * as RTableType from './src/types'
import type { UseTableReturn } from './src/hooks/useTable'
import type { UseCheckedRowKeysReturn } from './src/hooks/useCheckedRowKeys'
import type { ExtractPublicPropTypes } from 'vue' import type { ExtractPublicPropTypes } from 'vue'
import useCheckedRowKeys from './src/hooks/useCheckedRowKeys'
import type { UseCheckedRowKeysReturn } from './src/hooks/useCheckedRowKeys'
import useTable from './src/hooks/useTable'
import type { UseTableReturn } from './src/hooks/useTable'
import tableProps from './src/props'
import RTable from './src/Table'
import type * as RTableType from './src/types'
export type TableProps = ExtractPublicPropTypes<typeof tableProps> export type TableProps = ExtractPublicPropTypes<typeof tableProps>
export type { RTableType, UseTableReturn, UseCheckedRowKeysReturn } export type { RTableType, UseTableReturn, UseCheckedRowKeysReturn }

View File

@ -1,20 +1,17 @@
import './index.scss' import './index.scss'
import type { ComponentSize } from '@/types'
import { call, completeSize, renderNode, uuid } from '@/utils'
import { pick } from 'lodash-es'
import { NCard, NDataTable, NDropdown, NFlex } from 'naive-ui' import { NCard, NDataTable, NDropdown, NFlex } from 'naive-ui'
import Size from './components/Size' import type { DataTableProps, DropdownOption } from 'naive-ui'
import Fullscreen from './components/Fullscreen' import { useTemplateRef } from 'vue'
import C from './components/C' import C from './components/C'
import Fullscreen from './components/Fullscreen'
import Print from './components/Print' import Print from './components/Print'
import TablePropsSelect from './components/Props' import TablePropsSelect from './components/Props'
import Size from './components/Size'
import props from './props' import props from './props'
import { call, renderNode, uuid, completeSize } from '@/utils'
import { config } from './shared' import { config } from './shared'
import { pick } from 'lodash-es'
import { useTemplateRef } from 'vue'
import type { DropdownOption, DataTableProps } from 'naive-ui'
import type { ComponentSize } from '@/types'
import type { import type {
C as CType, C as CType,
PropsComponentPopselectKeys, PropsComponentPopselectKeys,

View File

@ -7,18 +7,15 @@
* 2. * 2.
*/ */
import { NPopover, NFlex, NTree } from 'naive-ui'
import { RIcon } from '@/components' import { RIcon } from '@/components'
import type { AnyFn, MaybeArray } from '@/types'
import { config } from '../shared'
import props from '../props'
import { call } from '@/utils' import { call } from '@/utils'
import { cloneDeep, isEmpty } from 'lodash-es' import { cloneDeep, isEmpty } from 'lodash-es'
import { NFlex, NPopover, NTree } from 'naive-ui'
import type { TreeOption, TreeDropInfo } from 'naive-ui' import type { TreeDropInfo, TreeOption } from 'naive-ui'
import props from '../props'
import { config } from '../shared'
import type { C } from '../types' import type { C } from '../types'
import type { AnyFC } from '@/types'
import type { MaybeArray } from '@/types'
type FixedClick = (type: 'left' | 'right', option: C, index: number) => void type FixedClick = (type: 'left' | 'right', option: C, index: number) => void
@ -34,7 +31,7 @@ const RowIconRender = ({
}: { }: {
icon: string icon: string
title: string title: string
onClick?: AnyFC onClick?: AnyFn
customClassName?: string customClassName?: string
}) => { }) => {
return ( return (

View File

@ -1,8 +1,6 @@
import { RIcon } from '@/components' import { RIcon } from '@/components'
import { config } from '../shared'
import { useFullscreen } from 'vue-hooks-plus' import { useFullscreen } from 'vue-hooks-plus'
import { config } from '../shared'
import type { TableProvider } from '../types' import type { TableProvider } from '../types'
export default defineComponent({ export default defineComponent({

View File

@ -1,9 +1,7 @@
import { RIcon } from '@/components' import { RIcon } from '@/components'
import { config } from '../shared'
import props from '../props'
import { printDom } from '@/utils/dom' import { printDom } from '@/utils/dom'
import props from '../props'
import { config } from '../shared'
import type { TableProvider } from '../types' import type { TableProvider } from '../types'
export default defineComponent({ export default defineComponent({

View File

@ -1,11 +1,9 @@
import { NPopselect } from 'naive-ui'
import { RIcon } from '@/components' import { RIcon } from '@/components'
import { call } from '@/utils'
import { config, propsOptions } from '../shared'
import props from '../props'
import type { MaybeArray } from '@/types' import type { MaybeArray } from '@/types'
import { call } from '@/utils'
import { NPopselect } from 'naive-ui'
import props from '../props'
import { config, propsOptions } from '../shared'
import type { PropsComponentPopselectKeys } from '../types' import type { PropsComponentPopselectKeys } from '../types'
export default defineComponent({ export default defineComponent({

View File

@ -1,13 +1,10 @@
import { NPopselect } from 'naive-ui'
import { RIcon } from '@/components' import { RIcon } from '@/components'
import type { ComponentSize, MaybeArray } from '@/types'
import { call } from '@/utils' import { call } from '@/utils'
import { NPopselect } from 'naive-ui'
import props from '../props' import props from '../props'
import { config } from '../shared' import { config } from '../shared'
import type { ComponentSize } from '@/types'
import type { MaybeArray } from '@/types'
export default defineComponent({ export default defineComponent({
name: 'TableSizeSelect', name: 'TableSizeSelect',
props: { props: {

View File

@ -1,7 +1,6 @@
/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable @typescript-eslint/no-explicit-any */
import { effectDispose } from '@/utils'
import type { Recordable } from '@/types' import type { Recordable } from '@/types'
import { effectDispose } from '@/utils'
import type { MaybeRef } from '@vueuse/core' import type { MaybeRef } from '@vueuse/core'
import type { DataTableColumns, DataTableSelectionColumn } from 'naive-ui' import type { DataTableColumns, DataTableSelectionColumn } from 'naive-ui'

View File

@ -1,16 +1,15 @@
import { printDom } from '@/utils' import { printDom } from '@/utils'
import type { PrintDomOptions } from '@/utils'
import type { import type {
RTableInst, ColumnKey,
CsvOptionsType, CsvOptionsType,
FilterState, FilterState,
RTableInst,
ScrollToOptions, ScrollToOptions,
ColumnKey,
SortOrder, SortOrder,
UseTableRegister,
TableProvider, TableProvider,
UseTableRegister,
} from '../types' } from '../types'
import type { PrintDomOptions } from '@/utils'
/** /**
* *

View File

@ -1,16 +1,14 @@
import type { MaybeArray, Recordable } from '@/types'
import { dataTableProps } from 'naive-ui' import { dataTableProps } from 'naive-ui'
import type { DataTableColumn, DropdownOption } from 'naive-ui'
import type { PropType, VNode } from 'vue' import type { PropType, VNode } from 'vue'
import type { MaybeArray } from '@/types'
import type { DropdownOption, DataTableColumn } from 'naive-ui'
import type { import type {
DownloadCsvTableOptions, DownloadCsvTableOptions,
PrintTableOptions, PrintTableOptions,
RTableInst,
RTableCardProps, RTableCardProps,
RTableInst,
UseTableRegister, UseTableRegister,
} from './types' } from './types'
import type { Recordable } from '@/types'
const props = { const props = {
...dataTableProps, ...dataTableProps,

View File

@ -1,16 +1,16 @@
import type {
DropdownOption,
DropdownGroupOption,
DropdownDividerOption,
DropdownRenderOption,
DataTableInst,
DataTableColumn,
DataTableBaseColumn,
CardProps,
} from 'naive-ui'
import type { VNode, CSSProperties, ShallowRef } from 'vue'
import type { Recordable } from '@/types' import type { Recordable } from '@/types'
import type { PrintDomOptions } from '@/utils/dom' import type { PrintDomOptions } from '@/utils/dom'
import type {
CardProps,
DataTableBaseColumn,
DataTableColumn,
DataTableInst,
DropdownDividerOption,
DropdownGroupOption,
DropdownOption,
DropdownRenderOption,
} from 'naive-ui'
import type { CSSProperties, ShallowRef, VNode } from 'vue'
export interface RTableCardProps extends CardProps { export interface RTableCardProps extends CardProps {
style?: CSSProperties style?: CSSProperties

View File

@ -1,8 +1,7 @@
import RTransitionComponent from './src/TransitionComponent.vue'
import transitionComponentProps from './src/props'
import type * as RTransitionComponentType from './src/types'
import type { ExtractPublicPropTypes } from 'vue' import type { ExtractPublicPropTypes } from 'vue'
import transitionComponentProps from './src/props'
import RTransitionComponent from './src/TransitionComponent.vue'
import type * as RTransitionComponentType from './src/types'
export type TransitionComponentProps = ExtractPublicPropTypes< export type TransitionComponentProps = ExtractPublicPropTypes<
typeof transitionComponentProps typeof transitionComponentProps

Some files were not shown because too many files have changed in this diff Show More