mirror of
https://github.com/XiaoDaiGua-Ray/ray-template.git
synced 2025-05-19 02:09:17 +08:00
version: 5.1.0 发布
This commit is contained in:
parent
eb5a6aa9e2
commit
5e9ffb14a3
@ -2,14 +2,11 @@
|
|||||||
|
|
||||||
## Feats
|
## Feats
|
||||||
|
|
||||||
- 主流依赖更新
|
- 更新 `vite` 版本至 `5.3.3`
|
||||||
- `RDraggableCard` 组件 `defaultPosition` 配置项新增 `center`, `top-center`, `bottom-center` 配置项,并且该配置项支持动态更新了
|
|
||||||
- `RDraggableCard` 组件容器 `id` 由 `draggable-card-container` 变更为 `r-draggable-card-container`
|
|
||||||
- `views/demo` 包命名调整
|
|
||||||
|
|
||||||
## Fixes
|
## Fixes
|
||||||
|
|
||||||
- 修复 `RDraggableCard` 组件设置 `dad` 为 `false` 时,初始化位置错误的问题
|
- 修复 `chunksCopilot` 方法判断不准确导致 `node_modules` 库被拆分到 `hooks` 分包重复的问题
|
||||||
|
|
||||||
## 5.0.10
|
## 5.0.10
|
||||||
|
|
||||||
|
@ -97,7 +97,7 @@
|
|||||||
"typescript": "5.6.3",
|
"typescript": "5.6.3",
|
||||||
"unplugin-auto-import": "19.0.0",
|
"unplugin-auto-import": "19.0.0",
|
||||||
"unplugin-vue-components": "0.28.0",
|
"unplugin-vue-components": "0.28.0",
|
||||||
"vite": "6.1.0",
|
"vite": "6.3.3",
|
||||||
"vite-bundle-analyzer": "0.16.0",
|
"vite-bundle-analyzer": "0.16.0",
|
||||||
"vite-plugin-cdn2": "1.1.0",
|
"vite-plugin-cdn2": "1.1.0",
|
||||||
"vite-plugin-ejs": "1.7.0",
|
"vite-plugin-ejs": "1.7.0",
|
||||||
|
763
pnpm-lock.yaml
generated
763
pnpm-lock.yaml
generated
File diff suppressed because it is too large
Load Diff
@ -3,8 +3,6 @@ import { RCollapseGrid, RForm } from '@/components'
|
|||||||
import formProps from '../../base/RForm/src/props'
|
import formProps from '../../base/RForm/src/props'
|
||||||
import collapseGridProps from '../../base/RCollapseGrid/src/props'
|
import collapseGridProps from '../../base/RCollapseGrid/src/props'
|
||||||
|
|
||||||
import type { FormProps, GridProps } from 'naive-ui'
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @description
|
* @description
|
||||||
@ -30,8 +28,7 @@ export default defineComponent({
|
|||||||
}),
|
}),
|
||||||
render() {
|
render() {
|
||||||
const { $slots, $props } = this
|
const { $slots, $props } = this
|
||||||
const { labelPlacement, showFeedback, ...rest } = $props as FormProps &
|
const { labelPlacement, showFeedback, ...rest } = $props
|
||||||
GridProps
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RForm {...rest} labelPlacement="top" showFeedback={false}>
|
<RForm {...rest} labelPlacement="top" showFeedback={false}>
|
||||||
|
@ -154,9 +154,7 @@ export default defineComponent({
|
|||||||
},
|
},
|
||||||
render() {
|
render() {
|
||||||
const { register, $props, paginationRef, $slots } = this
|
const { register, $props, paginationRef, $slots } = this
|
||||||
const { onRegister, showPagination, ...rest } = $props as ExtractPropTypes<
|
const { onRegister, showPagination, ...rest } = $props
|
||||||
typeof props
|
|
||||||
>
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<RTable
|
<RTable
|
||||||
|
25
vite-helper/chunks-copilot.ts
Normal file
25
vite-helper/chunks-copilot.ts
Normal 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,
|
||||||
|
}
|
||||||
|
}
|
@ -2,5 +2,6 @@ import { htmlTitlePlugin } from './html-title-plugin'
|
|||||||
import { mixinCss } from './mixin-css'
|
import { mixinCss } from './mixin-css'
|
||||||
import { cdnResolve } from './cdn-resolve'
|
import { cdnResolve } from './cdn-resolve'
|
||||||
import { svgIconResolve } from './svg-icon-resolve'
|
import { svgIconResolve } from './svg-icon-resolve'
|
||||||
|
import { chunksCopilot } from './chunks-copilot'
|
||||||
|
|
||||||
export { htmlTitlePlugin, mixinCss, cdnResolve, svgIconResolve }
|
export { htmlTitlePlugin, mixinCss, cdnResolve, svgIconResolve, chunksCopilot }
|
||||||
|
@ -3,6 +3,7 @@ import { defineConfig } from 'vite'
|
|||||||
import config from './vite.custom.config'
|
import config from './vite.custom.config'
|
||||||
import pkg from './package.json'
|
import pkg from './package.json'
|
||||||
import vitePlugins from './vite.plugin.config'
|
import vitePlugins from './vite.plugin.config'
|
||||||
|
import { chunksCopilot } from './vite-helper'
|
||||||
|
|
||||||
// https://vitejs.dev/config/
|
// https://vitejs.dev/config/
|
||||||
export default defineConfig(({ mode }) => {
|
export default defineConfig(({ mode }) => {
|
||||||
@ -70,9 +71,7 @@ export default defineConfig(({ mode }) => {
|
|||||||
rollupOptions: {
|
rollupOptions: {
|
||||||
output: {
|
output: {
|
||||||
manualChunks: (id) => {
|
manualChunks: (id) => {
|
||||||
const isUtils = () => id.includes('src/utils/')
|
const { isUtils, isHooks, isNodeModules } = chunksCopilot(id)
|
||||||
const isHooks = () => id.includes('src/hooks/')
|
|
||||||
const isNodeModules = () => id.includes('node_modules')
|
|
||||||
const index = id.includes('pnpm') ? 1 : 0 // 兼容 pnpm, yarn, npm 包管理器差异
|
const index = id.includes('pnpm') ? 1 : 0 // 兼容 pnpm, yarn, npm 包管理器差异
|
||||||
|
|
||||||
if (isUtils()) {
|
if (isUtils()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user