Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
xiaoxian521 committed Nov 22, 2024
1 parent 756705a commit c250954
Show file tree
Hide file tree
Showing 25 changed files with 89 additions and 88 deletions.
32 changes: 16 additions & 16 deletions docs/.vuepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -99,22 +99,22 @@ module.exports = {
name: "pure-admin", // 必需
href: "https://github.com/xiaoxian521", // 可选的
},
social: {
// 社交图标,显示于博主信息栏和页脚栏
// iconfontCssFile: '//at.alicdn.com/t/font_1678482_u4nrnp8xp6g.css', // 可选,阿里图标库在线css文件地址,对于主题没有的图标可自由添加
icons: [
{
iconClass: "icon-github",
title: "GitHub",
link: "https://github.com/xiaoxian521",
},
{
iconClass: "icon-bilibili",
title: "bilibili",
link: "https://space.bilibili.com/301103230",
},
],
},
// social: {
// 社交图标,显示于博主信息栏和页脚栏
// iconfontCssFile: '//at.alicdn.com/t/font_1678482_u4nrnp8xp6g.css', // 可选,阿里图标库在线css文件地址,对于主题没有的图标可自由添加
// icons: [
// {
// iconClass: "icon-github",
// title: "GitHub",
// link: "https://github.com/xiaoxian521",
// },
// {
// iconClass: "icon-bilibili",
// title: "bilibili",
// link: "https://space.bilibili.com/301103230",
// },
// ],
// },
footer: {
// 页脚信息
createYear: 2020, // 博客创建年份
Expand Down
9 changes: 9 additions & 0 deletions docs/.vuepress/config/nav.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,15 @@ module.exports = [
text: "后端项目",
link: "/pages/opensource/",
},
{
text: "",
items: [
{
text: "哔哩哔哩",
link: "https://space.bilibili.com/301103230",
},
],
},
{
text: "日志",
items: [
Expand Down
Binary file removed docs/.vuepress/public/audio/higher/光辉岁月.mp3
Binary file not shown.
Binary file removed docs/.vuepress/public/audio/higher/海阔天空.mp3
Binary file not shown.
Binary file removed docs/.vuepress/public/audio/光辉岁月.mp3
Binary file not shown.
Binary file removed docs/.vuepress/public/audio/海阔天空.mp3
Binary file not shown.
Binary file removed docs/.vuepress/public/video/ep.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/layout.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/nologin.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/redirect.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/same3.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/same5.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/start.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/theme.mov
Binary file not shown.
Binary file removed docs/.vuepress/public/video/url.mov
Binary file not shown.
22 changes: 11 additions & 11 deletions docs/01.指南/01.指南/07.路由和菜单.md
Original file line number Diff line number Diff line change
Expand Up @@ -425,11 +425,11 @@ export default {

#### 重定向

可以看到上面生成菜单的路由配置项我并没有加上 `redirect` 属性,当使用 `fighting` 路径跳转时,就会跑到 `404` 页面,如下视频
可以看到上面生成菜单的路由配置项我并没有加上 `redirect` 属性,当使用 `fighting` 路径跳转时,就会跑到 `404` 页面

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/redirect.mov')" type="video/mp4">
</video>
</video> -->

所以我们最好在写静态路由配置时将父级加上 `redirect` 属性,`redirect` 可以填写您想要重定向的 `path` 即可,具体可以参考 [src/router/modules/nested.ts](https://github.com/pure-admin/vue-pure-admin/blob/main/src/router/modules/nested.ts)

Expand All @@ -452,11 +452,11 @@ export default {
#### 添加无 `layout` 的页面

使用场景:需要外嵌平台某个页面,不需要展示菜单导航以及额外模块,只需要展示业务内容模块
`layout` 页面也就相当于一个全屏空白页面,没有菜单导航以及额外模块,如下视频
`layout` 页面也就相当于一个全屏空白页面,没有菜单导航以及额外模块

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/layout.mov')" type="video/mp4">
</video>
</video> -->

如何添加?

Expand Down Expand Up @@ -1095,11 +1095,11 @@ const frameRouter = {

### 路由页面缓存 `keepAlive`

在路由的 `meta` 里加入 `keepAlive: true` 即可对当前路由页面进行缓存,被缓存的路由页面不会被销毁,如下视频
在路由的 `meta` 里加入 `keepAlive: true` 即可对当前路由页面进行缓存,被缓存的路由页面不会被销毁

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/same3.mov')" type="video/mp4">
</video>
</video> -->

生效前提:对应页面 `name` 必须与路由的 `name` 保持一致

Expand All @@ -1120,9 +1120,9 @@ transition: {
}
```

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/same5.mov')" type="video/mp4">
</video>
</video> -->

[点击查看具体实现代码](https://github.com/pure-admin/vue-pure-admin/blob/main/src/layout/components/lay-content/index.vue#L77-L107)

Expand Down
4 changes: 2 additions & 2 deletions docs/01.指南/02.进阶/02.主题和暗黑模式.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,9 @@ menuActiveBefore;

### 页面如何打开暗黑模式

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/theme.mov')" type="video/mp4">
</video>
</video> -->

### 具体实现

Expand Down
6 changes: 3 additions & 3 deletions docs/01.指南/02.进阶/05.RBAC权限.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,11 @@ permalink: /pages/RBAC/

##### 如何配置

您不需要做任何配置,只需要像上图一样配置好权限就行,平台会根据有无权限自行判断,如下面视频,当有 `admin` 权限时可以看到系统管理目录以及里面的菜单页面并且可以通过 `url` 跳转,当然也可以在 [菜单搜索](https://github.com/pure-admin/vue-pure-admin/tree/main/src/layout/components/lay-search) 中找到,当无 `admin` 权限时反之
您不需要做任何配置,只需要像上图一样配置好权限就行,平台会根据有无权限自行判断,当有 `admin` 权限时可以看到系统管理目录以及里面的菜单页面并且可以通过 `url` 跳转,当然也可以在 [菜单搜索](https://github.com/pure-admin/vue-pure-admin/tree/main/src/layout/components/lay-search) 中找到,当无 `admin` 权限时反之

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/url.mov')" type="video/mp4">
</video>
</video> -->

#### 按钮、组件、类方法权限

Expand Down
6 changes: 3 additions & 3 deletions docs/01.指南/02.进阶/08.自定义免登录.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ permalink: /pages/nologin/

![nologin1](~@alias/img/login/no1.jpg)

平台提供 1、7、30 三种天数供选择,默认 7 天。您也可查看下面的具体实现,修改少量代码即可自定义所需天数。点击天数即可切换,如下视频
平台提供 1、7、30 三种天数供选择,默认 7 天。您也可查看下面的具体实现,修改少量代码即可自定义所需天数。点击天数即可切换

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/nologin.mov')" type="video/mp4">
</video>
</video> -->

## 具体实现

Expand Down
7 changes: 4 additions & 3 deletions docs/01.指南/02.进阶/09.打包优化.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,11 @@ permalink: /pages/buildgood/

-`lodash` 举例,`lodash` 默认是 `cjs` 格式,不支持 `es6``import` 语法,那么我们就可以去 `github` 或者某些搜索引擎去寻找替代品,最终平台找到了 `lodash-unified`,它完全兼容 `lodash` 的全部语法并且既支持 `esm` 又支持 `cjs`,这使得它无论在浏览器还是 `node` 环境中表现都很良好。当然如果遇到那种只支持 `cjs` 格式,网上找遍了都找不到兼容 `esm` 格式的咋办呢,这时你可以参考 `lodash-unified`,看看别人是如何转换的 😊

- 平台精简版首次启动时间我这边测试是 `6` 秒,刷新页面的话开启 [CachingAsyncRoutes](https://github.com/pure-admin/vue-pure-admin/blob/main/public/platform-config.json#L23) 可能连 `1` 秒都不要,可看下面的视频。如果您使用 `pure-admin` 且当前网页`首启动``刷新页面`的等待时间远远大于前面的数字,也该考虑优化了。当项目具有一定规模的时候,优化并没有那么容易,所以您在写代码前就应该遵循我上面的说法,按需引入才是 `yyds` 😄
<video width="320" height="240" controls>
- 平台精简版首次启动时间我这边测试是 `6` 秒,刷新页面的话开启 [CachingAsyncRoutes](https://github.com/pure-admin/vue-pure-admin/blob/main/public/platform-config.json#L23) 可能连 `1` 秒都不要。如果您使用 `pure-admin` 且当前网页`首启动``刷新页面`的等待时间远远大于前面的数字,也该考虑优化了。当项目具有一定规模的时候,优化并没有那么容易,所以您在写代码前就应该遵循我上面的说法,按需引入才是 `yyds` 😄

<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/start.mov')" type="video/mp4">
</video>
</video> -->

- `vite` 目前最大的性能瓶颈是大量模块的首页加载,可看 [vite-issues](https://github.com/vitejs/vite/issues/1309#issue-777569758),值得期待的是这个 [pr](https://github.com/vitejs/vite/pull/10671) 可能会缓解这个麻烦

Expand Down
6 changes: 3 additions & 3 deletions docs/01.指南/04.其他/01.常见问题.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,11 +114,11 @@ permalink: /pages/FAQ/

![mac](~@alias/img/guide/mac.png)

`element-plus``menu` 在上述的情况可能会出现卡顿,下面是群友提供的视频
`element-plus``menu` 在上述的情况可能会出现卡顿。

<video width="320" height="240" controls>
<!-- <video width="320" height="240" controls>
<source :src="$withBase('/video/ep.mov')" type="video/mp4">
</video>
</video> -->

两种解决办法:

Expand Down
4 changes: 2 additions & 2 deletions theme-vdoing/components/Buttons.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
v-show="showCommentBut"
@click="scrollToComment"
/>
<div
<!-- <div
title="主题模式"
class="button blur theme-mode-but iconfont icon-zhuti"
@mouseenter="showModeBox = true"
Expand All @@ -40,7 +40,7 @@
</li>
</ul>
</transition>
</div>
</div> -->
</div>
</template>

Expand Down
38 changes: 19 additions & 19 deletions theme-vdoing/components/Footer.vue
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@
</template>

<script>
import { fetch } from 'whatwg-fetch'
// import { fetch } from 'whatwg-fetch'
export default {
data() {
return {
stars: '16k',
forks: '3k',
stars: '16.4k',
forks: '3.1k',
}
},
computed: {
Expand All @@ -90,22 +90,22 @@ export default {
return this.$themeConfig.footer
},
},
beforeMount() {
fetch('https://api.github.com/repos/pure-admin/vue-pure-admin', {
method: 'get',
headers: {
'Content-Type': 'application/json'
}
}).then((response) => {
return response.json()
}).then((data) => {
const { stargazers_count, forks_count } = data
this.stars = stargazers_count
this.forks = forks_count
}).catch(function (error) {
console.log(error)
})
}
// beforeMount() {
// fetch('https://api.github.com/repos/pure-admin/vue-pure-admin', {
// method: 'get',
// headers: {
// 'Content-Type': 'application/json'
// }
// }).then((response) => {
// return response.json()
// }).then((data) => {
// const { stargazers_count, forks_count } = data
// this.stars = stargazers_count
// this.forks = forks_count
// }).catch(function (error) {
// console.log(error)
// })
// }
}
</script>

Expand Down
39 changes: 15 additions & 24 deletions theme-vdoing/components/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,15 +42,6 @@
<p v-if="homeData.tagline" class="description">
{{ homeData.tagline }}
</p>
<p style="font-size:15px">
<el-link style="color: #426feb" :underline="false"
href="https://space.bilibili.com/301103230?spm_id_from=333.999.0.0"
target="_blank">愿世间所有美好,都恰逢其时,幸运都奔向你</el-link>
</p>
<p style="font-size:15px">
<el-link style="color: #426feb" :underline="false" href="https://github.com/pure-admin"
target="_blank">2020年11月16日开发</el-link>
</p>
<!-- <p style="font-size:15px">
<el-link style="color: #426feb" :underline="false" href="https://www.bilibili.com/video/BV1Xv4y1U7UN/"
target="_blank">点我查看如何使用PWA访问文档</el-link>
Expand Down Expand Up @@ -160,7 +151,7 @@ import Pagination from "@theme/components/Pagination"
import BloggerBar from "@theme/components/BloggerBar"
import CategoriesBar from "@theme/components/CategoriesBar"
import TagsBar from "@theme/components/TagsBar"
import { fetch } from 'whatwg-fetch'
// import { fetch } from 'whatwg-fetch'
const MOBILE_DESKTOP_BREAKPOINT = 720 // refer to config.styl
Expand All @@ -169,7 +160,7 @@ BScroll.use(Slide)
export default {
data() {
return {
release: "latest",
release: "5.8.0",
isMQMobile: false,
slide: null,
Expand Down Expand Up @@ -240,19 +231,19 @@ export default {
this.addressHerf = window.location.href
fetch('https://api.github.com/repos/pure-admin/vue-pure-admin/releases/latest', {
method: 'get',
headers: {
'Content-Type': 'application/json'
}
}).then((response) => {
return response.json()
}).then((data) => {
const { tag_name } = data
this.release = tag_name
}).catch(function (error) {
console.log(error)
})
// fetch('https://api.github.com/repos/pure-admin/vue-pure-admin/releases/latest', {
// method: 'get',
// headers: {
// 'Content-Type': 'application/json'
// }
// }).then((response) => {
// return response.json()
// }).then((data) => {
// const { tag_name } = data
// this.release = tag_name
// }).catch(function (error) {
// console.log(error)
// })
},
mounted() {
if (this.$route.query.p) {
Expand Down
4 changes: 2 additions & 2 deletions theme-vdoing/components/NavLinks.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
</el-popover> -->

<!-- repo link -->
<a href="https://space.bilibili.com/301103230" title="bilibili" class="repo-link" target="_blank"
<!-- <a href="https://space.bilibili.com/301103230" title="bilibili" class="repo-link" target="_blank"
rel="noopener noreferrer">
bilibili
<OutboundLink />
</a>
</a> -->

<a v-if="repoLink" :href="repoLink" title="GitHub" class="repo-link" target="_blank" rel="noopener noreferrer">
<!-- <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="1.2em" height="1.2em"
Expand Down

0 comments on commit c250954

Please sign in to comment.