mirror of
https://gitee.com/wot-design-uni/wot-design-uni.git
synced 2025-12-06 17:18:40 +08:00
chore: 🚀 调整workflows使用pnpm安装依赖
This commit is contained in:
parent
dd8bc003ee
commit
b255a037d6
9
.github/workflows/alipay.yml
vendored
9
.github/workflows/alipay.yml
vendored
@ -37,10 +37,13 @@ jobs:
|
|||||||
}' > .minicirc
|
}' > .minicirc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Install pnpm
|
||||||
uses: actions/setup-node@v3
|
run: corepack enable
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "14.x"
|
node-version: '18'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
|
||||||
- name: upload
|
- name: upload
|
||||||
|
|||||||
4
.github/workflows/npm-publish.yml
vendored
4
.github/workflows/npm-publish.yml
vendored
@ -18,7 +18,9 @@ jobs:
|
|||||||
registry-url: https://registry.npmjs.org
|
registry-url: https://registry.npmjs.org
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Install Dependencies
|
||||||
run: pnpm
|
run: |
|
||||||
|
npm install pnpm -g
|
||||||
|
pnpm install
|
||||||
|
|
||||||
- name: Run Compiler
|
- name: Run Compiler
|
||||||
run: pnpm compiler
|
run: pnpm compiler
|
||||||
|
|||||||
9
.github/workflows/oss.yml
vendored
9
.github/workflows/oss.yml
vendored
@ -13,10 +13,13 @@ jobs:
|
|||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
|
|
||||||
- name: 设置 Node.js 18.x 环境
|
- name: Install pnpm
|
||||||
uses: actions/setup-node@v2
|
run: corepack enable
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: '18.x'
|
node-version: '18'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
- name: Install Dependencies and Build Docs
|
- name: Install Dependencies and Build Docs
|
||||||
run: |
|
run: |
|
||||||
|
|||||||
9
.github/workflows/weixin.yml
vendored
9
.github/workflows/weixin.yml
vendored
@ -41,10 +41,13 @@ jobs:
|
|||||||
}' > .minicirc
|
}' > .minicirc
|
||||||
fi
|
fi
|
||||||
|
|
||||||
- name: Use Node.js ${{ matrix.node-version }}
|
- name: Install pnpm
|
||||||
uses: actions/setup-node@v3
|
run: corepack enable
|
||||||
|
|
||||||
|
- uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: "14.x"
|
node-version: '18'
|
||||||
|
cache: 'pnpm'
|
||||||
|
|
||||||
|
|
||||||
- name: upload
|
- name: upload
|
||||||
|
|||||||
@ -4,11 +4,11 @@ import { useSidebar } from 'vitepress/dist/client/theme-default/composables/side
|
|||||||
import { computed } from 'vue';
|
import { computed } from 'vue';
|
||||||
|
|
||||||
|
|
||||||
const { theme, frontmatter } = useData()
|
const { theme } = useData()
|
||||||
const { hasSidebar } = useSidebar()
|
const { hasSidebar } = useSidebar()
|
||||||
|
|
||||||
const copyright = computed(()=>{
|
const copyright = computed(()=>{
|
||||||
const isNetlify = location.href.includes('netlify')
|
const isNetlify = typeof window !== 'undefined' ? window.location.href.includes('netlify') : false
|
||||||
if (!isNetlify) {
|
if (!isNetlify) {
|
||||||
return `${theme.value.footer.copyright} | <a style="text-decoration: none;" href="https://www.netlify.com">This site is powered by Netlify</a>`
|
return `${theme.value.footer.copyright} | <a style="text-decoration: none;" href="https://www.netlify.com">This site is powered by Netlify</a>`
|
||||||
}else{
|
}else{
|
||||||
|
|||||||
@ -4,8 +4,8 @@
|
|||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import { useRoute, useData } from 'vitepress';
|
import { useRoute, useData } from 'vitepress';
|
||||||
import { computed, onMounted, ref, watch } from 'vue'
|
import { computed, watch } from 'vue'
|
||||||
const baseUrl = process.env.NODE_ENV === 'production' ? `${location.origin}/demo/?timestamp=${new Date().getTime()}#/` : 'http://localhost:5173/demo/#/'
|
const baseUrl = process.env.NODE_ENV === 'production' && typeof window !== 'undefined' ? `${window.location.origin}/demo/?timestamp=${new Date().getTime()}#/` : 'http://localhost:5173/demo/#/'
|
||||||
const route = useRoute()
|
const route = useRoute()
|
||||||
const href = computed(() => {
|
const href = computed(() => {
|
||||||
const path = route.path
|
const path = route.path
|
||||||
|
|||||||
@ -44,7 +44,7 @@ export default {
|
|||||||
import { onBeforeMount, ref, watch } from 'vue'
|
import { onBeforeMount, ref, watch } from 'vue'
|
||||||
import { COLLAPSE_KEY, type CollapseToggleAllOptions } from './types'
|
import { COLLAPSE_KEY, type CollapseToggleAllOptions } from './types'
|
||||||
import { useChildren } from '../composables/useChildren'
|
import { useChildren } from '../composables/useChildren'
|
||||||
import { isArray } from '../common/util'
|
import { isArray, isDef } from '../common/util'
|
||||||
|
|
||||||
interface Props {
|
interface Props {
|
||||||
customClass?: string
|
customClass?: string
|
||||||
@ -137,7 +137,7 @@ const toggleAll = (options: boolean | CollapseToggleAllOptions = {}) => {
|
|||||||
names.push(item.name || index)
|
names.push(item.name || index)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (expanded ?? !item.$.exposed.expanded.value) {
|
if (isDef(expanded) ? expanded : !item.$.exposed.expanded.value) {
|
||||||
names.push(item.name || index)
|
names.push(item.name || index)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user