Skip to content

Commit d9722d1

Browse files
committed
chore: refine issue form and readme
1 parent bb9540b commit d9722d1

File tree

4 files changed

+28
-12
lines changed

4 files changed

+28
-12
lines changed

.github/ISSUE_TEMPLATE/bug-report.en-US.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ body:
4040
id: repro
4141
attributes:
4242
label: Reproduction
43-
description: "A link to a boiled-down reproduction (a minimal but runnable demo with unnecessary dependencies pruned). Please paste the link to your CodeSandbox demo below: ([Vue 3 template](https://codesandbox.io/s/charming-night-2y6m6?file=/src/App.vue) / [Vue 2 template](https://codesandbox.io/s/suspicious-glitter-mk66j?file=/src/App.vue))"
43+
description: "A link to a boiled-down reproduction (a minimal but runnable demo with unnecessary dependencies pruned). If the issue isn't reproducible within an online playground, please create a GitHub repo to reflect the problem. Please paste the link to your CodeSandbox demo or GitHub repo below: ([Vue 3 template](https://codesandbox.io/s/charming-night-2y6m6?file=/src/App.vue) / [Vue 2 template](https://codesandbox.io/s/suspicious-glitter-mk66j?file=/src/App.vue))"
4444
validations:
4545
required: true

.github/ISSUE_TEMPLATE/bug-report.zh-Hans.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@ body:
4040
id: repro
4141
attributes:
4242
label: 问题复现
43-
description: "请提供一个精炼的问题复现(去除无关依赖的最小化可运行 demo)。 Plea请在下方贴入在 CodeSandbox 上 demo 的链接:([Vue 3 模板](https://codesandbox.io/s/charming-night-2y6m6?file=/src/App.vue) / [Vue 2 模板](https://codesandbox.io/s/suspicious-glitter-mk66j?file=/src/App.vue))"
43+
description: "请提供一个精炼的问题复现(去除无关依赖的最小化可运行 demo)。如果在线环境无法复现,可以创建对应的 GitHub repo 来提供复现环境。请在下方贴入在 CodeSandbox 上 demo 的链接或 GitHub repo 链接:([Vue 3 模板](https://codesandbox.io/s/charming-night-2y6m6?file=/src/App.vue) / [Vue 2 模板](https://codesandbox.io/s/suspicious-glitter-mk66j?file=/src/App.vue))"
4444
validations:
4545
required: true

README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,21 @@ Not ready yet? Read documentation for older versions [here →](https://github.c
2020
$ npm install echarts vue-echarts
2121
```
2222

23-
To make `vue-echarts` work for Vue 2, you need to have `@vue/composition-api` installed:
23+
To make `vue-echarts` work for *Vue 2*, you need to have `@vue/composition-api` installed:
2424

2525
```sh
2626
npm i -D @vue/composition-api
2727
```
2828

29-
<details open>
29+
If you are using *NuxtJS* on top of *Vue 2*, you'll also need `@nuxtjs/composition-api`:
30+
31+
```sh
32+
npm i -D @nuxtjs/composition-api
33+
```
34+
35+
And then add `'@nuxtjs/composition-api/module'` in the `buildModules` option in your `nuxt.config.js`.
36+
37+
<details>
3038
<summary>Vue 3</summary>
3139

3240
```js
@@ -108,7 +116,7 @@ import "echarts";
108116

109117
#### SFC example
110118

111-
<details open>
119+
<details>
112120
<summary>Vue 3</summary>
113121

114122
```vue
@@ -299,7 +307,7 @@ export default {
299307

300308
Drop `<script>` inside your HTML file and access the component via `window.VueECharts`.
301309

302-
<details open>
310+
<details>
303311
<summary>Vue 3</summary>
304312

305313
<!-- vue3Scripts:start -->
@@ -402,7 +410,7 @@ See more examples [here](https://github.com/ecomfe/vue-echarts/tree/main/src/dem
402410

403411
Vue-ECharts provides provide/inject API for `theme`, `init-options`, `update-options` and `loading-options` to help configuring contextual options. eg. for `init-options` you can use the provide API like this:
404412

405-
<details open>
413+
<details>
406414
<summary>Vue 3</summary>
407415

408416
```js

README.zh-Hans.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,21 @@
1818
$ npm install echarts vue-echarts
1919
```
2020

21-
要在 Vue 2 下使用 `vue-echarts`,需要确保 `@vue/composition-api` 已经安装:
21+
要在 *Vue 2* 下使用 `vue-echarts`,需要确保 `@vue/composition-api` 已经安装:
2222

2323
```sh
2424
npm i -D @vue/composition-api
2525
```
2626

27-
<details open>
27+
如果你在使用基于 *Vue 2**NuxtJS*,那么还需要安装 `@nuxtjs/composition-api`
28+
29+
```sh
30+
npm i -D @nuxtjs/composition-api
31+
```
32+
33+
然后在 `nuxt.config.js``buildModules` 选项中添加 `'@nuxtjs/composition-api/module'`
34+
35+
<details>
2836
<summary>Vue 3</summary>
2937

3038
```js
@@ -106,7 +114,7 @@ import "echarts";
106114

107115
#### 单文件组件示例
108116

109-
<details open>
117+
<details>
110118
<summary>Vue 3</summary>
111119

112120
```vue
@@ -293,7 +301,7 @@ export default {
293301

294302
用如下方式在 HTML 中插入 `<script>` 标签,并且通过 `window.VueECharts` 来访问组件接口:
295303

296-
<details open>
304+
<details>
297305
<summary>Vue 3</summary>
298306

299307
<!-- vue3Scripts:start -->
@@ -392,7 +400,7 @@ Vue.component("v-chart", VueECharts);
392400

393401
Vue-ECharts 为 `theme``init-options``update-options``loading-options` 提供了 provide/inject API,以通过上下文配置选项。例如:可以通过如下方式来使用 provide API 为 `init-options` 提供上下文配置:
394402

395-
<details open>
403+
<details>
396404
<summary>Vue 3</summary>
397405

398406
```js

0 commit comments

Comments
 (0)