Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
monorepo
/
venus
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
1
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 9cf05739
authored
Nov 09, 2024
by
Vben
Committed by
GitHub
Nov 09, 2024
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
perf: optimize local startup speed and add header Class configuration to drawer (#4840)
1 parent
da7d61b1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
45 additions
and
47 deletions
docs/.vitepress/config/shared.mts
internal/vite-config/src/config/application.ts
internal/vite-config/src/plugins/vxe-table.ts
packages/@core/ui-kit/popup-ui/src/drawer/drawer.ts
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
pnpm-lock.yaml
pnpm-workspace.yaml
docs/.vitepress/config/shared.mts
View file @
9cf0573
...
...
@@ -62,6 +62,11 @@ export const shared = defineConfig({
postcssIsolateStyles({ includeFiles: [/vp-doc\.css/] }),
],
},
preprocessorOptions: {
scss: {
api: 'modern',
},
},
},
json: {
stringify: true,
...
...
@@ -97,6 +102,7 @@ export const shared = defineConfig({
host: true,
port: 6173,
},
ssr: {
external: ['@vue/repl'],
},
...
...
internal/vite-config/src/config/application.ts
View file @
9cf0573
...
...
@@ -6,6 +6,7 @@ import path, { relative } from 'node:path';
import
{
findMonorepoRoot
}
from
'@vben/node-utils'
;
import
{
NodePackageImporter
}
from
'sass'
;
import
{
defineConfig
,
loadEnv
,
mergeConfig
}
from
'vite'
;
import
{
defaultImportmapOptions
,
getDefaultPwaOptions
}
from
'../options'
;
...
...
@@ -85,7 +86,7 @@ function defineApplicationConfig(userConfigPromise?: DefineApplicationOptions) {
clientFiles
:
[
'./index.html'
,
'./src/bootstrap.ts'
,
'./src/{views,layouts,router,store,api}/*'
,
'./src/{views,layouts,router,store,api
,adapter
}/*'
,
],
},
},
...
...
@@ -113,7 +114,8 @@ function createCssOptions(injectGlobalScss = true) {
}
return
content
;
},
api
:
'modern-compiler'
,
api
:
'modern'
,
importers
:
[
new
NodePackageImporter
()],
},
}
:
{},
...
...
internal/vite-config/src/plugins/vxe-table.ts
View file @
9cf0573
...
...
@@ -4,35 +4,6 @@ import { lazyImport, VxeResolver } from 'vite-plugin-lazy-import';
async
function
viteVxeTableImportsPlugin
():
Promise
<
PluginOption
>
{
return
[
// {
// config() {
// return {
// optimizeDeps: {
// include: [
// 'vxe-pc-ui/es/vxe-button/index.js',
// 'vxe-pc-ui/es/vxe-checkbox/index.js',
// 'vxe-pc-ui/es/vxe-icon/index.js',
// 'vxe-pc-ui/es/vxe-input/index.js',
// 'vxe-pc-ui/es/vxe-loading/index.js',
// 'vxe-pc-ui/es/vxe-modal/index.js',
// 'vxe-pc-ui/es/vxe-pager/index.js',
// 'vxe-pc-ui/es/vxe-radio-group/index.js',
// 'vxe-pc-ui/es/vxe-select/index.js',
// 'vxe-pc-ui/es/vxe-tooltip/index.js',
// 'vxe-pc-ui/es/vxe-ui/index.js',
// 'vxe-pc-ui/es/vxe-upload/index.js',
// 'vxe-table/es/vxe-colgroup/index.js',
// 'vxe-table/es/vxe-column/index.js',
// 'vxe-table/es/vxe-grid/index.js',
// 'vxe-table/es/vxe-table/index.js',
// 'vxe-table/es/vxe-toolbar/index.js',
// 'vxe-table/es/vxe-ui/index.js',
// ],
// },
// };
// },
// name: 'vxe-table-adapter',
// },
lazyImport
({
resolvers
:
[
VxeResolver
({
...
...
packages/@core/ui-kit/popup-ui/src/drawer/drawer.ts
View file @
9cf0573
...
...
@@ -7,7 +7,7 @@ export interface DrawerProps {
* 取消按钮文字
*/
cancelText
?:
string
;
class
?:
string
;
class
?:
any
;
/**
* 是否显示右上角的关闭按钮
* @default true
...
...
@@ -43,6 +43,14 @@ export interface DrawerProps {
*/
footer
?:
boolean
;
/**
* 弹窗底部样式
*/
footerClass
?:
any
;
/**
* 弹窗头部样式
*/
headerClass
?:
any
;
/**
* 弹窗是否显示
* @default false
*/
...
...
packages/@core/ui-kit/popup-ui/src/drawer/drawer.vue
View file @
9cf0573
...
...
@@ -56,6 +56,8 @@ const {
contentClass
,
description
,
footer
:
showFooter
,
footerClass
,
headerClass
,
loading
:
showLoading
,
modal
,
openAutoFocus
,
...
...
@@ -130,9 +132,13 @@ function handleFocusOutside(e: Event) {
>
<SheetHeader
:class=
"
cn('!flex flex-row items-center justify-between border-b px-6 py-5',
{
'px-4 py-3': closable,
})
cn(
'!flex flex-row items-center justify-between border-b px-6 py-5',
headerClass,
{
'px-4 py-3': closable,
},
)
"
>
<div>
...
...
@@ -186,7 +192,12 @@ function handleFocusOutside(e: Event) {
<SheetFooter
v-if=
"showFooter"
class=
"w-full flex-row items-center justify-end border-t p-2 px-3"
:class=
"
cn(
'w-full flex-row items-center justify-end border-t p-2 px-3',
footerClass,
)
"
>
<slot
name=
"prepend-footer"
></slot>
<slot
name=
"footer"
>
...
...
pnpm-lock.yaml
View file @
9cf0573
This diff is collapsed.
Click to expand it.
pnpm-workspace.yaml
View file @
9cf0573
...
...
@@ -51,7 +51,7 @@ catalog:
'
@types/sortablejs'
:
^1.15.8
'
@typescript-eslint/eslint-plugin'
:
^8.13.0
'
@typescript-eslint/parser'
:
^8.13.0
'
@vee-validate/zod'
:
^4.14.
6
'
@vee-validate/zod'
:
^4.14.
7
'
@vite-pwa/vitepress'
:
^0.5.3
'
@vitejs/plugin-vue'
:
^5.1.4
'
@vitejs/plugin-vue-jsx'
:
^4.0.1
...
...
@@ -76,8 +76,8 @@ catalog:
cross-env
:
^7.0.3
cspell
:
^8.16.0
cssnano
:
^7.0.6
cz-git
:
^1.1
0.1
czg
:
^1.1
0.1
cz-git
:
^1.1
1.0
czg
:
^1.1
1.0
dayjs
:
^1.11.13
defu
:
^6.1.4
depcheck
:
^1.4.7
...
...
@@ -90,7 +90,7 @@ catalog:
eslint-plugin-eslint-comments
:
^3.2.0
eslint-plugin-import-x
:
^4.4.0
eslint-plugin-jsdoc
:
^50.4.3
eslint-plugin-jsonc
:
^2.1
6
.0
eslint-plugin-jsonc
:
^2.1
7
.0
eslint-plugin-n
:
^17.13.1
eslint-plugin-no-only-tests
:
^3.3.0
eslint-plugin-perfectionist
:
^3.9.1
...
...
@@ -114,14 +114,14 @@ catalog:
lint-staged
:
^15.2.10
lodash.clonedeep
:
^4.5.0
lodash.get
:
^4.4.2
lucide-vue-next
:
^0.45
4
.0
lucide-vue-next
:
^0.45
6
.0
medium-zoom
:
^1.1.0
naive-ui
:
^2.40.1
nitropack
:
^2.10.
3
nitropack
:
^2.10.
4
nprogress
:
^0.2.0
ora
:
^8.1.1
pinia
:
2.2.2
pinia-plugin-persistedstate
:
^4.1.
2
pinia-plugin-persistedstate
:
^4.1.
3
pkg-types
:
^1.2.1
playwright
:
^1.48.2
postcss
:
^8.4.47
...
...
@@ -134,7 +134,7 @@ catalog:
prettier-plugin-tailwindcss
:
^0.6.8
publint
:
^0.2.12
qrcode
:
^1.5.4
radix-vue
:
^1.9.
8
radix-vue
:
^1.9.
9
resolve.exports
:
^2.0.2
rimraf
:
^6.0.1
rollup
:
^4.24.4
...
...
@@ -158,7 +158,7 @@ catalog:
typescript
:
^5.6.3
unbuild
:
^3.0.0-rc.11
unplugin-element-plus
:
^0.8.0
vee-validate
:
^4.14.
6
vee-validate
:
^4.14.
7
vite
:
^5.4.10
vite-plugin-compression
:
^0.5.1
vite-plugin-dts
:
4.2.1
...
...
@@ -174,8 +174,8 @@ catalog:
vue-i18n
:
^10.0.4
vue-router
:
^4.4.5
vue-tsc
:
^2.1.10
vxe-pc-ui
:
^4.2.4
5
vxe-table
:
^4.8.
2
vxe-pc-ui
:
^4.2.4
6
vxe-table
:
^4.8.
8
watermark-js-plus
:
^1.5.7
zod
:
^3.23.8
zod-defaults
:
^0.1.3
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment