Skip to content

Commit dcf7133

Browse files
committed
change name: configuration->option
1 parent 0e913f4 commit dcf7133

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+122
-97
lines changed

examples/src/docs/en/ve-contextmenu/api.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,21 +2,21 @@
22

33
### props
44

5-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
6-
| ----------- | ---------------------------------------------- | -------- | ------- | ------ | --- |
7-
| eventTarget | 设置右键菜单作用的元素 | `Element | String` | - | - |
8-
| options | 右键菜单项。支持无限层级树形结构,具体结构如下 | `Array` | - | - |
5+
| Property | Description | Type | Optional value | Default |
6+
| ----------- | ---------------------------------------------------------------------------------------- | ------------ | -------------- | ------- | --- |
7+
| eventTarget | Sets the element triggered by the contextmenu event | `HTMLElement | String` | - | - |
8+
| options | menu item.It supports infinite hierarchical tree structure. The structure is as follows: | `Array` | - | - |
99

1010
### options
1111

12-
| 参数 | 说明 | 类型 | 可选值 | 默认值 |
13-
| -------- | --------------------------------------------------------------- | -------- | ------ | ------ |
14-
| label | 展示的菜单名称 | `String` | - | - |
15-
| type | 菜单类型,内置分隔符类型为‘separator’。将会作为点击后回调的参数 | `String` | - | - |
16-
| disabled | 禁用当前菜单,点击无效 | `String` | - | - |
12+
| Property | Description | Type | Optional value | Default |
13+
| -------- | ------------------------------------------------------------------------------------------------------------------ | -------- | -------------- | ------- |
14+
| label | Displayed menu name | `String` | - | - |
15+
| type | contextmenu item type,The split line through ‘SEPARATOR’。It will be used as a parameter for callback after cliked | `String` | - | - |
16+
| disabled | Disable the current menu, click will be invalid | `String` | - | - |
1717

1818
### Event
1919

20-
| Event Name | Description | Parameters |
21-
| ------------- | ------------ | ------------------ |
22-
| on-node-click | 菜单点击回调 | 当前点击的菜单类型 |
20+
| Event Name | Description | Parameters |
21+
| ------------- | ------------------- | --------------------------- |
22+
| on-node-click | menu click callback | currently clicked menu type |

examples/src/docs/en/ve-contextmenu/base.md

Lines changed: 25 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
:::anchor 基础示例
1+
:::anchor Example
22

3-
:::demo
3+
:::demo Split line by `type=SEPARATOR`
44

55
```html
66
<template>
77
<div>
8-
<div id="contextmenu-container">
9-
<div>右键点击此区域</div>
8+
<div id="contextmenu-target" ref="contextmenuTargetRef">
9+
<div>Right click this area</div>
1010
<div style="font-size:30px;color:red;">{{contextmenuType}}</div>
1111
</div>
1212

1313
<ve-contextmenu
14-
eventTarget="#contextmenu-container"
14+
:eventTarget="eventTarget"
1515
:options="options"
1616
@on-node-click="contextmenuClick"
1717
></ve-contextmenu>
@@ -22,6 +22,7 @@
2222
export default {
2323
data() {
2424
return {
25+
eventTarget: "",
2526
// contextmenu type
2627
contextmenuType: "",
2728
// contextmenu options
@@ -45,7 +46,7 @@
4546
],
4647
},
4748
{
48-
type: "separator",
49+
type: "SEPARATOR",
4950
},
5051
{
5152
label: "menu3",
@@ -57,6 +58,7 @@
5758
children: [
5859
{
5960
label: "menu4-1",
61+
type: "menu4-1-type",
6062
},
6163
],
6264
},
@@ -70,6 +72,7 @@
7072
children: [
7173
{
7274
label: "menu5-1-1",
75+
type: "menu5-1-1-type",
7376
},
7477
{
7578
label: "menu5-2-2",
@@ -82,14 +85,19 @@
8285
disabled: true,
8386
},
8487
{
85-
type: "separator",
88+
type: "SEPARATOR",
8689
},
8790
{
8891
label: "menu5-3",
8992
type: "menu5-3-type",
9093
},
9194
],
9295
},
96+
{
97+
label: "menu6",
98+
type: "menu6-type",
99+
disabled: true,
100+
},
93101
],
94102
};
95103
},
@@ -98,10 +106,19 @@
98106
this.contextmenuType = type;
99107
},
100108
},
109+
mounted() {
110+
/*
111+
eventTarget can be the following case:
112+
1、this.eventTarget = "#contextmenu-target";
113+
2、this.eventTarget = document.querySelector('#contextmenu-target');
114+
3、this.eventTarget = this.$refs["contextmenuTargetRef"];
115+
*/
116+
this.eventTarget = this.$refs["contextmenuTargetRef"];
117+
},
101118
};
102119
</script>
103120
<style>
104-
#contextmenu-container {
121+
#contextmenu-target {
105122
display: flex;
106123
flex-direction: column;
107124
width: 300px;

examples/src/docs/en/ve-contextmenu/main.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div>
3-
<h2>Contextmenu 右键菜单</h2>
3+
<h2>Contextmenu</h2>
44
<Usage />
55
<Base />
66
<Api />

examples/src/docs/en/ve-contextmenu/usage.md

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
:::anchor 使用方法
1+
:::anchor Usage
22

33
引入 `VeContextmenu`
44

@@ -14,14 +14,17 @@ Vue.use(VeContextmenu);
1414
```javascript
1515
<template>
1616
<div>
17-
<div id="contextmenu-container">右键点击此区域</div>
18-
<ve-contextmenu eventTarget="#contextmenu-container" :options="options" />
17+
<div id="contextmenu-target" ref="contextmenuTargetRef">
18+
<div>右键点击此区域</div>
19+
</div>
20+
<ve-contextmenu eventTarget="#contextmenu-target" :options="options" />
1921
</div>
2022
</template>
2123
<script>
2224
export default {
2325
data() {
2426
return {
27+
eventTarget:"",
2528
options: [
2629
[
2730
{
@@ -43,7 +46,7 @@ export default {
4346
],
4447
},
4548
{
46-
type: "separator",
49+
type: "SEPARATOR",
4750
},
4851
{
4952
label: "menu3",
@@ -52,6 +55,15 @@ export default {
5255
],
5356
};
5457
},
58+
mounted() {
59+
/*
60+
eventTarget can be the following case:
61+
1、this.eventTarget = "#contextmenu-target";
62+
2、this.eventTarget = document.querySelector('#contextmenu-target');
63+
3、this.eventTarget = this.$refs["contextmenuTargetRef"];
64+
*/
65+
this.eventTarget = this.$refs["contextmenuTargetRef"];
66+
},
5567
};
5668
</script>
5769
```

examples/src/docs/en/ve-pagination/api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
| pageIndex | Current page number | `Number` | - | 1 |
1010
| pagingCount | The number of buttons in the middle of forward 5 pages and backward 5 pages | `Number` | - | 5 |
1111
| pageSize | Page size | `Number` | - | 10 |
12-
| pageSizeOption | Per page size drop-down configuration | `Array` | - | [10, 20, 30] |
12+
| pageSizeOption | Per page size drop-down option | `Array` | - | [10, 20, 30] |
1313

1414
### Event
1515

examples/src/docs/en/ve-pagination/layout-settings.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
:::anchor Layout Settings
22

3-
:::demo 1、Change the layout by setting the `layout` property.<br>2、The `layout` property supports the following configuration items:<br>`total`:Display total number、`prev`:Show previous button、`pager`:Show page number button、`next`:Show next page button、`sizer`:Show per page size settings、`jumper`:Show goto input
3+
:::demo 1、Change the layout by setting the `layout` property.<br>2、The `layout` property supports the following option items:<br>`total`:Display total number、`prev`:Show previous button、`pager`:Show page number button、`next`:Show next page button、`sizer`:Show per page size settings、`jumper`:Show goto input
44

55
```html
66
<template>

examples/src/docs/en/ve-pagination/paging-configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
:::anchor Paging Configuration
2-
:::demo `pageSizeOption` set paging size drop-down configuration
2+
:::demo `pageSizeOption` set paging size drop-down option
33

44
```html
55
<template>

examples/src/docs/en/ve-table/api/cell-selection-option-props.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
props: {
1717
anchor: {
1818
type: String,
19-
default: "Cell selection configuration",
19+
default: "Cell selection option",
2020
},
2121
desc: {
2222
type: String,

examples/src/docs/en/ve-table/api/cell-span-option-props.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
props: {
1717
anchor: {
1818
type: String,
19-
default: "Cell merge configuration",
19+
default: "Cell merge option",
2020
},
2121
desc: {
2222
type: String,

examples/src/docs/en/ve-table/api/cell-style-option-props.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export default {
1616
props: {
1717
anchor: {
1818
type: String,
19-
default: "Cell style configuration",
19+
default: "Cell style option",
2020
},
2121
desc: {
2222
type: String,

0 commit comments

Comments
 (0)