Skip to content

Commit

Permalink
fix: 修复打包错误问题
Browse files Browse the repository at this point in the history
  • Loading branch information
laizuan committed Jul 26, 2024
1 parent 7e80f3e commit d023e99
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 19 deletions.
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,15 @@
"version": "1.0.0",
"main": "index.js",
"license": "MIT",
"type": "module",
"scripts": {
"docs:dev": "vitepress dev src",
"docs:build": "vitepress build src",
"docs:preview": "vitepress preview src"
},
"dependencies": {
"element-next": "^1.50.0",
"vue": "^3.4.21",
"element-plus": "npm:@lhrdc/element-plus@2.7.6-stable.1"
},
"devDependencies": {
Expand All @@ -20,8 +22,8 @@
"prettier": "^3.3.3",
"vitepress": "1.3.1",
"vitepress-plugin-mermaid": "^2.0.16",
"vitepress-theme-demoblock": "^3.0.7",
"vue": "^3.4.21"
"vitepress-theme-demoblock": "^3.0.7"

},
"engines": {
"node": ">=18.0.0"
Expand Down
6 changes: 3 additions & 3 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions src/.vitepress/config.mts
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,9 @@ export default defineConfig({
}
},
vite: {
ssr: {
noExternal: ["element-next"],
},
plugins: [demoblockVitePlugin()]
},
markdown: {
Expand Down
7 changes: 3 additions & 4 deletions src/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,16 @@
// https://vitepress.dev/guide/custom-theme
import { h } from 'vue'
import type { Theme } from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'
import 'vitepress-theme-demoblock/dist/theme/styles/index.css'
import { useComponents } from './useComponents'

import ElementPlus from 'element-plus'
import ElementNext from 'element-next'
import ElementNext from 'element-next'
import 'element-plus/dist/index.css'
import 'element-next/lib/styles/index.css'
import zhCn from 'element-plus/es/locale/lang/zh-cn'
import { zhCn as nextZhcn } from 'element-next/lib/lang/index';
import nextZhcn from 'element-next/lib/lang/zh-cn'

export default {
extends: DefaultTheme,
Expand All @@ -26,4 +25,4 @@ export default {
ctx.app.use(ElementPlus, {locale: {...nextZhcn, ...zhCn}})
ctx.app.use(ElementNext )
}
} satisfies Theme
}
11 changes: 1 addition & 10 deletions src/web/components/description.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@ meta:
</div>
</template>
<script>
<script setup>
import { h } from 'vue'
export default {
setup() {
const mockData = {
username: 'test',
nickName: 'testNick',
Expand Down Expand Up @@ -156,18 +154,11 @@ export default {
],
},
]
return {
mockData,
schema,
}
},
}
</script>
<style>
.decoration-dome {
padding: 16px;
width: 100%;
// background-color: var(--el-bg-color-page);
}
.decoration-dome .w-120 {
width: 120px !important;
Expand Down

0 comments on commit d023e99

Please sign in to comment.