version: 5.1.0 发布

This commit is contained in:
XiaoDaiGua-Ray 2025-04-29 21:20:54 +08:00
parent eb5a6aa9e2
commit 5e9ffb14a3
8 changed files with 534 additions and 280 deletions

View File

@ -2,14 +2,11 @@
## Feats
- 主流依赖更新
- `RDraggableCard` 组件 `defaultPosition` 配置项新增 `center`, `top-center`, `bottom-center` 配置项,并且该配置项支持动态更新了
- `RDraggableCard` 组件容器 `id``draggable-card-container` 变更为 `r-draggable-card-container`
- `views/demo` 包命名调整
- 更新 `vite` 版本至 `5.3.3`
## Fixes
- 修复 `RDraggableCard` 组件设置 `dad``false` 时,初始化位置错误的问题
- 修复 `chunksCopilot` 方法判断不准确导致 `node_modules` 库被拆分到 `hooks` 分包重复的问题
## 5.0.10

View File

@ -97,7 +97,7 @@
"typescript": "5.6.3",
"unplugin-auto-import": "19.0.0",
"unplugin-vue-components": "0.28.0",
"vite": "6.1.0",
"vite": "6.3.3",
"vite-bundle-analyzer": "0.16.0",
"vite-plugin-cdn2": "1.1.0",
"vite-plugin-ejs": "1.7.0",

763
pnpm-lock.yaml generated

File diff suppressed because it is too large Load Diff

View File

@ -3,8 +3,6 @@ import { RCollapseGrid, RForm } from '@/components'
import formProps from '../../base/RForm/src/props'
import collapseGridProps from '../../base/RCollapseGrid/src/props'
import type { FormProps, GridProps } from 'naive-ui'
/**
*
* @description
@ -30,8 +28,7 @@ export default defineComponent({
}),
render() {
const { $slots, $props } = this
const { labelPlacement, showFeedback, ...rest } = $props as FormProps &
GridProps
const { labelPlacement, showFeedback, ...rest } = $props
return (
<RForm {...rest} labelPlacement="top" showFeedback={false}>

View File

@ -154,9 +154,7 @@ export default defineComponent({
},
render() {
const { register, $props, paginationRef, $slots } = this
const { onRegister, showPagination, ...rest } = $props as ExtractPropTypes<
typeof props
>
const { onRegister, showPagination, ...rest } = $props
return (
<RTable

View File

@ -0,0 +1,25 @@
export const chunksCopilot = (id: string) => {
const utilsLibOptions = ['src/utils']
const hooksLibOptions = [
'src/hooks/components',
'src/hooks/template',
'src/hooks/web',
]
const nodeModulesOptions = ['node_modules']
// 是否为模板工程下的 utils 库
const isUtils = () => utilsLibOptions.some((option) => id.includes(option))
// 是否为模板工程下的 hooks 库,不包含 node_modules 库
const isHooks = () =>
hooksLibOptions.some((option) => id.includes(option)) &&
!nodeModulesOptions.some((option) => id.includes(option))
// 是否为 node_modules 库
const isNodeModules = () =>
nodeModulesOptions.some((option) => id.includes(option))
return {
isUtils,
isHooks,
isNodeModules,
}
}

View File

@ -2,5 +2,6 @@ import { htmlTitlePlugin } from './html-title-plugin'
import { mixinCss } from './mixin-css'
import { cdnResolve } from './cdn-resolve'
import { svgIconResolve } from './svg-icon-resolve'
import { chunksCopilot } from './chunks-copilot'
export { htmlTitlePlugin, mixinCss, cdnResolve, svgIconResolve }
export { htmlTitlePlugin, mixinCss, cdnResolve, svgIconResolve, chunksCopilot }

View File

@ -3,6 +3,7 @@ import { defineConfig } from 'vite'
import config from './vite.custom.config'
import pkg from './package.json'
import vitePlugins from './vite.plugin.config'
import { chunksCopilot } from './vite-helper'
// https://vitejs.dev/config/
export default defineConfig(({ mode }) => {
@ -70,9 +71,7 @@ export default defineConfig(({ mode }) => {
rollupOptions: {
output: {
manualChunks: (id) => {
const isUtils = () => id.includes('src/utils/')
const isHooks = () => id.includes('src/hooks/')
const isNodeModules = () => id.includes('node_modules')
const { isUtils, isHooks, isNodeModules } = chunksCopilot(id)
const index = id.includes('pnpm') ? 1 : 0 // 兼容 pnpm, yarn, npm 包管理器差异
if (isUtils()) {