diff --git a/examples/src/demo/index.vue b/examples/src/demo/index.vue
index 89b487a16..ddc7525bc 100644
--- a/examples/src/demo/index.vue
+++ b/examples/src/demo/index.vue
@@ -93,7 +93,7 @@
:cell-style-option="cellStyleOption"
:expand-option="expandOption"
:radio-option="radioOption"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -151,7 +151,7 @@ export default {
//console.log(row);
}
},
- checkboxOptipon: {
+ checkboxOption: {
// row select change event
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
//console.log(row, isSelected, selectedRowKeys);
diff --git a/examples/src/docs/en/ve-table/row-checkbox/base.md b/examples/src/docs/en/ve-table/row-checkbox/base.md
index 47e2dcb0b..d107a3439 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/base.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/base.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// row select change event
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
diff --git a/examples/src/docs/en/ve-table/row-checkbox/explain.md b/examples/src/docs/en/ve-table/row-checkbox/explain.md
index a7e153219..470ab6a5f 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/explain.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/explain.md
@@ -1,5 +1,5 @@
:::tip
-1、Enable the multi selection function through the `checkboxoptipon` attribute
+1、Enable the multi selection function through the `checkboxOption` attribute
2、By setting `type=checkbox` in `columns` as a multiple selection column
3、The `rowKeyFieldName` property must be set
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.
diff --git a/examples/src/docs/en/ve-table/row-checkbox/selected-all-hide.md b/examples/src/docs/en/ve-table/row-checkbox/selected-all-hide.md
index 86e992657..8911c1007 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/selected-all-hide.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/selected-all-hide.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
hideSelectAll: true,
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
diff --git a/examples/src/docs/en/ve-table/row-checkbox/selected-column.md b/examples/src/docs/en/ve-table/row-checkbox/selected-column.md
index f25a74f1a..455ee657a 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/selected-column.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/selected-column.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
diff --git a/examples/src/docs/en/ve-table/row-checkbox/selected-control.md b/examples/src/docs/en/ve-table/row-checkbox/selected-control.md
index 5b506d24e..25d8ac9b7 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/selected-control.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/selected-control.md
@@ -15,7 +15,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -24,7 +24,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
@@ -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);
@@ -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 = [];
},
},
};
diff --git a/examples/src/docs/en/ve-table/row-checkbox/selected-default.md b/examples/src/docs/en/ve-table/row-checkbox/selected-default.md
index 57c568abb..a6894f33e 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/selected-default.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/selected-default.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
defaultSelectedRowKeys: [1001, 1003, 1004],
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
diff --git a/examples/src/docs/en/ve-table/row-checkbox/selected-disable.md b/examples/src/docs/en/ve-table/row-checkbox/selected-disable.md
index 9b0a06a49..a53ac9996 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/selected-disable.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/selected-disable.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 禁用的选择(禁止勾选或者禁止取消勾选)
disableSelectedRowKeys: [1002, 1005],
// 默认选择
diff --git a/examples/src/docs/en/ve-table/row-checkbox/selected-row-click.md b/examples/src/docs/en/ve-table/row-checkbox/selected-row-click.md
index 6de43cce0..1cc397ef1 100644
--- a/examples/src/docs/en/ve-table/row-checkbox/selected-row-click.md
+++ b/examples/src/docs/en/ve-table/row-checkbox/selected-row-click.md
@@ -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"
/>
@@ -31,7 +31,7 @@ This example is row click trigger selection. You can also achieve column click s
};
},
},
- checkboxOptipon: {
+ checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
@@ -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);
diff --git a/examples/src/docs/en/ve-table/row-radio/explain.md b/examples/src/docs/en/ve-table/row-radio/explain.md
index 1c296c81c..5def32ba5 100644
--- a/examples/src/docs/en/ve-table/row-radio/explain.md
+++ b/examples/src/docs/en/ve-table/row-radio/explain.md
@@ -1,5 +1,5 @@
:::tip
-1、Use the `radioOptipon` attribute to enable the row radio.
+1、Use the `radioOption` attribute to enable the row radio.
2、Set `type=radio` in `columns` as a radio column
3、The `rowKeyFieldName` property must be set
4、`Selectedrowchange` is row change event.Event receives 1 parameter,`row`:current row data
diff --git a/examples/src/docs/en/ve-table/virtual-scroll/row-checkbox.md b/examples/src/docs/en/ve-table/virtual-scroll/row-checkbox.md
index fc8e265ce..8c34d1fcc 100644
--- a/examples/src/docs/en/ve-table/virtual-scroll/row-checkbox.md
+++ b/examples/src/docs/en/ve-table/virtual-scroll/row-checkbox.md
@@ -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"
@@ -25,7 +25,7 @@
// 是否开启
enable: true,
},
- checkboxOptipon: {
+ checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/base.md b/examples/src/docs/zh/ve-table/row-checkbox/base.md
index 8f7e3b16a..ed0b35a2a 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/base.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/base.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/explain.md b/examples/src/docs/zh/ve-table/row-checkbox/explain.md
index 41f7e29ff..8f6c238fd 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/explain.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/explain.md
@@ -1,5 +1,5 @@
:::tip
-1、通过 `checkboxOptipon` 属性开启多选功能。
+1、通过 `checkboxOption` 属性开启多选功能。
2、通过在`columns` 设置`type=checkbox`作为多选的列
3、设置`rowKeyFieldName`属性对应行数据的列名
4、`selectedRowChange`行改变事件。事件接收 3 个参数,`row`:当前行数据,`isSelected`当前行是否选中,`selectedRowKeys`所有选中的 rowkey 信息。
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/selected-all-hide.md b/examples/src/docs/zh/ve-table/row-checkbox/selected-all-hide.md
index 89cb97ab1..436a98c06 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/selected-all-hide.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/selected-all-hide.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
hideSelectAll: true,
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/selected-column.md b/examples/src/docs/zh/ve-table/row-checkbox/selected-column.md
index 4aaad9f18..92ef56462 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/selected-column.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/selected-column.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/selected-control.md b/examples/src/docs/zh/ve-table/row-checkbox/selected-control.md
index 99de52a5e..44d6b4b80 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/selected-control.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/selected-control.md
@@ -15,7 +15,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -24,7 +24,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
@@ -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);
@@ -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 = [];
},
},
};
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/selected-default.md b/examples/src/docs/zh/ve-table/row-checkbox/selected-default.md
index d088c18e5..feddd0cb0 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/selected-default.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/selected-default.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
defaultSelectedRowKeys: [1001, 1003, 1004],
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/selected-disable.md b/examples/src/docs/zh/ve-table/row-checkbox/selected-disable.md
index 9378c5d0a..0407593d2 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/selected-disable.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/selected-disable.md
@@ -10,7 +10,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
/>
@@ -19,7 +19,7 @@
export default {
data() {
return {
- checkboxOptipon: {
+ checkboxOption: {
// 禁用的选择(禁止勾选或者禁止取消勾选)
disableSelectedRowKeys: [1002, 1005],
// 默认选择
diff --git a/examples/src/docs/zh/ve-table/row-checkbox/selected-row-click.md b/examples/src/docs/zh/ve-table/row-checkbox/selected-row-click.md
index 1308802d4..ab82539ba 100644
--- a/examples/src/docs/zh/ve-table/row-checkbox/selected-row-click.md
+++ b/examples/src/docs/zh/ve-table/row-checkbox/selected-row-click.md
@@ -11,7 +11,7 @@
:columns="columns"
:table-data="tableData"
row-key-field-name="rowKey"
- :checkbox-optipon="checkboxOptipon"
+ :checkbox-option="checkboxOption"
:event-custom-option="eventCustomOption"
/>
@@ -31,7 +31,7 @@
};
},
},
- checkboxOptipon: {
+ checkboxOption: {
// 可控属性
selectedRowKeys: [1003],
// 行选择改变事件
@@ -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);
diff --git a/examples/src/docs/zh/ve-table/row-radio/explain.md b/examples/src/docs/zh/ve-table/row-radio/explain.md
index a256db18c..1bdd6a2e8 100644
--- a/examples/src/docs/zh/ve-table/row-radio/explain.md
+++ b/examples/src/docs/zh/ve-table/row-radio/explain.md
@@ -1,5 +1,5 @@
:::tip
-1、通过 `radioOptipon` 属性开启单选功能。
+1、通过 `radioOption` 属性开启单选功能。
2、通过在`columns` 设置`type=radio`作为单选的列
3、设置`rowKeyFieldName`属性对应行数据的列名
4、`selectedRowChange`行改变事件。事件接收 1 个参数,`row`:当前行数据
diff --git a/examples/src/docs/zh/ve-table/virtual-scroll/row-checkbox.md b/examples/src/docs/zh/ve-table/virtual-scroll/row-checkbox.md
index 794a89c1a..f83c8e24b 100644
--- a/examples/src/docs/zh/ve-table/virtual-scroll/row-checkbox.md
+++ b/examples/src/docs/zh/ve-table/virtual-scroll/row-checkbox.md
@@ -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"
@@ -25,7 +25,7 @@
// 是否开启
enable: true,
},
- checkboxOptipon: {
+ checkboxOption: {
// 行选择改变事件
selectedRowChange: ({ row, isSelected, selectedRowKeys }) => {
console.log(row, isSelected, selectedRowKeys);
diff --git a/packages/ve-table/src/body/body-checkbox-content.jsx b/packages/ve-table/src/body/body-checkbox-content.jsx
index e8a87a616..43a02e4b4 100644
--- a/packages/ve-table/src/body/body-checkbox-content.jsx
+++ b/packages/ve-table/src/body/body-checkbox-content.jsx
@@ -12,7 +12,7 @@ export default {
mixins: [emitter],
props: {
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -39,13 +39,13 @@ export default {
disabled() {
let result = false;
- const { checkboxOptipon, rowKey } = this;
+ const { checkboxOption, rowKey } = this;
- if (!checkboxOptipon) {
+ if (!checkboxOption) {
return;
}
- const { disableSelectedRowKeys } = checkboxOptipon;
+ const { disableSelectedRowKeys } = checkboxOption;
if (
Array.isArray(disableSelectedRowKeys) &&
@@ -59,11 +59,11 @@ export default {
// 是否是受控属性(取决于selectedRowKeys)
isControlledProp() {
- const { checkboxOptipon } = this;
+ const { checkboxOption } = this;
return (
- checkboxOptipon &&
- Array.isArray(checkboxOptipon.selectedRowKeys)
+ checkboxOption &&
+ Array.isArray(checkboxOption.selectedRowKeys)
);
}
},
@@ -95,7 +95,7 @@ export default {
// selected change
selectedChange(isSelected) {
- const { checkboxOptipon, rowKey, isControlledProp } = this;
+ const { checkboxOption, rowKey, isControlledProp } = this;
// 非受控
if (!isControlledProp) {
diff --git a/packages/ve-table/src/body/body-td.jsx b/packages/ve-table/src/body/body-td.jsx
index bb65fec7e..781aef545 100644
--- a/packages/ve-table/src/body/body-td.jsx
+++ b/packages/ve-table/src/body/body-td.jsx
@@ -68,7 +68,7 @@ export default {
checkbox
*/
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -356,7 +356,7 @@ export default {
const checkboxProps = {
props: {
column: this.column,
- checkboxOptipon: this.checkboxOptipon,
+ checkboxOption: this.checkboxOption,
rowKey: this.rowData[this.rowKeyFieldName],
internalCheckboxSelectedRowKeys: this
.internalCheckboxSelectedRowKeys
diff --git a/packages/ve-table/src/body/body-tr.jsx b/packages/ve-table/src/body/body-tr.jsx
index 63ebd9084..bac8420df 100644
--- a/packages/ve-table/src/body/body-tr.jsx
+++ b/packages/ve-table/src/body/body-tr.jsx
@@ -55,7 +55,7 @@ export default {
checkbox
*/
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -196,7 +196,7 @@ export default {
isExpandRow,
getExpandRowComp,
expandedRowkeys,
- checkboxOptipon,
+ checkboxOption,
rowKeyFieldName,
rowIndex,
rowData,
@@ -219,7 +219,7 @@ export default {
colgroups,
expandOption,
expandedRowkeys,
- checkboxOptipon,
+ checkboxOption,
rowKeyFieldName,
isExpandRow,
internalCheckboxSelectedRowKeys,
diff --git a/packages/ve-table/src/body/index.jsx b/packages/ve-table/src/body/index.jsx
index e7de7af58..be26e7508 100644
--- a/packages/ve-table/src/body/index.jsx
+++ b/packages/ve-table/src/body/index.jsx
@@ -47,7 +47,7 @@ export default {
}
},
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -177,12 +177,12 @@ export default {
disableCheckboxSelectedRowKeys() {
let result = [];
- const { checkboxOptipon, internalCheckboxSelectedRowKeys } = this;
+ const { checkboxOption, internalCheckboxSelectedRowKeys } = this;
- if (!checkboxOptipon) {
+ if (!checkboxOption) {
return result;
}
- const { disableSelectedRowKeys } = checkboxOptipon;
+ const { disableSelectedRowKeys } = checkboxOption;
if (
internalCheckboxSelectedRowKeys.length> 0 &&
@@ -203,12 +203,12 @@ export default {
disableCheckboxUnselectedRowKeys() {
let result = [];
- const { checkboxOptipon, internalCheckboxSelectedRowKeys } = this;
+ const { checkboxOption, internalCheckboxSelectedRowKeys } = this;
- if (!checkboxOptipon) {
+ if (!checkboxOption) {
return result;
}
- const { disableSelectedRowKeys } = checkboxOptipon;
+ const { disableSelectedRowKeys } = checkboxOption;
if (
internalCheckboxSelectedRowKeys.length> 0 &&
@@ -280,14 +280,14 @@ export default {
}
},
// watch checkbox option
- checkboxOptipon: {
+ checkboxOption: {
handler: function() {
this.initInternalCheckboxSelectedRowKeys();
},
immediate: true
},
// watch selectedRowKeys
- "checkboxOptipon.selectedRowKeys": {
+ "checkboxOption.selectedRowKeys": {
handler: function(val) {
this.resetInternalCheckboxSelectedRowKeys();
}
@@ -578,9 +578,9 @@ export default {
// init internal Checkbox SelectedRowKeys
initInternalCheckboxSelectedRowKeys() {
let result = [];
- const { checkboxOptipon, rowData, allRowKeys } = this;
+ const { checkboxOption, rowData, allRowKeys } = this;
- if (!checkboxOptipon) {
+ if (!checkboxOption) {
return false;
}
@@ -588,7 +588,7 @@ export default {
selectedRowKeys,
defaultSelectedAllRows,
defaultSelectedRowKeys
- } = checkboxOptipon;
+ } = checkboxOption;
if (Array.isArray(selectedRowKeys)) {
result = selectedRowKeys;
@@ -601,7 +601,7 @@ export default {
},
// reset internalCheckboxSelectedRowKeys by selectedRowKeys
resetInternalCheckboxSelectedRowKeys() {
- this.internalCheckboxSelectedRowKeys = this.checkboxOptipon.selectedRowKeys.slice(
+ this.internalCheckboxSelectedRowKeys = this.checkboxOption.selectedRowKeys.slice(
0
);
},
@@ -614,11 +614,11 @@ export default {
*/
checkboxSelectedRowChange({ rowKey, isSelected }) {
const {
- checkboxOptipon,
+ checkboxOption,
internalCheckboxSelectedRowKeys,
rowKeyFieldName
} = this;
- const { selectedRowChange, selectedRowKeys } = checkboxOptipon;
+ const { selectedRowChange, selectedRowKeys } = checkboxOption;
let internalCheckboxSelectedRowKeysTemp = internalCheckboxSelectedRowKeys.slice(
0
@@ -660,13 +660,13 @@ export default {
*/
checkboxSelectedAllChange({ isSelected }) {
const {
- checkboxOptipon,
+ checkboxOption,
internalCheckboxSelectedRowKeys,
allRowKeys,
disableCheckboxSelectedRowKeys,
disableCheckboxUnselectedRowKeys
} = this;
- const { selectedAllChange, selectedRowKeys } = checkboxOptipon;
+ const { selectedAllChange, selectedRowKeys } = checkboxOption;
let internalCheckboxSelectedRowKeysTemp = internalCheckboxSelectedRowKeys.slice(
0
@@ -760,7 +760,7 @@ export default {
this.tdClick(params);
});
- if (this.checkboxOptipon) {
+ if (this.checkboxOption) {
// 这里 nextTick 解决由于子组件先初始化,导致父组件无法接收消息的问题
this.$nextTick(() => {
this.sendToCheckboxAll();
@@ -784,7 +784,7 @@ export default {
isExpandRow,
getExpandRowComp,
expandedRowkeys,
- checkboxOptipon,
+ checkboxOption,
radioOption,
rowKeyFieldName,
tdSizeChange,
@@ -829,7 +829,7 @@ export default {
colgroups,
expandOption,
expandedRowkeys,
- checkboxOptipon,
+ checkboxOption,
radioOption,
rowKeyFieldName,
expandRowChange,
diff --git a/packages/ve-table/src/footer/footer-tr.jsx b/packages/ve-table/src/footer/footer-tr.jsx
index afc15d710..ce496871e 100644
--- a/packages/ve-table/src/footer/footer-tr.jsx
+++ b/packages/ve-table/src/footer/footer-tr.jsx
@@ -143,7 +143,7 @@ export default {
isExpandRow,
getExpandRowComp,
expandedRowkeys,
- checkboxOptipon,
+ checkboxOption,
rowKeyFieldName,
rowIndex,
rowData,
diff --git a/packages/ve-table/src/header/header-checkbox-content.jsx b/packages/ve-table/src/header/header-checkbox-content.jsx
index e7e3372bb..b74859c38 100644
--- a/packages/ve-table/src/header/header-checkbox-content.jsx
+++ b/packages/ve-table/src/header/header-checkbox-content.jsx
@@ -12,7 +12,7 @@ export default {
mixins: [emitter],
props: {
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -30,8 +30,8 @@ export default {
methods: {
// selected change
selectedChange(isSelected) {
- const { checkboxOptipon } = this;
- const { selectedRowKeys } = checkboxOptipon;
+ const { checkboxOption } = this;
+ const { selectedRowKeys } = checkboxOption;
this.isSelected = isSelected;
diff --git a/packages/ve-table/src/header/header-th.jsx b/packages/ve-table/src/header/header-th.jsx
index 5ef13fb4f..b86be6d42 100644
--- a/packages/ve-table/src/header/header-th.jsx
+++ b/packages/ve-table/src/header/header-th.jsx
@@ -40,7 +40,7 @@ export default {
required: true
},
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -253,15 +253,15 @@ export default {
getCheckboxContent() {
let result = null;
- const { checkboxOptipon } = this;
+ const { checkboxOption } = this;
if (this.groupColumnItem.type === COLUMN_TYPES.CHECKBOX) {
- if (!checkboxOptipon.hideSelectAll) {
+ if (!checkboxOption.hideSelectAll) {
// checkbox content props
const checkboxProps = {
props: {
column: this.groupColumnItem,
- checkboxOptipon: this.checkboxOptipon
+ checkboxOption: this.checkboxOption
}
};
diff --git a/packages/ve-table/src/header/header-tr.jsx b/packages/ve-table/src/header/header-tr.jsx
index ad1f3889d..d5a7d05fb 100644
--- a/packages/ve-table/src/header/header-tr.jsx
+++ b/packages/ve-table/src/header/header-tr.jsx
@@ -35,7 +35,7 @@ export default {
required: true
},
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -111,7 +111,7 @@ export default {
fixedHeader,
rowIndex,
trHeightChange,
- checkboxOptipon,
+ checkboxOption,
sortOption,
sortColumns,
cellStyleOption,
@@ -179,7 +179,7 @@ export default {
headerRows,
fixedHeader,
rowIndex,
- checkboxOptipon,
+ checkboxOption,
sortOption,
sortColumns,
cellStyleOption,
diff --git a/packages/ve-table/src/header/index.jsx b/packages/ve-table/src/header/index.jsx
index 5e52a398f..0e7ae4202 100644
--- a/packages/ve-table/src/header/index.jsx
+++ b/packages/ve-table/src/header/index.jsx
@@ -28,7 +28,7 @@ export default {
}
},
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -129,7 +129,7 @@ export default {
colgroups,
fixedHeader,
headerRows,
- checkboxOptipon,
+ checkboxOption,
sortOption,
sortColumns,
cellStyleOption
@@ -148,7 +148,7 @@ export default {
colgroups,
fixedHeader,
rowIndex,
- checkboxOptipon,
+ checkboxOption,
sortOption,
sortColumns,
cellStyleOption,
diff --git a/packages/ve-table/src/index.jsx b/packages/ve-table/src/index.jsx
index b29354cd4..0d5f4c5ee 100644
--- a/packages/ve-table/src/index.jsx
+++ b/packages/ve-table/src/index.jsx
@@ -126,7 +126,7 @@ export default {
}
},
// checkbox option
- checkboxOptipon: {
+ checkboxOption: {
type: Object,
default: function() {
return null;
@@ -1038,7 +1038,7 @@ export default {
cloneTableData,
tdWidthChange,
expandOption,
- checkboxOptipon,
+ checkboxOption,
radioOption,
rowKeyFieldName,
virtualScrollOption,
@@ -1056,7 +1056,7 @@ export default {
groupColumns,
colgroups,
fixedHeader,
- checkboxOptipon,
+ checkboxOption,
sortOption,
cellStyleOption,
eventCustomOption: this.eventCustomOption,
@@ -1071,7 +1071,7 @@ export default {
columnsOptionResetTime: this.columnsOptionResetTime,
colgroups,
expandOption,
- checkboxOptipon,
+ checkboxOption,
cloneTableData,
rowKeyFieldName,
radioOption,
diff --git a/tests/unit/specs/ve-table-row-checkbox.spec.js b/tests/unit/specs/ve-table-row-checkbox.spec.js
index 4f0b3c6c4..c13262c98 100644
--- a/tests/unit/specs/ve-table-row-checkbox.spec.js
+++ b/tests/unit/specs/ve-table-row-checkbox.spec.js
@@ -79,7 +79,7 @@ describe("veTable row checkbox", () => {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {},
+ checkboxOption: {},
rowKeyFieldName: "rowKey"
}
});
@@ -92,7 +92,7 @@ describe("veTable row checkbox", () => {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {},
+ checkboxOption: {},
rowKeyFieldName: "rowKey"
}
});
@@ -110,7 +110,7 @@ describe("veTable row checkbox", () => {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {
+ checkboxOption: {
defaultSelectedRowKeys: [1001, 1003, 1004]
},
rowKeyFieldName: "rowKey"
@@ -140,7 +140,7 @@ describe("veTable row checkbox", () => {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {
+ checkboxOption: {
// 禁用的选择(禁止勾选或者禁止取消勾选)
disableSelectedRowKeys: [1002, 1005],
// 默认选择
@@ -190,7 +190,7 @@ describe("veTable row checkbox", () => {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {
+ checkboxOption: {
// 可控属性
selectedRowKeys: [1003]
},
@@ -215,7 +215,7 @@ describe("veTable row checkbox", () => {
).toBe(1);
wrapper.setProps({
- checkboxOptipon: {
+ checkboxOption: {
selectedRowKeys: [1003, 1004]
}
});
@@ -234,7 +234,7 @@ describe("veTable row checkbox", () => {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {
+ checkboxOption: {
// 可控属性
hideSelectAll: true
},
@@ -249,14 +249,14 @@ describe("veTable row checkbox", () => {
);
});
- it("checkboxOptipon selectedRowChange event", async () => {
+ it("checkboxOption selectedRowChange event", async () => {
const mockFn = jest.fn();
const wrapper = mount(veTable, {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {
+ checkboxOption: {
selectedRowChange: ({
row,
isSelected,
@@ -283,14 +283,14 @@ describe("veTable row checkbox", () => {
expect(mockFn).toHaveBeenCalledWith(TABLE_DATA[0], true, [1001]);
});
- it("checkboxOptipon selectedAllChange event", async () => {
+ it("checkboxOption selectedAllChange event", async () => {
const mockFn = jest.fn();
const wrapper = mount(veTable, {
propsData: {
columns: COLUMNS,
tableData: TABLE_DATA,
- checkboxOptipon: {
+ checkboxOption: {
selectedAllChange: ({ isSelected, selectedRowKeys }) => {
mockFn(isSelected, selectedRowKeys);
}
diff --git a/tests/unit/specs/ve-table-virtual-scroll.spec.js b/tests/unit/specs/ve-table-virtual-scroll.spec.js
index c7ce7e0f9..d1478ef8c 100644
--- a/tests/unit/specs/ve-table-virtual-scroll.spec.js
+++ b/tests/unit/specs/ve-table-virtual-scroll.spec.js
@@ -272,7 +272,7 @@ describe("veTable virtual scroll", () => {
// 是否开启
enable: true
},
- checkboxOptipon: {},
+ checkboxOption: {},
maxHeight: MAX_HEIGHT,
rowKeyFieldName: "rowKey"
}