From cda4216493819deb180a0611d746d5d7fd4b6d24 Mon Sep 17 00:00:00 2001
From: XiaoDaiGua-Ray <443547225@qq.com>
Date: Sat, 25 Nov 2023 11:33:59 +0800
Subject: [PATCH] v4.4.0
---
.evnrc | 2 +
.nvmrc | 1 +
CHANGELOG.md | 31 +++++-
README-ZH.md | 2 +-
README.md | 2 +-
package.json | 6 +-
pnpm-lock.yaml | 60 +++++++---
src/App.tsx | 10 +-
src/api/demo/mock/person.ts | 2 +-
src/api/demo/test.ts | 2 +-
.../components/LockScreen/index.tsx | 4 +-
.../components/UnlockScreen/index.tsx | 4 +-
.../app/AppLockScreen/index.tsx | 22 ++--
src/app-components/app/RayLink/index.tsx | 12 +-
src/app-config/localConfig.ts | 10 +-
src/components/RChart/index.ts | 8 ++
src/components/RChart/{ => src}/helper.ts | 2 +-
src/components/RChart/{ => src}/index.scss | 0
src/components/RChart/{ => src}/index.tsx | 6 +-
src/components/RChart/{ => src}/props.ts | 2 +-
src/components/RChart/{ => src}/type.ts | 4 +-
src/components/RCollapseGrid/index.ts | 11 +-
src/components/RCollapseGrid/src/index.tsx | 4 +-
src/components/RForm/index.ts | 5 -
src/components/RForm/src/RForm.tsx | 25 -----
src/components/RForm/src/props.ts | 18 ---
src/components/RIcon/index.ts | 4 +
src/components/RIcon/{ => src}/index.scss | 0
src/components/RIcon/{ => src}/index.tsx | 2 +-
src/components/RIcon/{ => src}/props.ts | 0
src/components/RIframe/index.ts | 12 +-
src/components/RIframe/src/index.tsx | 2 +-
src/components/RModal/index.ts | 4 +
src/components/RModal/src/Modal.tsx | 104 ++++++++++++++++++
src/components/RModal/src/index.scss | 18 +++
src/components/RModal/src/props.ts | 69 ++++++++++++
src/components/RModal/src/utils.ts | 55 +++++++++
src/components/RMoreDropdown/index.ts | 7 +-
src/components/RMoreDropdown/src/index.tsx | 4 +-
src/components/RQRCode/index.ts | 15 ++-
src/components/RQRCode/src/index.tsx | 4 +-
src/components/RTable/index.ts | 10 +-
src/components/RTable/src/Table.tsx | 2 +-
src/components/RTable/src/components/C.tsx | 14 ++-
.../RTable/src/components/Fullscreen.tsx | 2 +-
.../RTable/src/components/Print.tsx | 4 +-
src/components/RTable/src/components/Size.tsx | 6 +-
src/components/RTransitionComponent/index.ts | 8 ++
.../RTransitionComponent/{ => src}/index.vue | 7 +-
.../RTransitionComponent/src/props.ts | 9 ++
.../RTransitionComponent/{ => src}/type.ts | 0
src/components/index.ts | 9 ++
src/error/views/Error404/index.tsx | 2 +-
src/error/views/Error500/index.tsx | 2 +-
src/global-variable/variable.ts | 3 +-
src/hooks/template/useMainPage.ts | 40 ++++++-
src/hooks/template/useMenuTag.ts | 2 +-
src/hooks/template/useRootRoute.ts | 2 +-
src/hooks/web/useDevice.ts | 2 +-
src/hooks/web/useI18n.ts | 2 +-
src/hooks/web/useVueRouter.ts | 2 +-
.../Menu/components/SiderBarLogo/index.tsx | 2 +-
src/layout/components/Menu/index.tsx | 6 +-
src/layout/components/MenuTag/index.tsx | 25 ++---
.../SiderBar/components/Breadcrumb/index.tsx | 2 +-
.../components/GlobalSearch/index.tsx | 4 +-
.../components/ThemeSwitch/index.tsx | 2 +-
.../components/SettingDrawer/index.tsx | 2 +-
.../SiderBar/components/TooltipIcon/index.tsx | 2 +-
src/layout/components/SiderBar/index.tsx | 20 ++--
src/layout/components/SiderBar/shared.ts | 2 +-
src/layout/default/ContentWrapper/index.tsx | 21 ++--
src/layout/default/FeatureWrapper/index.tsx | 2 +-
src/layout/default/HeaderWrapper/index.tsx | 2 +-
src/layout/index.tsx | 2 +-
src/locales/index.ts | 14 ++-
src/locales/lang/en-US/menu.json | 3 +-
src/locales/lang/zh-CN/menu.json | 3 +-
src/main.ts | 10 +-
src/router/README.md | 4 +-
src/router/constant/index.ts | 2 +-
src/router/helper/permission.ts | 2 +-
src/router/helper/routerCopilot.ts | 4 +-
src/router/index.ts | 2 +-
src/router/modules/dashboard.ts | 4 +-
src/router/modules/demo/axios.ts | 4 +-
src/router/modules/demo/directive.ts | 4 +-
src/router/modules/demo/doc.ts | 4 +-
src/router/modules/demo/echart.ts | 4 +-
src/router/modules/demo/iframe.ts | 2 +-
src/router/modules/demo/mock.ts | 4 +-
src/router/modules/demo/modal.ts | 17 +++
src/router/modules/demo/multi-menu.ts | 4 +-
src/router/modules/demo/precision.ts | 4 +-
src/router/modules/demo/qrcode.ts | 4 +-
src/router/modules/demo/rely.ts | 10 +-
src/router/modules/demo/router-demo.ts | 4 +-
src/router/modules/demo/scroll-reveal.ts | 4 +-
src/router/modules/demo/svg-icons.ts | 4 +-
src/router/modules/demo/table.ts | 4 +-
src/router/modules/demo/template-hooks.ts | 4 +-
src/router/modules/error404.ts | 4 +-
src/router/routes.ts | 4 +-
src/spin/index.tsx | 4 +-
src/store/README.md | 2 +-
src/store/hooks/useMenuStore.ts | 2 +-
src/store/index.ts | 12 +-
src/store/modules/menu/helper.ts | 4 +-
src/store/modules/menu/index.ts | 4 +-
src/store/modules/setting/index.ts | 6 +-
src/store/modules/signing/index.ts | 3 +-
src/utils/basic.ts | 24 +++-
src/utils/element.ts | 4 +-
src/views/dashboard/index.tsx | 4 +-
src/views/demo/axios/index.tsx | 2 +-
src/views/demo/doc/index.tsx | 6 +-
src/views/demo/echart/index.tsx | 6 +-
src/views/demo/iframe/index.tsx | 8 +-
src/views/demo/mock-demo/index.tsx | 5 +-
src/views/demo/modal-demo/index.tsx | 87 +++++++++++++++
src/views/demo/qrcode/index.tsx | 26 ++---
.../demo/rely/views/rely-about/index.tsx | 4 +-
.../router-demo/router-demo-home/index.tsx | 4 +-
src/views/demo/svg-icons/index.tsx | 2 +-
src/views/demo/table/index.tsx | 7 +-
src/views/demo/template-hooks/index.tsx | 23 +++-
.../login/components/QRCodeSigning/index.tsx | 4 +-
.../login/components/SSOSigning/index.tsx | 2 +-
src/views/login/components/Signing/index.tsx | 6 +-
src/views/login/index.tsx | 14 +--
unplugin/components.d.ts | 1 +
131 files changed, 845 insertions(+), 345 deletions(-)
create mode 100644 .evnrc
create mode 100644 .nvmrc
mode change 100644 => 100755 package.json
create mode 100644 src/components/RChart/index.ts
rename src/components/RChart/{ => src}/helper.ts (97%)
rename src/components/RChart/{ => src}/index.scss (100%)
rename src/components/RChart/{ => src}/index.tsx (98%)
rename src/components/RChart/{ => src}/props.ts (99%)
rename src/components/RChart/{ => src}/type.ts (95%)
delete mode 100644 src/components/RForm/index.ts
delete mode 100644 src/components/RForm/src/RForm.tsx
delete mode 100644 src/components/RForm/src/props.ts
create mode 100644 src/components/RIcon/index.ts
rename src/components/RIcon/{ => src}/index.scss (100%)
rename src/components/RIcon/{ => src}/index.tsx (97%)
rename src/components/RIcon/{ => src}/props.ts (100%)
create mode 100644 src/components/RModal/index.ts
create mode 100644 src/components/RModal/src/Modal.tsx
create mode 100644 src/components/RModal/src/index.scss
create mode 100644 src/components/RModal/src/props.ts
create mode 100644 src/components/RModal/src/utils.ts
create mode 100644 src/components/RTransitionComponent/index.ts
rename src/components/RTransitionComponent/{ => src}/index.vue (90%)
create mode 100644 src/components/RTransitionComponent/src/props.ts
rename src/components/RTransitionComponent/{ => src}/type.ts (100%)
create mode 100644 src/components/index.ts
create mode 100644 src/router/modules/demo/modal.ts
create mode 100644 src/views/demo/modal-demo/index.tsx
diff --git a/.evnrc b/.evnrc
new file mode 100644
index 00000000..8c543496
--- /dev/null
+++ b/.evnrc
@@ -0,0 +1,2 @@
+layout shell zsh
+layout_fnm
diff --git a/.nvmrc b/.nvmrc
new file mode 100644
index 00000000..68c98aa7
--- /dev/null
+++ b/.nvmrc
@@ -0,0 +1 @@
+v18.18.2
\ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index ec6ff8b0..bcb6dfb6 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,32 @@
# CHANGE LOG
+## 4.4.0
+
+补充了几个组件。并且更改了组件的导入、导出方式,由从前很恶心的一个个导入,变为 `import { RIcon } from '@/components'`。
+
+替换了过时的 `nvm`,使用 `fnm` 替代,并且配置了一些文件让你能够自动切换 `node` 版本,前提是你也装了对应的插件。
+
+由于 `WebStorm` 一直提示可以缩短路径,强迫症患者表示受不了了,就全部改了(可能遗漏)。
+
+升级 `node` 版本至 `18.18.2`。
+
+### Feats
+
+- 新增组件
+ - RModal
+ - width:配置 modal 宽度
+ - cardWidth:配置 preset 为 card 的宽度
+ - dialogWidth:配置 preset 为 dialog 的宽度
+ - fullscreen:配置 preset 为 card 并且配置 fullscreen 为 true 则可以获得全屏效果
+ - dad:启用拖拽效果。仅在 preset 为 card, dialog 时生效(基于 interactjs 实现)
+- 修改 `components` 包组件的导出方式,也修改组件的使用方式
+- 新增 `layoutContentSpinning` 全局属性,用于管理加载动画效果。区别于 `globalMainLayoutLoad` 会强制刷新页面,该属性仅会触发加载动画。并且基于该属性拓展 `openSpin`, `closeSpin` 方法
+
+### Fixes
+
+- 修复国际化切换,由于字段的错误配置导致缓存一直提示 `Fall back to translate` 的问题
+- 修复锁屏不能正常打开、关闭的问题
+
## 4.3.4
更新了 MenuTag 的样式,现在有更加细腻的过渡动画。
@@ -20,7 +47,7 @@
### Fixes
- 修复 `utils/element` 方法不能正确获取 `ref` 绑定 `dom` 的问题
-- 修复设置界面抛出治毒警告问题
+- 修复设置界面抛出只读警告问题
- 修复构建提示循环依赖问题
## 4.3.3
@@ -306,7 +333,7 @@ const demo2 = null
- 默认开启 autoChangeTheme 功能
- 支持配置 throttleWait 节流等待时间,默认 500ms
- 支持通过配置 `desginConfig.echartTheme` 属性指定 `echart theme`。并且只需按照约定方式注册的主题,只需要指定主题名称,即可完成 `light` `dark` 两种主题指定
- - RayChartInst 新增 dispose render 方法,允许手动渲染与卸载 chart 图
+ - RChartInst 新增 dispose render 方法,允许手动渲染与卸载 chart 图
- 新增 animation 属性,如果为 true 则会强制触发渲染过渡动画。该配置受 `options.animation` 属性影响,如果该配置为 false 则不会启用过渡动画
- 移除反转色功能
- 新增图标页面
diff --git a/README-ZH.md b/README-ZH.md
index b0a2346b..1e60110d 100644
--- a/README-ZH.md
+++ b/README-ZH.md
@@ -1,5 +1,5 @@
diff --git a/README.md b/README.md
index aa9c0227..19ceea0b 100644
--- a/README.md
+++ b/README.md
@@ -1,5 +1,5 @@
diff --git a/package.json b/package.json
old mode 100644
new mode 100755
index 1bba92e4..1b889c3b
--- a/package.json
+++ b/package.json
@@ -1,7 +1,7 @@
{
"name": "ray-template",
"private": false,
- "version": "4.3.4",
+ "version": "4.4.0",
"type": "module",
"engines": {
"node": "^18.0.0 || >=20.0.0",
@@ -32,6 +32,7 @@
"currency.js": "^2.0.4",
"dayjs": "^1.11.10",
"echarts": "^5.4.3",
+ "interactjs": "1.10.21",
"lodash-es": "^4.17.21",
"mockjs": "1.1.0",
"naive-ui": "^2.35.0",
@@ -40,7 +41,7 @@
"print-js": "^1.6.0",
"vue": "^3.3.8",
"vue-hooks-plus": "1.8.5",
- "vue-i18n": "^9.7.0",
+ "vue-i18n": "^9.7.1",
"vue-router": "^4.2.4",
"xlsx": "^0.18.5"
},
@@ -49,6 +50,7 @@
"@babel/eslint-parser": "^7.22.11",
"@commitlint/cli": "^17.7.1",
"@commitlint/config-conventional": "^17.7.0",
+ "@interactjs/types": "1.10.21",
"@intlify/unplugin-vue-i18n": "^1.5.0",
"@types/crypto-js": "^4.1.1",
"@types/lodash-es": "^4.17.11",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index da60927c..e9f73f99 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -29,6 +29,9 @@ dependencies:
echarts:
specifier: ^5.4.3
version: 5.4.3
+ interactjs:
+ specifier: 1.10.21
+ version: 1.10.21
lodash-es:
specifier: ^4.17.21
version: 4.17.21
@@ -54,8 +57,8 @@ dependencies:
specifier: 1.8.5
version: 1.8.5(vue@3.3.8)
vue-i18n:
- specifier: ^9.7.0
- version: 9.7.0(vue@3.3.8)
+ specifier: ^9.7.1
+ version: 9.7.1(vue@3.3.8)
vue-router:
specifier: ^4.2.4
version: 4.2.4(vue@3.3.8)
@@ -76,9 +79,12 @@ devDependencies:
'@commitlint/config-conventional':
specifier: ^17.7.0
version: 17.7.0
+ '@interactjs/types':
+ specifier: 1.10.21
+ version: 1.10.21
'@intlify/unplugin-vue-i18n':
specifier: ^1.5.0
- version: 1.5.0(vue-i18n@9.7.0)
+ version: 1.5.0(vue-i18n@9.7.1)
'@types/crypto-js':
specifier: ^4.1.1
version: 4.1.1
@@ -1046,7 +1052,10 @@ packages:
resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==}
dev: true
- /@intlify/bundle-utils@7.4.0(vue-i18n@9.7.0):
+ /@interactjs/types@1.10.21:
+ resolution: {integrity: sha512-U5N3eg9m3rLO9PrQkAaLKsSlCTRxpuMyhPBdMpicPH09icW/kIjLWQcDa3tP/I57zG0yxG6zBFREAcrjyIB3Bw==}
+
+ /@intlify/bundle-utils@7.4.0(vue-i18n@9.7.1):
resolution: {integrity: sha512-AQfjBe2HUxzyN8ignIk3WhhSuVcSuirgzOzkd17nb337rCbI4Gv/t1R60UUyIqFoFdviLb/wLcDUzTD/xXjv9w==}
engines: {node: '>= 14.16'}
peerDependencies:
@@ -1067,16 +1076,16 @@ packages:
magic-string: 0.30.5
mlly: 1.4.1
source-map-js: 1.0.2
- vue-i18n: 9.7.0(vue@3.3.8)
+ vue-i18n: 9.7.1(vue@3.3.8)
yaml-eslint-parser: 1.2.2
dev: true
- /@intlify/core-base@9.7.0:
- resolution: {integrity: sha512-1tBnfnCI23jXqGW15cagCjn2GgD487VST1dMG8P5LRzrSfx+kUzqFyTrjMNIwgq1tVaF4HnDpFMUuyrzTLKphw==}
+ /@intlify/core-base@9.7.1:
+ resolution: {integrity: sha512-jPJTeECEhqQ7g//8g3Fb79j5SzSSRqlFCWD6pcX94uMLXU+L1m07gVZnnvzoJBnaMyJHiiwxOqZVfvu6rQfLvw==}
engines: {node: '>= 16'}
dependencies:
- '@intlify/message-compiler': 9.7.0
- '@intlify/shared': 9.7.0
+ '@intlify/message-compiler': 9.7.1
+ '@intlify/shared': 9.7.1
/@intlify/message-compiler@9.7.0:
resolution: {integrity: sha512-/YdZCio2L2tCM5bZ2eMHbSEIQNPh1QqvZIOLI/yCVKXLscis7O0SsR2nmuU/DfCJ3iSeI8juw82C2wLvfsAeww==}
@@ -1084,12 +1093,25 @@ packages:
dependencies:
'@intlify/shared': 9.7.0
source-map-js: 1.0.2
+ dev: true
+
+ /@intlify/message-compiler@9.7.1:
+ resolution: {integrity: sha512-HfIr2Hn/K7b0Zv4kGqkxAxwtipyxAwhI9a3krN5cuhH/G9gkaik7of1PdzjR3Mix43t2onBiKYQyaU7mo7e0aA==}
+ engines: {node: '>= 16'}
+ dependencies:
+ '@intlify/shared': 9.7.1
+ source-map-js: 1.0.2
/@intlify/shared@9.7.0:
resolution: {integrity: sha512-PUkEuk//YKu4CHS5ah3mNa3XL/+TZj6rAY/6yYN+GCNFd2u+uWUkeuwE4Q6t8dydRWlErOePHHS0KyNoof/oBw==}
engines: {node: '>= 16'}
+ dev: true
- /@intlify/unplugin-vue-i18n@1.5.0(vue-i18n@9.7.0):
+ /@intlify/shared@9.7.1:
+ resolution: {integrity: sha512-CBKnHzlUYGrk5QII9q4nElAQKO5cX1rRx8VmSWXltyOZjbkGHXYQTHULn6KwRi+CypuBCfmPkyPBHMzosypIeg==}
+ engines: {node: '>= 16'}
+
+ /@intlify/unplugin-vue-i18n@1.5.0(vue-i18n@9.7.1):
resolution: {integrity: sha512-jW0MCCdwxybxcwjEfCunAcKjVoxyO3i+cnLL6v+MNGRLUHqrpELF6zQAJUhgAK2afhY7mCliy8RxTFWKdXm26w==}
engines: {node: '>= 14.16'}
peerDependencies:
@@ -1104,7 +1126,7 @@ packages:
vue-i18n-bridge:
optional: true
dependencies:
- '@intlify/bundle-utils': 7.4.0(vue-i18n@9.7.0)
+ '@intlify/bundle-utils': 7.4.0(vue-i18n@9.7.1)
'@intlify/shared': 9.7.0
'@rollup/pluginutils': 5.0.4
'@vue/compiler-sfc': 3.3.8
@@ -1116,7 +1138,7 @@ packages:
picocolors: 1.0.0
source-map-js: 1.0.2
unplugin: 1.4.0
- vue-i18n: 9.7.0(vue@3.3.8)
+ vue-i18n: 9.7.1(vue@3.3.8)
transitivePeerDependencies:
- rollup
- supports-color
@@ -4580,6 +4602,12 @@ packages:
resolution: {integrity: sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==}
dev: true
+ /interactjs@1.10.21:
+ resolution: {integrity: sha512-85GdTHci8W7gFzSPfV26x69LA3Gnl64NbVYDTfw0Jo4rVvH4WAGBNjM5xV2UJwMvusmJLo2XkJDK5k7IsU87bA==}
+ dependencies:
+ '@interactjs/types': 1.10.21
+ dev: false
+
/internal-slot@1.0.5:
resolution: {integrity: sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==}
engines: {node: '>= 0.4'}
@@ -7496,14 +7524,14 @@ packages:
screenfull: 5.2.0
vue: 3.3.8(typescript@5.2.2)
- /vue-i18n@9.7.0(vue@3.3.8):
- resolution: {integrity: sha512-8Z8kSz9U2juzuAf+6mjW1HTd5pIlYuFJZkC+HvYOglFdpzwc2rTUGjxKwN8xGdtGur1MFnyJ44TSr+TksJtY8A==}
+ /vue-i18n@9.7.1(vue@3.3.8):
+ resolution: {integrity: sha512-A6DzWqJQMdzBj+392+g3zIgGV0FnFC7o/V+txs5yIALANEZzY6ZV8hM2wvZR3nTbQI7dntAmzBHMeoEteJO0kQ==}
engines: {node: '>= 16'}
peerDependencies:
vue: ^3.0.0
dependencies:
- '@intlify/core-base': 9.7.0
- '@intlify/shared': 9.7.0
+ '@intlify/core-base': 9.7.1
+ '@intlify/shared': 9.7.1
'@vue/devtools-api': 6.5.1
vue: 3.3.8(typescript@5.2.2)
diff --git a/src/App.tsx b/src/App.tsx
index 0f93d8be..b568cc66 100644
--- a/src/App.tsx
+++ b/src/App.tsx
@@ -1,9 +1,9 @@
import { RouterView } from 'vue-router'
-import AppNaiveGlobalProvider from '@/app-components/provider/AppNaiveGlobalProvider/index'
-import AppStyleProvider from '@/app-components/provider/AppStyleProvider/index'
-import AppLockScreen from '@/app-components/app/AppLockScreen/index'
-import AppWatermarkProvider from '@/app-components/provider/AppWatermarkProvider/index'
-import AppGlobalSpin from '@/spin/index'
+import AppNaiveGlobalProvider from '@/app-components/provider/AppNaiveGlobalProvider'
+import AppStyleProvider from '@/app-components/provider/AppStyleProvider'
+import AppLockScreen from '@/app-components/app/AppLockScreen'
+import AppWatermarkProvider from '@/app-components/provider/AppWatermarkProvider'
+import AppGlobalSpin from '@/spin'
export default defineComponent({
name: 'App',
diff --git a/src/api/demo/mock/person.ts b/src/api/demo/mock/person.ts
index 1ffa9053..d8767b63 100644
--- a/src/api/demo/mock/person.ts
+++ b/src/api/demo/mock/person.ts
@@ -1,4 +1,4 @@
-import { request } from '@/axios/index'
+import { request } from '@/axios'
import type { BasicResponse, PaginationResponse } from '@/types/modules/axios'
diff --git a/src/api/demo/test.ts b/src/api/demo/test.ts
index 1c766b98..0124197a 100644
--- a/src/api/demo/test.ts
+++ b/src/api/demo/test.ts
@@ -19,7 +19,7 @@
* 3. 如果该方法在 setup 环境中使用,则可以使用 useHookPlusRequest 包裹该方法,即可便捷使用该请求函数。如果请求方法在非 setup 环境中使用,直接使用即可
*/
-import { request } from '@/axios/index'
+import { request } from '@/axios'
import type { BasicResponse } from '@/types/modules/axios'
diff --git a/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx b/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx
index 4c27a463..e2517328 100644
--- a/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx
+++ b/src/app-components/app/AppLockScreen/components/LockScreen/index.tsx
@@ -11,8 +11,8 @@
/** 锁屏界面 */
-import { NInput, NForm, NFormItem, NButton, NSpace } from 'naive-ui'
-import AppAvatar from '@/app-components/app/AppAvatar/index'
+import { NInput, NForm, NFormItem, NButton } from 'naive-ui'
+import AppAvatar from '@/app-components/app/AppAvatar'
import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar'
import { rules, useCondition } from '@/app-components/app/AppLockScreen/shared'
diff --git a/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx b/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx
index 8b8efb0e..7054559f 100644
--- a/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx
+++ b/src/app-components/app/AppLockScreen/components/UnlockScreen/index.tsx
@@ -12,13 +12,13 @@
/** 解锁界面 */
import { NInput, NForm, NFormItem, NButton, NSpace } from 'naive-ui'
-import AppAvatar from '@/app-components/app/AppAvatar/index'
+import AppAvatar from '@/app-components/app/AppAvatar'
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 { useDevice } from '@/hooks/web/index'
+import { useDevice } from '@/hooks/web'
import type { FormInst, InputInst } from 'naive-ui'
diff --git a/src/app-components/app/AppLockScreen/index.tsx b/src/app-components/app/AppLockScreen/index.tsx
index b8941f6f..8ec6f788 100644
--- a/src/app-components/app/AppLockScreen/index.tsx
+++ b/src/app-components/app/AppLockScreen/index.tsx
@@ -22,34 +22,42 @@ import LockScreen from './components/LockScreen'
import UnlockScreen from './components/UnlockScreen'
import useAppLockScreen from '@/app-components/app/AppLockScreen/appLockVar'
-import { useSettingGetters } from '@/store'
+import { useSettingGetters, useSettingActions } from '@/store'
const AppLockScreen = defineComponent({
name: 'AppLockScreen',
setup() {
- const { getLockScreenSwitch } = useSettingGetters()
-
const { getLockAppScreen } = useAppLockScreen()
+ const { changeSwitcher } = useSettingActions()
+ const { getLockScreenSwitch } = useSettingGetters()
+ const lockScreenSwitchRef = computed({
+ get: () => getLockScreenSwitch.value,
+ set: (val) => {
+ changeSwitcher(val, 'lockScreenSwitch')
+ },
+ })
return {
- getLockScreenSwitch,
+ lockScreenSwitchRef,
getLockAppScreen,
}
},
render() {
+ const { getLockAppScreen } = this
+
return (
- {!this.getLockAppScreen() ? : }
+ {!getLockAppScreen() ? : }
)
diff --git a/src/app-components/app/RayLink/index.tsx b/src/app-components/app/RayLink/index.tsx
index ca4f1702..0f7f6015 100644
--- a/src/app-components/app/RayLink/index.tsx
+++ b/src/app-components/app/RayLink/index.tsx
@@ -15,37 +15,37 @@ const RayLink = defineComponent({
key: 'yunhome',
src: 'https://yunkuangao.me/',
tooltip: '云之家',
- icon: 'https://usc1.contabostorage.com/c2e495d7890844d392e8ec0c6e5d77eb:image/avatar.jpeg',
+ icon: 'https://r2chevereto.yka.moe/avatar.jpeg',
},
{
key: 'yun-cloud-images',
src: 'https://yunkuangao.com/',
tooltip: '云图床',
- icon: 'https://usc1.contabostorage.com/c2e495d7890844d392e8ec0c6e5d77eb:image/avatar.jpeg',
+ icon: 'https://r2chevereto.yka.moe/avatar.jpeg',
},
{
key: 'ray-js-note',
src: 'https://note.youdao.com/s/ObWEe2BB',
tooltip: 'Ray的前端学习笔记',
- icon: 'https://usc1.contabostorage.com/c2e495d7890844d392e8ec0c6e5d77eb:image/longmao.navigator.png',
+ icon: 'https://r2chevereto.yka.moe/longmao.navigator.png',
},
{
key: 'ray-js-cover',
src: 'https://note.youdao.com/s/IC8xKPdB',
tooltip: 'Ray的面试题总结',
- icon: 'https://usc1.contabostorage.com/c2e495d7890844d392e8ec0c6e5d77eb:image/longmao.navigator.png',
+ icon: 'https://r2chevereto.yka.moe/longmao.navigator.png',
},
{
key: 'ray-template-doc',
src: 'https://xiaodaigua-ray.github.io/ray-template-doc/',
tooltip: 'Ray Template Doc',
- icon: 'https://usc1.contabostorage.com/c2e495d7890844d392e8ec0c6e5d77eb:image/longmao.navigator.png',
+ icon: 'https://r2chevereto.yka.moe/longmao.navigator.png',
},
{
key: 'ray-template-doc-out',
src: 'https://ray-template.yunkuangao.com/',
tooltip: 'Ray Template Doc (国内地址)',
- icon: 'https://usc1.contabostorage.com/c2e495d7890844d392e8ec0c6e5d77eb:image/longmao.navigator.png',
+ icon: 'https://r2chevereto.yka.moe/longmao.navigator.png',
},
]
diff --git a/src/app-config/localConfig.ts b/src/app-config/localConfig.ts
index 9b90d442..4dfcb90a 100644
--- a/src/app-config/localConfig.ts
+++ b/src/app-config/localConfig.ts
@@ -38,12 +38,20 @@ export const LOCAL_OPTIONS: LocalOptions = [
/**
*
- * 系统默认语言
+ * 模板默认语言
*
* 配置时应该与 LOCAL_OPTIONS 的 key 一致
*/
export const SYSTEM_DEFAULT_LOCAL: TemplateLocale = 'zh-CN'
+/**
+ *
+ * 模板默认错误回滚语言
+ *
+ * 配置时应该与 LOCAL_OPTIONS 的 key 一致
+ */
+export const SYSTEM_FALLBACK_LOCALE = 'zh-CN'
+
/**
*
* i18n 国际化配置与 dayjs 配置的映射入口
diff --git a/src/components/RChart/index.ts b/src/components/RChart/index.ts
new file mode 100644
index 00000000..23fd2dda
--- /dev/null
+++ b/src/components/RChart/index.ts
@@ -0,0 +1,8 @@
+import RChart from './src'
+import chartProps from './src/props'
+
+import type * as RChartType from './src/type'
+
+export type { RChartType }
+
+export { RChart, chartProps }
diff --git a/src/components/RChart/helper.ts b/src/components/RChart/src/helper.ts
similarity index 97%
rename from src/components/RChart/helper.ts
rename to src/components/RChart/src/helper.ts
index 4f4ee0ea..da5ce678 100644
--- a/src/components/RChart/helper.ts
+++ b/src/components/RChart/src/helper.ts
@@ -13,7 +13,7 @@ import type {
ChartThemeRawArray,
ChartThemeRawModules,
LoadingOptions,
-} from '@/components/RChart/type'
+} from '@/components/RChart/src/type'
/**
*
diff --git a/src/components/RChart/index.scss b/src/components/RChart/src/index.scss
similarity index 100%
rename from src/components/RChart/index.scss
rename to src/components/RChart/src/index.scss
diff --git a/src/components/RChart/index.tsx b/src/components/RChart/src/index.tsx
similarity index 98%
rename from src/components/RChart/index.tsx
rename to src/components/RChart/src/index.tsx
index 6480f912..fb3054da 100644
--- a/src/components/RChart/index.tsx
+++ b/src/components/RChart/src/index.tsx
@@ -42,12 +42,12 @@ import { NCard } from 'naive-ui'
import props from './props'
import { throttle } from 'lodash-es'
import { completeSize } from '@/utils/element'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import { setupChartTheme } from './helper'
import { APP_THEME } from '@/app-config/designConfig'
import { useResizeObserver } from '@vueuse/core'
-import RMoreDropdown from '@/components/RMoreDropdown/index'
-import { renderNode } from '@use-utils/vue/index'
+import { RMoreDropdown } from '@/components'
+import { renderNode } from '@use-utils/vue'
import { downloadBase64File } from '@use-utils/basic'
import { useSettingGetters } from '@/store'
diff --git a/src/components/RChart/props.ts b/src/components/RChart/src/props.ts
similarity index 99%
rename from src/components/RChart/props.ts
rename to src/components/RChart/src/props.ts
index f5e12aab..a7535180 100644
--- a/src/components/RChart/props.ts
+++ b/src/components/RChart/src/props.ts
@@ -5,7 +5,7 @@ import type {
LoadingOptions,
AutoResize,
ChartTheme,
-} from '@/components/RChart/type'
+} from '@/components/RChart/src/type'
import type { ECharts, SetOptionOpts } from 'echarts/core'
import type { MaybeComputedElementRef, MaybeElement } from '@vueuse/core'
import type {
diff --git a/src/components/RChart/type.ts b/src/components/RChart/src/type.ts
similarity index 95%
rename from src/components/RChart/type.ts
rename to src/components/RChart/src/type.ts
index 71f9aa97..682454b9 100644
--- a/src/components/RChart/type.ts
+++ b/src/components/RChart/src/type.ts
@@ -9,7 +9,7 @@
* @remark 今天也是元气满满撸代码的一天
*/
-import type { ECharts, EChartsCoreOption } from 'echarts/core'
+import type { ECharts } from 'echarts/core'
import type { CanvasRenderer } from 'echarts/renderers' // `echarts` 渲染器
export interface ChartThemeRawModules {
@@ -50,7 +50,7 @@ export type ChartTheme =
| string
| null
-export interface RayChartInst {
+export interface RChartInst {
/**
*
* echart 实例
diff --git a/src/components/RCollapseGrid/index.ts b/src/components/RCollapseGrid/index.ts
index 3827b893..b150dc11 100644
--- a/src/components/RCollapseGrid/index.ts
+++ b/src/components/RCollapseGrid/index.ts
@@ -1,5 +1,8 @@
-import RCollapseGrid from './src/index'
-import props from './src/props'
+import RCollapseGrid from './src'
+import collapseGridProps from './src/props'
-export default RCollapseGrid
-export { props }
+import type * as RCollapseGridType from './src/type'
+
+export type { RCollapseGridType }
+
+export { RCollapseGrid, collapseGridProps }
diff --git a/src/components/RCollapseGrid/src/index.tsx b/src/components/RCollapseGrid/src/index.tsx
index f0d49819..eec92e09 100644
--- a/src/components/RCollapseGrid/src/index.tsx
+++ b/src/components/RCollapseGrid/src/index.tsx
@@ -22,9 +22,9 @@
import './index.scss'
import { NCard, NGrid, NGridItem, NSpace } from 'naive-ui'
-import RIcon from '@/components/RIcon'
+import { RIcon } from '@/components'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import props from './props'
export default defineComponent({
diff --git a/src/components/RForm/index.ts b/src/components/RForm/index.ts
deleted file mode 100644
index aff8fcb6..00000000
--- a/src/components/RForm/index.ts
+++ /dev/null
@@ -1,5 +0,0 @@
-import RForm from './src/RForm'
-import props from './src/props'
-
-export default RForm
-export { props }
diff --git a/src/components/RForm/src/RForm.tsx b/src/components/RForm/src/RForm.tsx
deleted file mode 100644
index 65187728..00000000
--- a/src/components/RForm/src/RForm.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-/**
- *
- * @author Ray
- *
- * @date 2023-11-18
- *
- * @workspace ray-template
- *
- * @remark 今天也是元气满满撸代码的一天
- */
-
-import { NForm } from 'naive-ui'
-
-import props from './props'
-
-export default defineComponent({
- name: 'RForm',
- props,
- setup() {
- return {}
- },
- render() {
- return
- },
-})
diff --git a/src/components/RForm/src/props.ts b/src/components/RForm/src/props.ts
deleted file mode 100644
index 26851747..00000000
--- a/src/components/RForm/src/props.ts
+++ /dev/null
@@ -1,18 +0,0 @@
-/**
- *
- * @author Ray
- *
- * @date 2023-11-18
- *
- * @workspace ray-template
- *
- * @remark 今天也是元气满满撸代码的一天
- */
-
-import { formProps } from 'naive-ui'
-
-const props = {
- ...formProps,
-}
-
-export default props
diff --git a/src/components/RIcon/index.ts b/src/components/RIcon/index.ts
new file mode 100644
index 00000000..ba5914b0
--- /dev/null
+++ b/src/components/RIcon/index.ts
@@ -0,0 +1,4 @@
+import RIcon from './src'
+import iconProps from './src/props'
+
+export { RIcon, iconProps }
diff --git a/src/components/RIcon/index.scss b/src/components/RIcon/src/index.scss
similarity index 100%
rename from src/components/RIcon/index.scss
rename to src/components/RIcon/src/index.scss
diff --git a/src/components/RIcon/index.tsx b/src/components/RIcon/src/index.tsx
similarity index 97%
rename from src/components/RIcon/index.tsx
rename to src/components/RIcon/src/index.tsx
index 2695052b..d82b3c61 100644
--- a/src/components/RIcon/index.tsx
+++ b/src/components/RIcon/src/index.tsx
@@ -11,7 +11,7 @@
import './index.scss'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import { completeSize } from '@/utils/element'
import props from './props'
diff --git a/src/components/RIcon/props.ts b/src/components/RIcon/src/props.ts
similarity index 100%
rename from src/components/RIcon/props.ts
rename to src/components/RIcon/src/props.ts
diff --git a/src/components/RIframe/index.ts b/src/components/RIframe/index.ts
index 69e0e1eb..00a0f9ed 100644
--- a/src/components/RIframe/index.ts
+++ b/src/components/RIframe/index.ts
@@ -1,8 +1,8 @@
-import RIframe from './src/index'
-import props from './src/props'
+import RIframe from './src'
+import iframeProps from './src/props'
-import type { RIframeInst } from './src/type'
+import type * as RIframeType from './src/type'
-export default RIframe
-export { props }
-export type { RIframeInst }
+export type { RIframeType }
+
+export { RIframe, iframeProps }
diff --git a/src/components/RIframe/src/index.tsx b/src/components/RIframe/src/index.tsx
index 8f527861..57dcd8b1 100644
--- a/src/components/RIframe/src/index.tsx
+++ b/src/components/RIframe/src/index.tsx
@@ -14,7 +14,7 @@ import './index.scss'
import { NSpin } from 'naive-ui'
import { completeSize, on, off } from '@use-utils/element'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import props from './props'
export default defineComponent({
diff --git a/src/components/RModal/index.ts b/src/components/RModal/index.ts
new file mode 100644
index 00000000..9be5f628
--- /dev/null
+++ b/src/components/RModal/index.ts
@@ -0,0 +1,4 @@
+import RModal from './src/Modal'
+import modalProps from './src/props'
+
+export { RModal, modalProps }
diff --git a/src/components/RModal/src/Modal.tsx b/src/components/RModal/src/Modal.tsx
new file mode 100644
index 00000000..f5e3053c
--- /dev/null
+++ b/src/components/RModal/src/Modal.tsx
@@ -0,0 +1,104 @@
+/**
+ *
+ * @author Ray
+ *
+ * @date 2023-11-22
+ *
+ * @workspace ray-template
+ *
+ * @remark 今天也是元气满满撸代码的一天
+ */
+
+import './index.scss'
+
+import { NModal } from 'naive-ui'
+
+import props from './props'
+import { completeSize } from '@/utils/element'
+import { useWindowSize } from '@vueuse/core'
+import { uuid } from '@/utils/basic'
+import { setupDraggable } from './utils'
+
+import type interact from 'interactjs'
+
+export default defineComponent({
+ name: 'RModal',
+ props,
+ setup(props) {
+ const { height } = useWindowSize()
+ const cssVars = computed(() => ({
+ '--r-modal-width': completeSize(props.width ?? 600),
+ '--r-modal-card-width': completeSize(props.cardWidth ?? 600),
+ '--r-modal-dialog-width': completeSize(props.dialogWidth ?? 446),
+ }))
+ const uuidEl = uuid()
+ let intractable: null | ReturnType
+
+ /**
+ *
+ * 获取当前是否为 card 风格并且为全屏
+ */
+ const isFullscreenCardType = () =>
+ props.preset === 'card' && props.fullscreen
+
+ const setupInteract = () => {
+ const target = document.getElementById(uuidEl)
+
+ if (target) {
+ setupDraggable(target, props.preset).then((res) => {
+ intractable = res
+ })
+ }
+ }
+
+ watch(
+ () => props.show,
+ (ndata) => {
+ if (
+ ndata &&
+ props.dad &&
+ (props.preset === 'card' || props.preset === 'dialog')
+ ) {
+ nextTick(() => {
+ setupInteract()
+ })
+ } else {
+ intractable?.unset()
+
+ intractable = null
+ }
+ },
+ )
+
+ return {
+ cssVars,
+ height,
+ isFullscreenCardType,
+ uuidEl,
+ }
+ },
+ render() {
+ const { isFullscreenCardType } = this
+ const { $props, $slots, $attrs } = this
+ const { preset, ...$otherProps } = $props
+ const { cssVars, height, uuidEl } = this
+
+ return (
+
+ {{ ...$slots }}
+
+ )
+ },
+})
diff --git a/src/components/RModal/src/index.scss b/src/components/RModal/src/index.scss
new file mode 100644
index 00000000..3f2143ff
--- /dev/null
+++ b/src/components/RModal/src/index.scss
@@ -0,0 +1,18 @@
+.r-modal.n-card.r-modal__preset-card--fullscreen {
+ width: 100%;
+
+ // 当设置全屏时,启用滚动
+ & .n-card__content {
+ overflow: scroll;
+ }
+}
+
+.r-modal {
+ &.n-card {
+ width: var(--r-modal-card-width);
+ }
+
+ &.n-dialog {
+ width: var(--r-modal-dialog-width);
+ }
+}
diff --git a/src/components/RModal/src/props.ts b/src/components/RModal/src/props.ts
new file mode 100644
index 00000000..0e922828
--- /dev/null
+++ b/src/components/RModal/src/props.ts
@@ -0,0 +1,69 @@
+/**
+ *
+ * @author Ray
+ *
+ * @date 2023-11-22
+ *
+ * @workspace ray-template
+ *
+ * @remark 今天也是元气满满撸代码的一天
+ */
+
+import { modalProps } from 'naive-ui'
+
+const props = {
+ ...modalProps,
+ /**
+ *
+ * 是否全屏
+ *
+ * @default false
+ */
+ fullscreen: {
+ type: Boolean,
+ default: false,
+ },
+ width: {
+ /**
+ *
+ * preset 空时宽度设置
+ *
+ * @default 600
+ */
+ type: [String, Number],
+ default: 600,
+ },
+ cardWidth: {
+ /**
+ *
+ * preset 为 card 时宽度设置
+ *
+ * @default 600
+ */
+ type: [String, Number],
+ default: 600,
+ },
+ dialogWidth: {
+ /**
+ *
+ * preset 为 dialog 时宽度设置
+ *
+ * @default 446
+ */
+ type: [String, Number],
+ default: 446,
+ },
+ dad: {
+ /**
+ *
+ * 是否启用拖拽
+ * 当启用拖拽时,可以通过拖拽 header 部分控制模态框
+ *
+ * @default false
+ */
+ type: Boolean,
+ default: false,
+ },
+}
+
+export default props
diff --git a/src/components/RModal/src/utils.ts b/src/components/RModal/src/utils.ts
new file mode 100644
index 00000000..345ccb9e
--- /dev/null
+++ b/src/components/RModal/src/utils.ts
@@ -0,0 +1,55 @@
+import interact from 'interactjs'
+
+import type { ModalProps } from 'naive-ui'
+
+/**
+ *
+ * @param bindModal modal 预设元素
+ * @param preset 预设类型
+ *
+ * 根据预设模态框设置拖拽效果
+ * 但是该效果有且仅有 card, dialog 有效
+ */
+export const setupDraggable = (
+ bindModal: HTMLElement,
+ preset: ModalProps['preset'],
+): Promise> => {
+ return new Promise((resolve) => {
+ setTimeout(() => {
+ const allowFromStr =
+ preset === 'card' ? '.n-card-header__main' : '.n-dialog__title'
+
+ if (bindModal) {
+ const dad = interact(bindModal)
+ .draggable({
+ inertia: true,
+ autoScroll: true,
+ allowFrom: allowFromStr,
+ modifiers: [
+ interact.modifiers.restrictRect({
+ restriction: 'parent',
+ endOnly: true,
+ }),
+ ],
+ listeners: {
+ move: (event) => {
+ const target = event.target
+ const x =
+ (parseFloat(target.getAttribute('data-x')) || 0) + event.dx
+ const y =
+ (parseFloat(target.getAttribute('data-y')) || 0) + event.dy
+
+ target.style.transform = 'translate(' + x + 'px, ' + y + 'px)'
+
+ target.setAttribute('data-x', x)
+ target.setAttribute('data-y', y)
+ },
+ },
+ })
+ .resizable(false)
+
+ resolve(dad)
+ }
+ }, 30)
+ })
+}
diff --git a/src/components/RMoreDropdown/index.ts b/src/components/RMoreDropdown/index.ts
index d7c8a501..a576d150 100644
--- a/src/components/RMoreDropdown/index.ts
+++ b/src/components/RMoreDropdown/index.ts
@@ -1,5 +1,4 @@
-import RMoreDropdown from './src/index'
-import props from './src/props'
+import RMoreDropdown from './src'
+import moreDropdownProps from './src/props'
-export default RMoreDropdown
-export { props }
+export { RMoreDropdown, moreDropdownProps }
diff --git a/src/components/RMoreDropdown/src/index.tsx b/src/components/RMoreDropdown/src/index.tsx
index 444a8b9c..5f7b972a 100644
--- a/src/components/RMoreDropdown/src/index.tsx
+++ b/src/components/RMoreDropdown/src/index.tsx
@@ -10,10 +10,10 @@
*/
import { NDropdown } from 'naive-ui'
-import RIcon from '@/components/RIcon/index'
+import { RIcon } from '@/components'
import props from './props'
-import { renderNode } from '@use-utils/vue/index'
+import { renderNode } from '@use-utils/vue'
export default defineComponent({
name: 'RMoreDropdown',
diff --git a/src/components/RQRCode/index.ts b/src/components/RQRCode/index.ts
index 6002f700..329d23d9 100644
--- a/src/components/RQRCode/index.ts
+++ b/src/components/RQRCode/index.ts
@@ -1,9 +1,8 @@
-import RayQRcode from './src/index'
+import RQRCode from './src'
+import qrcodeProps from './src/props'
-export default RayQRcode
-export type {
- QRCodeStatus,
- QRCodeLevel,
- QRCodeRenderResponse,
- QRCodeInst,
-} from './src/type'
+import type * as RQRCodeType from './src/type'
+
+export type { RQRCodeType }
+
+export { RQRCode, qrcodeProps }
diff --git a/src/components/RQRCode/src/index.tsx b/src/components/RQRCode/src/index.tsx
index aae7f18b..4023b6cd 100644
--- a/src/components/RQRCode/src/index.tsx
+++ b/src/components/RQRCode/src/index.tsx
@@ -12,12 +12,12 @@
import './index.scss'
import { NButton, NSpin } from 'naive-ui'
-import RIcon from '@/components/RIcon/index'
+import { RIcon } from '@/components'
import props from './props'
import { AwesomeQR } from 'awesome-qr'
import { isValueType, downloadAnyFile } from '@/utils/basic'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import type {
QRCodeRenderResponse,
diff --git a/src/components/RTable/index.ts b/src/components/RTable/index.ts
index 49ec1744..df689d60 100644
--- a/src/components/RTable/index.ts
+++ b/src/components/RTable/index.ts
@@ -1,6 +1,8 @@
import RTable from './src/Table'
-import props from './src/props'
+import tableProps from './src/props'
-export default RTable
-export { props }
-export type { TableInst } from './src/type'
+import type * as RTableType from './src/type'
+
+export type { RTableType }
+
+export { RTable, tableProps }
diff --git a/src/components/RTable/src/Table.tsx b/src/components/RTable/src/Table.tsx
index 6d619ab2..febb0d29 100644
--- a/src/components/RTable/src/Table.tsx
+++ b/src/components/RTable/src/Table.tsx
@@ -18,7 +18,7 @@ import C from './components/C'
import Print from './components/Print'
import props from './props'
-import { call, renderNode } from '@/utils/vue/index'
+import { call, renderNode } from '@/utils/vue'
import { uuid } from '@/utils/basic'
import config from './config'
diff --git a/src/components/RTable/src/components/C.tsx b/src/components/RTable/src/components/C.tsx
index 0957d318..2cac9c2e 100644
--- a/src/components/RTable/src/components/C.tsx
+++ b/src/components/RTable/src/components/C.tsx
@@ -9,13 +9,21 @@
* @remark 今天也是元气满满撸代码的一天
*/
+/**
+ *
+ * 自定义表格列的顺序
+ *
+ * 但是该方法有几个缺陷地方:
+ * 1. 只能代理第一层的数据,也就意味着深层次的子列不支持配置操作,只会跟随根列更新
+ * 2. 大量数据的时候,可能会出现性能问题
+ */
+
import { NPopover, NSpace, NTree } from 'naive-ui'
-import RIcon from '@/components/RIcon/index'
+import { RIcon } from '@/components'
import config from '../config'
import props from '../props'
-import { h } from 'vue'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import type { TreeOption, TreeDropInfo } from 'naive-ui'
import type { C } from '../type'
diff --git a/src/components/RTable/src/components/Fullscreen.tsx b/src/components/RTable/src/components/Fullscreen.tsx
index fe6bb31d..3c829cf9 100644
--- a/src/components/RTable/src/components/Fullscreen.tsx
+++ b/src/components/RTable/src/components/Fullscreen.tsx
@@ -10,7 +10,7 @@
*/
import { NPopover } from 'naive-ui'
-import RIcon from '@/components/RIcon/index'
+import { RIcon } from '@/components'
import config from '../config'
import { useFullscreen } from 'vue-hooks-plus'
diff --git a/src/components/RTable/src/components/Print.tsx b/src/components/RTable/src/components/Print.tsx
index 89ec9ef5..c7d0f5a0 100644
--- a/src/components/RTable/src/components/Print.tsx
+++ b/src/components/RTable/src/components/Print.tsx
@@ -10,7 +10,7 @@
*/
import { NPopover } from 'naive-ui'
-import RIcon from '@/components/RIcon/index'
+import { RIcon } from '@/components'
import config from '../config'
import props from '../props'
@@ -19,7 +19,7 @@ import { print } from '@/utils/basic'
import type { TableProvider } from '../type'
export default defineComponent({
- name: 'PrintTable',
+ name: 'TablePrint',
props,
setup(props) {
const { uuidTable } = inject(
diff --git a/src/components/RTable/src/components/Size.tsx b/src/components/RTable/src/components/Size.tsx
index c05891c7..76688ccd 100644
--- a/src/components/RTable/src/components/Size.tsx
+++ b/src/components/RTable/src/components/Size.tsx
@@ -9,10 +9,10 @@
* @remark 今天也是元气满满撸代码的一天
*/
-import { NPopover, NCard, NPopselect } from 'naive-ui'
-import RIcon from '@/components/RIcon/index'
+import { NPopover, NPopselect } from 'naive-ui'
+import { RIcon } from '@/components'
-import { call } from '@/utils/vue/index'
+import { call } from '@/utils/vue'
import props from '../props'
import config from '../config'
diff --git a/src/components/RTransitionComponent/index.ts b/src/components/RTransitionComponent/index.ts
new file mode 100644
index 00000000..214a2e73
--- /dev/null
+++ b/src/components/RTransitionComponent/index.ts
@@ -0,0 +1,8 @@
+import RTransitionComponent from './src/index.vue'
+import transitionComponentProps from './src/props'
+
+import type * as RTransitionComponentType from './src/type'
+
+export type { RTransitionComponentType }
+
+export { RTransitionComponent, transitionComponentProps }
diff --git a/src/components/RTransitionComponent/index.vue b/src/components/RTransitionComponent/src/index.vue
similarity index 90%
rename from src/components/RTransitionComponent/index.vue
rename to src/components/RTransitionComponent/src/index.vue
index 1d85f681..9f1c9b30 100644
--- a/src/components/RTransitionComponent/index.vue
+++ b/src/components/RTransitionComponent/src/index.vue
@@ -25,6 +25,7 @@