mirror of
https://github.com/antd-tiny-vue/antd-tiny-vue.git
synced 2024-11-10 09:39:15 +08:00
Compare commits
3 Commits
07d0ff0785
...
7bc8ec1094
Author | SHA1 | Date | |
---|---|---|---|
7bc8ec1094 | |||
08f17ce876 | |||
fe029c5a0e |
17
.vitepress/components/demo.vue
Normal file
17
.vitepress/components/demo.vue
Normal file
@ -0,0 +1,17 @@
|
||||
<script lang="ts" setup>
|
||||
import { onMounted, shallowRef } from 'vue'
|
||||
|
||||
const comp = shallowRef()
|
||||
onMounted(async () => {
|
||||
const { AntdTheme } = await import('vite-plugin-vitepress-demo/theme')
|
||||
comp.value = AntdTheme
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<ClientOnly>
|
||||
<component v-bind="$attrs" :is="comp"></component>
|
||||
</ClientOnly>
|
||||
</template>
|
||||
|
||||
<style scoped></style>
|
@ -10,20 +10,19 @@ const baseSrc = fileURLToPath(new URL('./', import.meta.url))
|
||||
|
||||
export default defineConfig({
|
||||
rewrites: getRewrites(),
|
||||
mpa: true,
|
||||
lang: 'en-US',
|
||||
ignoreDeadLinks: true,
|
||||
locales: {
|
||||
'zh-CN': {
|
||||
lang: 'zh-CN',
|
||||
title: 'vue3组件库站点',
|
||||
title: 'Antd Tiny Vue',
|
||||
label: '简体中文',
|
||||
description: 'vue3组件库站点',
|
||||
themeConfig: getZhCNConfig()
|
||||
},
|
||||
root: {
|
||||
lang: 'en-US',
|
||||
title: 'vue3 component library site',
|
||||
title: 'Antd Tiny Vue',
|
||||
label: 'English',
|
||||
description: 'vue3 component library site',
|
||||
themeConfig: getEnUSConfig()
|
||||
|
@ -1,15 +1,17 @@
|
||||
import type { Theme } from 'vitepress'
|
||||
// eslint-disable-next-line import/no-named-as-default
|
||||
import DefaultTheme from 'vitepress/theme'
|
||||
import { AntdTheme } from 'vite-plugin-vitepress-demo/theme'
|
||||
// @ts-expect-error this is a local module
|
||||
import Antd from 'antd-tiny-vue'
|
||||
|
||||
import AntdTheme from '../components/demo.vue'
|
||||
export default {
|
||||
...DefaultTheme,
|
||||
enhanceApp(ctx) {
|
||||
async enhanceApp(ctx) {
|
||||
DefaultTheme.enhanceApp?.(ctx)
|
||||
ctx.app.component('Demo', AntdTheme)
|
||||
ctx.app.use(Antd)
|
||||
// @ts-expect-error this is a local module
|
||||
if (!import.meta.env.SSR) {
|
||||
// @ts-expect-error this is a local module
|
||||
const Antd = (await import('antd-tiny-vue')).default
|
||||
ctx.app.use(Antd)
|
||||
}
|
||||
}
|
||||
} as Theme
|
||||
|
@ -20,7 +20,6 @@ const genSharedButtonStyle: GenerateStyle<ButtonToken, CSSObject> = (
|
||||
token
|
||||
): CSSObject => {
|
||||
const { componentCls, iconCls } = token
|
||||
|
||||
return {
|
||||
[componentCls]: {
|
||||
outline: 'none',
|
||||
|
@ -1,6 +1,7 @@
|
||||
{
|
||||
"name": "antd-tiny-vue",
|
||||
"version": "1.0.0",
|
||||
"packageManager": "pnpm@8.2.0",
|
||||
"description": "this is a tiny antd components for vue3",
|
||||
"keywords": [
|
||||
"antd",
|
||||
@ -20,12 +21,11 @@
|
||||
"build:site": "vitepress build",
|
||||
"preview": "vitepress preview"
|
||||
},
|
||||
"packageManager": "pnpm@8.2.0",
|
||||
"dependencies": {
|
||||
"@ant-design/colors": "^7.0.0",
|
||||
"@antd-tiny-vue/cssinjs": "^0.0.4",
|
||||
"@antd-tiny-vue/cssinjs": "0.0.8",
|
||||
"@ctrl/tinycolor": "^3.6.0",
|
||||
"@v-c/utils": "^0.0.19",
|
||||
"@v-c/utils": "^0.0.22",
|
||||
"@vueuse/core": "^9.13.0",
|
||||
"vue": "^3.2.47"
|
||||
},
|
||||
@ -44,7 +44,7 @@
|
||||
"typescript": "^4.9.5",
|
||||
"unbuild": "^1.1.2",
|
||||
"vite": "^4.2.1",
|
||||
"vite-plugin-vitepress-demo": "2.0.0-beta.28",
|
||||
"vite-plugin-vitepress-demo": "2.0.0-beta.29",
|
||||
"vitepress": "1.0.0-alpha.69",
|
||||
"vitest": "^0.28.5"
|
||||
},
|
||||
|
921
pnpm-lock.yaml
921
pnpm-lock.yaml
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user