Skip to content

Commit

Permalink
fix: vitepress issue vuejs/vitepress#476 (comment)
Browse files Browse the repository at this point in the history
  • Loading branch information
Zimomo333 committed Jun 5, 2022
1 parent ae5eaed commit ba7d0af
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
6 changes: 2 additions & 4 deletions docs/components/progress.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,10 +96,8 @@ Progress 组件可通过 `stroke-width` 属性更改进度条的高度,并可

<template>
<ur-progress class="progress" type="circle" :percentage="percentage"></ur-progress>
<ur-button-group>
<ur-button @click="decrease">减</ur-button>
<ur-button @click="increase">加</ur-button>
</ur-button-group>
<ur-button @click="decrease">减</ur-button>
<ur-button @click="increase">加</ur-button>
</template>

<script>
Expand Down
5 changes: 5 additions & 0 deletions docs/vite.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,11 @@ export default defineConfig({
vue: "vue/dist/vue.esm-bundler.js",
},
},
ssr: {
// 解决:SyntaxError: Cannot use import statement outside a module
// https://github.com/vuejs/vitepress/issues/476
noExternal: ['unreal-ui-next']
},
// plugins: [
// // 按需导入组件样式
// // styleImport({
Expand Down
6 changes: 2 additions & 4 deletions src/components/progress.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@
<!-- <ur-progress class="progress" percentage="40" :color="customColor"></ur-progress> -->

<ur-progress class="progress" type="circle" color="#18634b" :percentage="percentage"></ur-progress>
<ur-button-group>
<ur-button style="margin: 0 .5rem 0 1rem;" @click="decrease">减</ur-button>
<ur-button @click="increase">加</ur-button>
</ur-button-group>
<ur-button style="margin: 0 .5rem 0 1rem;" @click="decrease">减</ur-button>
<ur-button @click="increase">加</ur-button>
</div>
</template>

Expand Down

0 comments on commit ba7d0af

Please sign in to comment.