Skip to content

Commit 28d2707

Browse files
committed
docs: fix ant dropdown in built docs
1 parent b715e52 commit 28d2707

File tree

9 files changed

+2019
-736
lines changed

9 files changed

+2019
-736
lines changed

.gitignore

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
11
.vscode
22
node_modules
3-
dist
3+
dist
4+
5+
vitepress-test
6+
vuepress-test

ant/src/components/CustomSelect.vue

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313

1414
<template #overlay>
1515
<a-menu multiple :selectedKeys="Array.isArray(modelValue) ? modelValue : [modelValue]">
16-
<a-row class="vcron-a-row" type="flex" v-for="(itemRow, i) in itemRows" :key="i">
17-
<a-col class="vcron-a-col" :flex="1" v-for="(item, j) in itemRow" :key="j">
16+
<div class="vcron-a-row" type="flex" v-for="(itemRow, i) in itemRows" :key="i">
17+
<div class="vcron-a-col" :flex="1" v-for="(item, j) in itemRow" :key="j">
1818
<a-menu-item v-if="item" :key="item[itemValue]" @click="select(item); updateVisibility();">{{item.text}}</a-menu-item>
1919
<a-menu-item v-else></a-menu-item>
20-
</a-col>
21-
</a-row>
20+
</div>
21+
</div>
2222
</a-menu>
2323
</template>
2424

@@ -71,11 +71,12 @@ export default {
7171
<style scoped>
7272
7373
.vcron-a-row {
74-
flex-wrap: nowrap !important;
74+
display: flex;
75+
flex-wrap: nowrap;
7576
}
7677
7778
.vcron-a-col {
78-
flex-basis: 100% !important;
79+
flex-basis: 100%;
7980
min-width: 0;
8081
text-align: center;
8182
}

docs/package.json

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,20 +12,17 @@
1212
"scripts": {
1313
"dev": "vuepress dev src",
1414
"build": "vuepress build src",
15-
"clean": "git clean -xf src/.vuepress/dist"
15+
"clean": "git clean -xf src/.vuepress/dist src/.vuepress/.temp src/.vuepress/.cache"
1616
},
1717
"license": "MIT",
1818
"devDependencies": {
19-
"@vuepress/plugin-google-analytics": "^2.0.0-beta.49",
20-
"@vuepress/plugin-register-components": "^2.0.0-beta.49",
21-
"vuepress": "^2.0.0-beta.49"
22-
},
23-
"dependencies": {
24-
"@vue-js-cron/core": "^3.0.0",
25-
"@vue-js-cron/element-plus": "^1.0.0",
26-
"@vue-js-cron/light": "^2.0.0",
27-
"@vue-js-cron/vuetify": "^3.0.0",
28-
"@vue-js-cron/ant": "^1.0.0",
29-
"vuetify": "^3.0.0-beta.7"
19+
"@vue-js-cron/ant": "file:../ant",
20+
"@vue-js-cron/core": "file:../core",
21+
"@vue-js-cron/element-plus": "file:../element-plus",
22+
"@vue-js-cron/light": "file:../light",
23+
"@vue-js-cron/vuetify": "file:../vuetify",
24+
"@vuepress/plugin-register-components": "2.0.0-beta.51",
25+
"@vuepress/plugin-google-analytics": "2.0.0-beta.51",
26+
"vuepress": "2.0.0-beta.51"
3027
}
3128
}

docs/src/.vuepress/client.js

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -10,24 +10,28 @@ import '@vue-js-cron/vuetify/dist/vuetify.css'
1010

1111
import { createVuetify } from 'vuetify'
1212
import * as components from 'vuetify/components'
13+
import * as directives from 'vuetify/directives'
1314
import 'vuetify/styles'
1415

1516
import ElementPlus from 'element-plus'
1617
import 'element-plus/dist/index.css'
1718

1819
import Ant from 'ant-design-vue'
20+
// import 'ant-design-vue/dist/antd.css'
1921
import '../styles/antd.css'
2022

2123
import { defineClientConfig } from '@vuepress/client'
2224

2325
import { variables } from './vars'
2426

25-
const vuetify = createVuetify({
26-
components
27-
})
28-
2927
export default defineClientConfig({
3028
enhance ({ app, router, siteData }) {
29+
const vuetify = createVuetify({
30+
components,
31+
directives,
32+
ssr: true
33+
})
34+
3135
app.use(vuetify)
3236
app.use(ElementPlus)
3337
app.use(Ant)
@@ -48,16 +52,3 @@ export default defineClientConfig({
4852
setup () {},
4953
rootComponents: []
5054
})
51-
52-
// export default ({
53-
// Vue, // the version of Vue being used in the VuePress app
54-
// options, // the options for the root Vue instance
55-
// router, // the router instance for the app
56-
// siteData // site metadata
57-
// }) => {
58-
// Vue.use(Vuetify)
59-
// options.vuetify = new Vuetify({})
60-
// Vue.use(CronCore)
61-
// Vue.use(CronVuetify)
62-
// Vue.use(CronLight)
63-
// }

docs/src/.vuepress/config.js

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
const { description } = require('../../package')
2-
const { defaultTheme } = require('@vuepress/theme-default')
3-
const { registerComponentsPlugin } = require('@vuepress/plugin-register-components')
4-
const { path } = require('@vuepress/utils')
5-
const { viteBundler } = require('@vuepress/bundler-vite')
6-
const { googleAnalyticsPlugin } = require('@vuepress/plugin-google-analytics')
1+
import { googleAnalyticsPlugin } from '@vuepress/plugin-google-analytics'
2+
import { registerComponentsPlugin } from '@vuepress/plugin-register-components'
3+
import { defaultTheme } from '@vuepress/theme-default'
4+
import { path } from '@vuepress/utils'
5+
import { defineUserConfig, viteBundler } from 'vuepress'
6+
import { description } from '../../package'
77

8-
module.exports = {
8+
export default defineUserConfig({
99

1010
/**
1111
* Ref: https://v2.vuepress.vuejs.org/guide/configuration.html#config-file
@@ -112,7 +112,7 @@ module.exports = {
112112
// https://github.com/vuepress/vuepress-next/issues/585#issuecomment-1046188074
113113
// https://v2.vuepress.vuejs.org/reference/bundler/vite.html#ssr-externals-issue
114114
ssr: {
115-
noExternal: ['vuetify', 'ant-design-vue']
115+
noExternal: ['vuetify', '@vue-js-cron/core']
116116
}
117117
},
118118
vuePluginOptions: {}
@@ -133,4 +133,4 @@ module.exports = {
133133
id: 'G-8E2WXHH0QS'
134134
})
135135
]
136-
}
136+
})

0 commit comments

Comments
 (0)