Skip to content

Commit 6147d13

Browse files
committed
docs: update docs
1 parent e68e1b4 commit 6147d13

File tree

13 files changed

+113
-33
lines changed

13 files changed

+113
-33
lines changed

.husky/post-merge

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# 每次 git pull 之后, 安装依赖
2+
3+
pnpm install

apps/web-antd/src/layouts/basic.vue

+4-3
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import { preferences } from '@vben-core/preferences';
1313
1414
import { $t } from '#/locales';
1515
import { resetRoutes } from '#/router';
16-
import { useAppStore } from '#/store';
16+
import { useAccessStore, useAppStore } from '#/store';
1717
1818
const notifications = ref<NotificationItem[]>([
1919
{
@@ -81,6 +81,7 @@ const menus = computed(() => [
8181
]);
8282
8383
const appStore = useAppStore();
84+
const { userInfo } = useAccessStore();
8485
const router = useRouter();
8586
8687
async function handleLogout() {
@@ -102,11 +103,11 @@ function handleMakeAll() {
102103
<BasicLayout @clear-preferences-and-logout="handleLogout">
103104
<template #user-dropdown>
104105
<UserDropdown
105-
:avatar="preferences.app.defaultAvatar"
106+
:avatar="userInfo?.avatar ?? preferences.app.defaultAvatar"
106107
:menus="menus"
108+
:text="userInfo?.realName"
107109
description="[email protected]"
108110
tag-text="Pro"
109-
text="Vben Admin"
110111
@logout="handleLogout"
111112
/>
112113
</template>

apps/web-antd/vite.config.mts

+2-2
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,12 @@ export default defineConfig({
2727
icons: [
2828
{
2929
sizes: '192x192',
30-
src: 'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].1/source/pwa-icon-192.png',
30+
src: 'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].3/source/pwa-icon-192.png',
3131
type: 'image/png',
3232
},
3333
{
3434
sizes: '512x512',
35-
src: 'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].1/source/pwa-icon-512.png',
35+
src: 'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].3/source/pwa-icon-512.png',
3636
type: 'image/png',
3737
},
3838
],

internal/lint-configs/eslint-config/src/custom-config.ts

+1-4
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const restrictedImportIgnores = [
77
];
88

99
const customConfig: Linter.FlatConfig[] = [
10-
// shadcn-ui 内部组件是自动生成的,这里忽略
10+
// shadcn-ui 内部组件是自动生成的,不做太多限制
1111
{
1212
files: ['packages/@core/ui-kit/shadcn-ui/**/**'],
1313
rules: {
@@ -61,7 +61,6 @@ const customConfig: Linter.FlatConfig[] = [
6161
'no-restricted-imports': [
6262
'error',
6363
{
64-
// 如果需要,可以指定禁止特定的子路径
6564
patterns: [
6665
{
6766
group: ['@vben/*'],
@@ -81,7 +80,6 @@ const customConfig: Linter.FlatConfig[] = [
8180
'no-restricted-imports': [
8281
'error',
8382
{
84-
// 如果需要,可以指定禁止特定的子路径
8583
patterns: [
8684
{
8785
group: ['@vben/*', '@vben-core/*'],
@@ -107,7 +105,6 @@ const customConfig: Linter.FlatConfig[] = [
107105
'no-restricted-imports': [
108106
'error',
109107
{
110-
// 如果需要,可以指定禁止特定的子路径
111108
patterns: [
112109
{
113110
group: ['@vben/*'],

packages/@core/forward/preferences/src/config.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ const defaultPreferences: Preferences = {
1010
compact: false,
1111
contentCompact: 'wide',
1212
defaultAvatar:
13-
'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].0/source/avatar-v1.webp',
13+
'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].3/source/avatar-v1.webp',
1414
dynamicTitle: true,
1515
enablePreferences: true,
1616
isMobile: false,
@@ -46,7 +46,7 @@ const defaultPreferences: Preferences = {
4646
logo: {
4747
enable: true,
4848
source:
49-
'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].0/source/logo-v1.webp',
49+
'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].3/source/logo-v1.webp',
5050
},
5151
navigation: {
5252
accordion: true,
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import { defineBuildConfig } from 'unbuild';
2+
3+
export default defineBuildConfig({
4+
clean: true,
5+
declaration: true,
6+
entries: ['src/index'],
7+
});

packages/@core/shared/iconify/package.json

+17-3
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,28 @@
1010
},
1111
"license": "MIT",
1212
"type": "module",
13+
"scripts": {
14+
"build": "pnpm unbuild",
15+
"stub": "pnpm unbuild --stub"
16+
},
1317
"files": [
1418
"dist"
1519
],
16-
"main": "./src/index.ts",
17-
"module": "./src/index.ts",
20+
"main": "./dist/index.mjs",
21+
"module": "./dist/index.mjs",
1822
"exports": {
1923
".": {
20-
"default": "./src/index.ts"
24+
"types": "./src/index.ts",
25+
"development": "./src/index.ts",
26+
"default": "./dist/index.mjs"
27+
}
28+
},
29+
"publishConfig": {
30+
"exports": {
31+
".": {
32+
"types": "./dist/index.d.ts",
33+
"default": "./dist/index.mjs"
34+
}
2135
}
2236
},
2337
"dependencies": {
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
<script setup lang="ts">
2+
import { computed } from 'vue';
3+
24
import { $t } from '@vben-core/locales';
35
46
import InputItem from '../input-item.vue';
@@ -8,6 +10,8 @@ defineOptions({
810
name: 'PreferenceBreadcrumbConfig',
911
});
1012
13+
const props = defineProps<{ disabled: boolean }>();
14+
1115
const copyrightEnable = defineModel<boolean>('copyrightEnable');
1216
const copyrightDate = defineModel<string>('copyrightDate');
1317
const copyrightIcp = defineModel<string>('copyrightIcp');
@@ -16,27 +20,29 @@ const copyrightCompanyName = defineModel<string>('copyrightCompanyName');
1620
const copyrightCompanySiteLink = defineModel<string>(
1721
'copyrightCompanySiteLink',
1822
);
23+
24+
const itemDisabled = computed(() => props.disabled || !copyrightEnable.value);
1925
</script>
2026

2127
<template>
22-
<SwitchItem v-model="copyrightEnable">
28+
<SwitchItem v-model="copyrightEnable" :disabled="disabled">
2329
{{ $t('preferences.copyright.enable') }}
2430
</SwitchItem>
2531

26-
<InputItem v-model="copyrightCompanyName" :disabled="!copyrightEnable">
32+
<InputItem v-model="copyrightCompanyName" :disabled="itemDisabled">
2733
{{ $t('preferences.copyright.company-name') }}
2834
</InputItem>
29-
<InputItem v-model="copyrightCompanySiteLink" :disabled="!copyrightEnable">
35+
<InputItem v-model="copyrightCompanySiteLink" :disabled="itemDisabled">
3036
{{ $t('preferences.copyright.company-site-link') }}
3137
</InputItem>
32-
<InputItem v-model="copyrightDate" :disabled="!copyrightEnable">
38+
<InputItem v-model="copyrightDate" :disabled="itemDisabled">
3339
{{ $t('preferences.copyright.date') }}
3440
</InputItem>
3541

36-
<InputItem v-model="copyrightIcp" :disabled="!copyrightEnable">
42+
<InputItem v-model="copyrightIcp" :disabled="itemDisabled">
3743
{{ $t('preferences.copyright.icp') }}
3844
</InputItem>
39-
<InputItem v-model="copyrightIcpLink" :disabled="!copyrightEnable">
45+
<InputItem v-model="copyrightIcpLink" :disabled="itemDisabled">
4046
{{ $t('preferences.copyright.icp-link') }}
4147
</InputItem>
4248
</template>

packages/business/widgets/src/preferences/preferences.vue

+1
Original file line numberDiff line numberDiff line change
@@ -351,6 +351,7 @@ async function handleReset() {
351351
v-model:copyright-enable="copyrightEnable"
352352
v-model:copyright-icp="copyrightIcp"
353353
v-model:copyright-icp-link="copyrightIcpLink"
354+
:disabled="!footerEnable"
354355
/>
355356
</Block>
356357
</template>

packages/constants/src/vben.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ const VBEN_GITHUB_URL = 'https://github.com/vbenjs/vue-vben-admin';
77
* @zh_CN Vben Logo
88
*/
99
const VBEN_LOGO =
10-
'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].1/source/logo-v1.webp';
10+
'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected].3/source/logo-v1.webp';
1111
export { VBEN_GITHUB_URL, VBEN_LOGO };

website/.vitepress/config.mts

+24-5
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,35 @@
11
import { defineConfigWithTheme } from 'vitepress';
22

33
export default defineConfigWithTheme({
4-
description: 'Vben Admin Pro Doc',
4+
description: 'Vben Admin Pro & 企业级管理系统框架',
55
lang: 'zh-CN',
6+
7+
locales: {
8+
en: {
9+
label: 'English',
10+
lang: 'en',
11+
link: '/en/index',
12+
},
13+
root: {
14+
label: '简体中文',
15+
lang: 'zh-CN',
16+
},
17+
},
618
srcDir: 'src',
719
themeConfig: {
20+
editLink: {
21+
pattern: 'https://github.com/vbenjs/vue-vben-admin/edit/main/docs/:path',
22+
text: 'Edit this page on GitHub',
23+
},
24+
footer: {
25+
copyright: 'Copyright © 2024-present Vben Admin Pro',
26+
},
27+
i18nRouting: true,
28+
logo: 'https://cdn.jsdelivr.net/npm/@vbenjs/[email protected]/source/logo-v1.webp',
829
nav: [
930
{ link: '/', text: 'Home' },
1031
{ link: '/markdown-examples', text: 'Examples' },
1132
],
12-
1333
sidebar: [
1434
{
1535
text: 'Examples',
@@ -19,12 +39,11 @@ export default defineConfigWithTheme({
1939
],
2040
},
2141
],
22-
42+
siteTitle: 'Vben Admin Pro',
2343
socialLinks: [
24-
{ icon: 'github', link: 'https://github.com/vuejs/vitepress' },
44+
{ icon: 'github', link: 'https://github.com/vbenjs/vue-vben-admin' },
2545
],
2646
},
27-
title: 'Vben Admin Pro',
2847
vite: {
2948
build: {
3049
chunkSizeWarningLimit: Infinity,

website/src/en/index.md

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
# https://vitepress.dev/reference/default-theme-home-page
3+
layout: home
4+
sidebar: false
5+
6+
hero:
7+
name: 'Vben Admin Pro'
8+
text: '企业级管理系统框架 - EN'
9+
tagline: 开箱即用,简单高效
10+
image:
11+
src: https://cdn.jsdelivr.net/npm/@vbenjs/[email protected]/source/logo-v1.webp
12+
alt: Vben Admin Pro
13+
actions:
14+
- theme: brand
15+
text: 开始
16+
link: /guide/
17+
- theme: alt
18+
text: 在 GitHub 查看
19+
link: https://github.com/vbenjs/vue-vben-admin
20+
21+
features:
22+
- title: Feature A
23+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
24+
- title: Feature B
25+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
26+
- title: Feature C
27+
details: Lorem ipsum dolor sit amet, consectetur adipiscing elit
28+
---

website/src/index.md

+11-7
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,22 @@
11
---
22
# https://vitepress.dev/reference/default-theme-home-page
33
layout: home
4+
sidebar: false
45

56
hero:
6-
name: 'My Awesome Project'
7-
text: 'A VitePress Site'
8-
tagline: My great project tagline
7+
name: 'Vben Admin Pro'
8+
text: '企业级管理系统框架'
9+
tagline: 开箱即用,简单高效
10+
image:
11+
src: https://cdn.jsdelivr.net/npm/@vbenjs/[email protected]/source/logo-v1.webp
12+
alt: Vben Admin Pro
913
actions:
1014
- theme: brand
11-
text: Markdown Examples
12-
link: /markdown-examples
15+
text: 开始
16+
link: /guide/
1317
- theme: alt
14-
text: API Examples
15-
link: /api-examples
18+
text: 在 GitHub 查看
19+
link: https://github.com/vbenjs/vue-vben-admin
1620

1721
features:
1822
- title: Feature A

0 commit comments

Comments
 (0)