Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Fix misspelling #383

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
huangshuwei merged 1 commit into Happy-Coding-Clans:master from hoyo:fix-checkbox-option
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions examples/src/demo/index.vue
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
:cell-style-option="cellStyleOption"
:expand-option="expandOption"
:radio-option="radioOption"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
<!-- <Footer /> -->
Expand Down Expand Up @@ -151,7 +151,7 @@ export default {
//console.log(row);
}
},
checkboxOptipon: {
checkboxOption: {
// row select change event
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
//console.log(row, isSelected, selectedRowKeys);
Expand Down
4 changes: 2 additions & 2 deletions examples/src/docs/en/ve-table/row-checkbox/base.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// row select change event
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
Expand Down
2 changes: 1 addition & 1 deletion examples/src/docs/en/ve-table/row-checkbox/explain.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:::tip
1、Enable the multi selection function through the `checkboxoptipon` attribute<br>
1、Enable the multi selection function through the `checkboxOption` attribute<br>
2、By setting `type=checkbox` in `columns` as a multiple selection column<br>
3、The `rowKeyFieldName` property must be set<br>
4、`selectedRowChange` is row change event. The event receives 3 parameters,`row`:Current row data,`isSelected`Whether the current row is selected,`selectedRowKeys` all the selected rowkeys.<br>
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
hideSelectAll: true,
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
Expand Down
4 changes: 2 additions & 2 deletions examples/src/docs/en/ve-table/row-checkbox/selected-column.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
Expand Down
12 changes: 6 additions & 6 deletions examples/src/docs/en/ve-table/row-checkbox/selected-control.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -24,7 +24,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
Expand Down Expand Up @@ -93,11 +93,11 @@
methods: {
// 给可控属性重新赋值
changeSelectedRowKeys(keys) {
this.checkboxOptipon.selectedRowKeys = keys;
this.checkboxOption.selectedRowKeys = keys;
},
// 切换选中行
selectedSwitch(key) {
let selectedRowKeys = this.checkboxOptipon.selectedRowKeys;
let selectedRowKeys = this.checkboxOption.selectedRowKeys;

const rowKeyIndex = selectedRowKeys.indexOf(key);

Expand All @@ -109,11 +109,11 @@
},
// 选中全部
selectedAll() {
this.checkboxOptipon.selectedRowKeys = this.tableData.map((x) => x.rowKey);
this.checkboxOption.selectedRowKeys = this.tableData.map((x) => x.rowKey);
},
// 取消选中全部
unselectedAll() {
this.checkboxOptipon.selectedRowKeys = [];
this.checkboxOption.selectedRowKeys = [];
},
},
};
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
defaultSelectedRowKeys: [1001, 1003, 1004],
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 禁用的选择(禁止勾选或者禁止取消勾选)
disableSelectedRowKeys: [1002, 1005],
// 默认选择
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ This example is row click trigger selection. You can also achieve column click s
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
:event-custom-option="eventCustomOption"
/>
</div>
Expand All @@ -31,7 +31,7 @@ This example is row click trigger selection. You can also achieve column click s
};
},
},
checkboxOptipon: {
checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
Expand Down Expand Up @@ -98,11 +98,11 @@ This example is row click trigger selection. You can also achieve column click s
methods: {
// 给可控属性重新赋值
changeSelectedRowKeys(keys) {
this.checkboxOptipon.selectedRowKeys = keys;
this.checkboxOption.selectedRowKeys = keys;
},
// 行点击触发
changeSelectedRowKeysByRowClick(currentRowKey) {
const { selectedRowKeys } = this.checkboxOptipon;
const { selectedRowKeys } = this.checkboxOption;

if (selectedRowKeys.includes(currentRowKey)) {
const rowKeyIndex = selectedRowKeys.indexOf(currentRowKey);
Expand Down
2 changes: 1 addition & 1 deletion examples/src/docs/en/ve-table/row-radio/explain.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:::tip
1、Use the `radioOptipon` attribute to enable the row radio.<br>
1、Use the `radioOption` attribute to enable the row radio.<br>
2、Set `type=radio` in `columns` as a radio column<br>
3、The `rowKeyFieldName` property must be set<br>
4、`Selectedrowchange` is row change event.Event receives 1 parameter,`row`:current row data
Expand Down
4 changes: 2 additions & 2 deletions examples/src/docs/en/ve-table/virtual-scroll/row-checkbox.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
fixed-header
:max-height="500"
:virtual-scroll-option="virtualScrollOption"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
Expand All @@ -25,7 +25,7 @@
// 是否开启
enable: true,
},
checkboxOptipon: {
checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
Expand Down
4 changes: 2 additions & 2 deletions examples/src/docs/zh/ve-table/row-checkbox/base.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
Expand Down
2 changes: 1 addition & 1 deletion examples/src/docs/zh/ve-table/row-checkbox/explain.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:::tip
1、通过 `checkboxOptipon` 属性开启多选功能。<br>
1、通过 `checkboxOption` 属性开启多选功能。<br>
2、通过在`columns` 设置`type=checkbox`作为多选的列<br>
3、设置`rowKeyFieldName`属性对应行数据的列名<br>
4、`selectedRowChange`行改变事件。事件接收 3 个参数,`row`:当前行数据,`isSelected`当前行是否选中,`selectedRowKeys`所有选中的 rowkey 信息。<br>
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
hideSelectAll: true,
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
Expand Down
4 changes: 2 additions & 2 deletions examples/src/docs/zh/ve-table/row-checkbox/selected-column.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
Expand Down
12 changes: 6 additions & 6 deletions examples/src/docs/zh/ve-table/row-checkbox/selected-control.md
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -24,7 +24,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
Expand Down Expand Up @@ -93,11 +93,11 @@
methods: {
// 给可控属性重新赋值
changeSelectedRowKeys(keys) {
this.checkboxOptipon.selectedRowKeys = keys;
this.checkboxOption.selectedRowKeys = keys;
},
// 切换选中行
selectedSwitch(key) {
let selectedRowKeys = this.checkboxOptipon.selectedRowKeys;
let selectedRowKeys = this.checkboxOption.selectedRowKeys;

const rowKeyIndex = selectedRowKeys.indexOf(key);

Expand All @@ -109,11 +109,11 @@
},
// 选中全部
selectedAll() {
this.checkboxOptipon.selectedRowKeys = this.tableData.map((x) => x.rowKey);
this.checkboxOption.selectedRowKeys = this.tableData.map((x) => x.rowKey);
},
// 取消选中全部
unselectedAll() {
this.checkboxOptipon.selectedRowKeys = [];
this.checkboxOption.selectedRowKeys = [];
},
},
};
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
defaultSelectedRowKeys: [1001, 1003, 1004],
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
/>
</div>
</template>
Expand All @@ -19,7 +19,7 @@
export default {
data() {
return {
checkboxOptipon: {
checkboxOption: {
// 禁用的选择(禁止勾选或者禁止取消勾选)
disableSelectedRowKeys: [1002, 1005],
// 默认选择
Expand Down
View file Open in desktop
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
:checkbox-optipon="checkboxOptipon"
:checkbox-option="checkboxOption"
:event-custom-option="eventCustomOption"
/>
</div>
Expand All @@ -31,7 +31,7 @@
};
},
},
checkboxOptipon: {
checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
Expand Down Expand Up @@ -98,11 +98,11 @@
methods: {
// 给可控属性重新赋值
changeSelectedRowKeys(keys) {
this.checkboxOptipon.selectedRowKeys = keys;
this.checkboxOption.selectedRowKeys = keys;
},
// 行点击触发
changeSelectedRowKeysByRowClick(currentRowKey) {
const { selectedRowKeys } = this.checkboxOptipon;
const { selectedRowKeys } = this.checkboxOption;

if (selectedRowKeys.includes(currentRowKey)) {
const rowKeyIndex = selectedRowKeys.indexOf(currentRowKey);
Expand Down
2 changes: 1 addition & 1 deletion examples/src/docs/zh/ve-table/row-radio/explain.md
View file Open in desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
:::tip
1、通过 `radioOptipon` 属性开启单选功能。<br>
1、通过 `radioOption` 属性开启单选功能。<br>
2、通过在`columns` 设置`type=radio`作为单选的列<br>
3、设置`rowKeyFieldName`属性对应行数据的列名<br>
4、`selectedRowChange`行改变事件。事件接收 1 个参数,`row`:当前行数据
Expand Down
Loading

AltStyle によって変換されたページ (->オリジナル) /