holyes-table 1.0.15 → 1.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md
CHANGED
|
@@ -324,6 +324,8 @@ interface HolyesTableColumnPropsType {
|
|
|
324
324
|
checkbox?: {
|
|
325
325
|
/** 多选框是否半选,取决于row的哪个字段 */
|
|
326
326
|
checkedIndeterminateField?: string
|
|
327
|
+
/** 多选框是否禁用,取决于row的哪个字段 */
|
|
328
|
+
disabledField?: string
|
|
327
329
|
/** 多选框点击事件 */
|
|
328
330
|
onChange?: (row: any, index: number) => void
|
|
329
331
|
}
|
|
@@ -804,6 +806,7 @@ const columns = [
|
|
|
804
806
|
defaultProps: {
|
|
805
807
|
checkbox: {
|
|
806
808
|
checkedIndeterminateField: 'halfChecked',
|
|
809
|
+
disabledField: 'checkedDisabled',
|
|
807
810
|
onChange: (row, index) => {
|
|
808
811
|
console.log('复选框变化', row)
|
|
809
812
|
}
|
package/dist/index.mjs
CHANGED
|
@@ -1719,10 +1719,12 @@ var _e = (e) => {
|
|
|
1719
1719
|
])) : r("", !0)], 64)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Le, [s(S(k), {
|
|
1720
1720
|
modelValue: t[f.field],
|
|
1721
1721
|
indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
|
|
1722
|
+
disabled: f.slots?.defaultProps?.checkbox?.disabledField && t[f.slots?.defaultProps?.checkbox?.disabledField],
|
|
1722
1723
|
onChange: (e) => f.slots?.defaultProps?.checkbox?.onChange?.(t, g)
|
|
1723
1724
|
}, null, 8, [
|
|
1724
1725
|
"modelValue",
|
|
1725
1726
|
"indeterminate",
|
|
1727
|
+
"disabled",
|
|
1726
1728
|
"onChange"
|
|
1727
1729
|
])])) : (h(), i("span", {
|
|
1728
1730
|
key: 10,
|
|
@@ -116,6 +116,8 @@ export type HolyesTableColumnPropsTypeOption = {
|
|
|
116
116
|
checkbox?: {
|
|
117
117
|
/** 多选框是否半选,取决于row的哪个字段 */
|
|
118
118
|
checkedIndeterminateField?: string;
|
|
119
|
+
/** 多选框是否禁用,取决于row的哪个字段 */
|
|
120
|
+
disabledField?: string;
|
|
119
121
|
/** 多选框点击事件 */
|
|
120
122
|
onChange?: (row: any, index: number) => void;
|
|
121
123
|
};
|
package/package.json
CHANGED
|
@@ -310,6 +310,8 @@ interface HolyesTableColumnPropsType {
|
|
|
310
310
|
checkbox?: {
|
|
311
311
|
/** 多选框是否半选,取决于row的哪个字段 */
|
|
312
312
|
checkedIndeterminateField?: string
|
|
313
|
+
/** 多选框是否禁用,取决于row的哪个字段 */
|
|
314
|
+
disabledField?: string
|
|
313
315
|
/** 多选框点击事件 */
|
|
314
316
|
onChange?: (row: any, index: number) => void
|
|
315
317
|
}
|
|
@@ -790,6 +792,7 @@ const columns = [
|
|
|
790
792
|
defaultProps: {
|
|
791
793
|
checkbox: {
|
|
792
794
|
checkedIndeterminateField: 'halfChecked',
|
|
795
|
+
disabledField: 'checkedDisabled',
|
|
793
796
|
onChange: (row, index) => {
|
|
794
797
|
console.log('复选框变化', row)
|
|
795
798
|
}
|