Skip to content

Commit

Permalink
feat: update deps
Browse files Browse the repository at this point in the history
  • Loading branch information
Mister-Hope committed Feb 6, 2024
1 parent 99215ad commit 4ce192b
Show file tree
Hide file tree
Showing 12 changed files with 1,056 additions and 1,353 deletions.
5 changes: 3 additions & 2 deletions docs/.vuepress/client.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import {defineClientConfig} from "@vuepress/client";
import {ColorIcon} from "./components/ColorIcon.js";
import { defineClientConfig } from "vuepress/client";

import { ColorIcon } from "./components/ColorIcon.js";
import CarouselComponent from "./components/MyCarousel.vue";

export default defineClientConfig({
Expand Down
20 changes: 10 additions & 10 deletions docs/.vuepress/components/AdPage.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<script setup lang="ts">
defineProps({
mode: {
type: String,
default: "horizontal",
},
content: {
type: String,
default: "",
},
});
withDefaults(
defineProps<{
mode?: string;
content?: string;
}>(),
{
mode: "horizontal",
content: "",
}
);
</script>

<template>
Expand Down
56 changes: 23 additions & 33 deletions docs/.vuepress/components/MyCarousel.vue
Original file line number Diff line number Diff line change
@@ -1,8 +1,25 @@
<script setup lang="ts">
import type { PropType } from "vue";
import { Carousel, Navigation, Pagination, Slide } from "vue3-carousel";
import "vue3-carousel/dist/carousel.css";
defineProps({
imgList: {
type: Array as PropType<string[]>,
required: true,
validator: (value: string[]) => {
// 进行更严格的类型验证,确保数组元素都是字符串
return value.every((item) => typeof item === "string");
},
},
});
</script>

<template>
<Carousel>
<Slide v-for="imgSrc in imgList" :key="imgSrc">
<div class="carousel__item">
<img :src="imgSrc" loading="lazy">
<img :src="imgSrc" loading="lazy" />
</div>
</Slide>

Expand All @@ -13,48 +30,21 @@
</Carousel>
</template>

<script>
import {defineComponent} from 'vue'
import {Carousel, Navigation, Pagination, Slide} from 'vue3-carousel'
import 'vue3-carousel/dist/carousel.css'
export default defineComponent({
name: 'Basic',
components: {
Carousel,
Slide,
Pagination,
Navigation,
},
props: {
imgList: {
type: Array,
required: true,
validator: (value) => {
// 进行更严格的类型验证,确保数组元素都是字符串
return value.every((item) => typeof item === 'string');
},
},
},
})
</script>

<style>
.carousel__prev,
.carousel__next {
box-sizing: content-box;
color: var(--theme-color);
}
.carousel__pagination-button::after{
background-color:#fff;
.carousel__pagination-button::after {
background-color: #fff;
}
.carousel__pagination-button:hover::after, .carousel__pagination-button--active::after{
.carousel__pagination-button:hover::after,
.carousel__pagination-button--active::after {
background-color: var(--theme-color);
}
.carousel__track{
.carousel__track {
margin-top: 0;
}
</style>
24 changes: 14 additions & 10 deletions docs/.vuepress/config.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
import {getDirname, path} from "@vuepress/utils";
import {defineUserConfig} from "vuepress";
import { container } from "@mdit/plugin-container";
import { viteBundler } from "@vuepress/bundler-vite";
import { defineUserConfig } from "vuepress";
import { getDirname, path } from "vuepress/utils";

import theme from "./theme.js";
import {container} from "@mdit/plugin-container";

const __dirname = getDirname(import.meta.url);

Expand All @@ -15,9 +17,9 @@ export default defineUserConfig({
{},
`
(function() {
if (location.href.indexOf('gitee.io') > -1 || location.href.indexOf('sheng90.wang') > -1) {
window.location.href = 'https://api-buddy.cn';
}
if (location.href.indexOf('gitee.io') > -1 || location.href.indexOf('sheng90.wang') > -1) {
window.location.href = 'https://api-buddy.cn';
}
})();
`,
],
Expand Down Expand Up @@ -62,14 +64,16 @@ export default defineUserConfig({
},
},

bundler: viteBundler(),

theme,

pagePatterns: ["**/*.md", "!*.snippet.md", "!.vuepress", "!node_modules"],

alias: {
"@theme-hope/layouts/Layout": path.resolve(
__dirname,
"./layouts/Layout.vue",
"./layouts/Layout.vue"
),
// "@theme-hope/components/HomePage": path.resolve(
// __dirname,
Expand All @@ -90,13 +94,13 @@ export default defineUserConfig({
openRender: (tokens, index, _options) => {
const info = tokens[index].info.trim().slice(4).trim();
let style = "background:#262626";

if (info.indexOf("style") > -1) {
style = info.split("style=")[1].split('"')[1];
}
const title = info.replace('style="'+style+'"',"") || 'Hint';

const title = info.replace('style="' + style + '"', "") || "Hint";
return `<div class="custom-container hint" style="${style}">\n<p class="custom-container-title">${title}</p>\n`;


},
});
},
Expand Down
4 changes: 2 additions & 2 deletions docs/.vuepress/layouts/Layout.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup lang="ts">
import { usePageData, usePageFrontmatter } from "@vuepress/client";
import { usePageData, usePageFrontmatter } from "vuepress/client";
import { ref, watch } from "vue";
import CommonWrapper from "@theme-hope/components/CommonWrapper";
Expand Down Expand Up @@ -54,7 +54,7 @@ ${sidebarTopArray.slice(0, 4).join("\n ")}
</span>
</div>
`;
},
}
);
</script>
<template>
Expand Down
23 changes: 11 additions & 12 deletions docs/.vuepress/theme.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import {getDirname, path} from "@vuepress/utils";
import {hopeTheme} from "vuepress-theme-hope";
import {enNavbar, zhNavbar} from "./navbar.js";
import {enSidebar, zhSidebar} from "./sidebar.js";
import { getDirname, path } from "vuepress/utils";
import { hopeTheme } from "vuepress-theme-hope";
import { enNavbar, zhNavbar } from "./navbar.js";
import { enSidebar, zhSidebar } from "./sidebar.js";

const __dirname = getDirname(import.meta.url);

Expand All @@ -17,13 +17,12 @@ export default hopeTheme(
copyright: "Copyright © 2021-present Kings",
displayFooter: true,

pageInfo: false,
pageInfo: false,
fullscreen: true,
editLink: false,
contributors: false,
editLink: false,
contributors: false,


darkmode: "enable",
darkmode: "enable",

iconAssets: "//at.alicdn.com/t/c/font_2601581_d17fm4nxa97.css",

Expand Down Expand Up @@ -110,9 +109,9 @@ export default hopeTheme(
mdEnhance: {
align: true,
chart: true,
card: true,
codetabs: true,
container: true,
component: true,
hint: true,
imgLazyload: true,
imgSize: true,
include: {
Expand All @@ -127,5 +126,5 @@ export default hopeTheme(
},
},
},
{ custom: true },
{ custom: true }
);
14 changes: 7 additions & 7 deletions docs/en/guide/introduce.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,13 +89,13 @@ or fix bugs you didn't find during the upgrade process).

## About author

<VPCard
title="Kings"
desc="<b>Make it easier...faster...stronger...</b><br/>"
logo="/img/fastRequest.svg"
link="https://github.com/kings1990"
background="rgb(39 117 182 / 38%)"
/>
```component VPCard
title: Kings
desc: <b>Make it easier...faster...stronger...</b><br/>
logo: /img/fastRequest.svg
link: https://github.com/kings1990
background: rgb(39 117 182 / 38%)
```

## Platform support

Expand Down
5 changes: 4 additions & 1 deletion docs/guide/getstarted/start.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,10 @@ icon: start1
2. 如果[自动域名](../features/autoDomain.md)的结果不符合预期,则在[Project 级别域名配置](../features/projectLevelDomainConfig.md)里面修改域名
3. 点击发送请求按钮发送请求

<BiliBili bvid="BV1V84y1f7uQ" :ratio="5/4" />
```component BiliBili
bvid: BV1V84y1f7uQ
ratio: 5/4
```

[更多视频教程](../teachingVideo.md)

Expand Down
64 changes: 46 additions & 18 deletions docs/guide/teachingVideo.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,23 +5,51 @@ icon: bilibili

[![Bilibili](https://img.shields.io/static/v1?label=BiliBili&message=BiliBili&logo=bilibili&color=FC8D34)](https://space.bilibili.com/370110042) 站系列视频,==关注我==最快时间获得视频更新文档,给我==一键三连==是对我最大的创作鼓励

<img alt="bilibili" src="/img/bilibili.jpg" width="" height=""/> |
![bilibili][/img/bilibili.jpg]

<hr/>
<BiliBili bvid="BV1Ju4y1A7Qi" :ratio="5/4" />

<BiliBili bvid="BV13N4y1R7B4" :ratio="5/4" />

<BiliBili bvid="BV1wu4y1d7c4" :ratio="5/4" />

<BiliBili bvid="BV1Nk4y1M7Wu" :ratio="5/4" />

<BiliBili bvid="BV1vt4y1M7rV" :ratio="5/4" />

<BiliBili bvid="BV1xg41127TF" :ratio="5/4" />

<BiliBili bvid="BV1RF411u766" :ratio="5/4" />

<BiliBili bvid="BV1u5411S7ih" :ratio="5/4" />
---

<BiliBili bvid="BV1zU4y1S7pC" :ratio="5/4" />
```component BiliBili
bvid: BV1Ju4y1A7Qi
ratio: 5/4
```

```component BiliBili
bvid: BV13N4y1R7B4
ratio: 5/4
```

```component BiliBili
bvid: BV1wu4y1d7c4
ratio: 5/4
```

```component BiliBili
bvid: BV1Nk4y1M7Wu
ratio: 5/4
```

```component BiliBili
bvid: BV1vt4y1M7rV
ratio: 5/4
```

```component BiliBili
bvid: BV1xg41127TF
ratio: 5/4
```

```component BiliBili
bvid: BV1RF411u766
ratio: 5/4
```

```component BiliBili
bvid: BV1u5411S7ih
ratio: 5/4
```

```component BiliBili
bvid: BV1zU4y1S7pC
ratio: 5/4
```
3 changes: 3 additions & 0 deletions notes.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Notes

## 升级

```sh
rm -rf ./node_modules && pnpm add @vuepress/client@next vue vuepress@next vuepress-theme-hope@next && pnpm i && pnpm up
```

## 预览文档

Expand Down
17 changes: 8 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,19 @@
"docs:clean-dev": "vuepress dev docs --no-cache",
"packages:update": "pnpm dlx vp-update"
},
"packageManager": "pnpm@8.13.1",
"packageManager": "pnpm@8.15.1",
"dependencies": {
"@mdit/plugin-container": "0.7.6",
"@vuepress/client": "2.0.0-rc.0",
"@vuepress/plugin-docsearch": "2.0.0-rc.0",
"@vuepress/utils": "2.0.0-rc.0",
"@mdit/plugin-container": "0.8.0",
"@vuepress/bundler-vite": "2.0.0-rc.6",
"@vuepress/plugin-docsearch": "2.0.0-rc.11",
"chart.js": "^4.4.1",
"vue": "^3.4.1",
"vue": "^3.4.15",
"vue-router": "^4.2.5",
"vue3-carousel": "^0.3.1",
"vuepress": "2.0.0-rc.0",
"vuepress-theme-hope": "2.0.0-rc.10"
"vuepress": "2.0.0-rc.6",
"vuepress-theme-hope": "2.0.0-rc.22"
},
"devDependencies": {
"prettier": "3.1.1"
"prettier": "3.2.5"
}
}
Loading

0 comments on commit 4ce192b

Please sign in to comment.