holyes-table 1.0.29 → 1.0.31
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
|
@@ -746,6 +746,26 @@ const columns = [
|
|
|
746
746
|
}
|
|
747
747
|
}
|
|
748
748
|
},
|
|
749
|
+
|
|
750
|
+
// 复选框类型
|
|
751
|
+
{
|
|
752
|
+
field: 'checkbox',
|
|
753
|
+
title: '多选',
|
|
754
|
+
slots: {
|
|
755
|
+
defaultType: 'checkbox',
|
|
756
|
+
defaultProps: {
|
|
757
|
+
checkbox: {
|
|
758
|
+
checkedIndeterminateField: 'halfChecked',
|
|
759
|
+
disabledField: 'checkedDisabled',
|
|
760
|
+
checkedValue: true,
|
|
761
|
+
showField: "checkboxShow",
|
|
762
|
+
onChange: (row, index) => {
|
|
763
|
+
console.log('复选框变化', row)
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
}
|
|
767
|
+
}
|
|
768
|
+
},
|
|
749
769
|
|
|
750
770
|
// 图标类型
|
|
751
771
|
{
|
package/dist/index.mjs
CHANGED
|
@@ -1252,7 +1252,7 @@ var _e = (e) => {
|
|
|
1252
1252
|
display: "flex",
|
|
1253
1253
|
gap: "4px"
|
|
1254
1254
|
} }, Fe = ["title"], Ie = {
|
|
1255
|
-
key:
|
|
1255
|
+
key: 0,
|
|
1256
1256
|
style: {
|
|
1257
1257
|
width: "100%",
|
|
1258
1258
|
"text-align": "center"
|
|
@@ -1676,7 +1676,7 @@ var _e = (e) => {
|
|
|
1676
1676
|
}, null, 8, ["onClick"]), [[C, t[S(m).isCollapsed] && !t[S(m).lazyLoading]]])
|
|
1677
1677
|
], 64)) : r("", !0)], 64))], 64)) : r("", !0), f.type == "checkbox" ? (h(), n(S(k), {
|
|
1678
1678
|
key: 1,
|
|
1679
|
-
modelValue: t[f.field],
|
|
1679
|
+
modelValue: !!t[f.field],
|
|
1680
1680
|
indeterminate: t[S(m).checkedIndeterminate + f.field],
|
|
1681
1681
|
onChange: (e) => S(Xe)(t, f.field)
|
|
1682
1682
|
}, null, 8, [
|
|
@@ -1771,8 +1771,8 @@ var _e = (e) => {
|
|
|
1771
1771
|
"closeValue",
|
|
1772
1772
|
"disabled",
|
|
1773
1773
|
"onChange"
|
|
1774
|
-
])) : r("", !0)], 4)) : f.slots?.defaultType == "checkbox" ? (h(), i("span", Ie, [s(S(k), {
|
|
1775
|
-
modelValue: t[f.field],
|
|
1774
|
+
])) : r("", !0)], 4)) : f.slots?.defaultType == "checkbox" ? (h(), i(e, { key: 9 }, [!f.slots?.defaultProps?.checkbox?.showField || t[f.slots?.defaultProps?.checkbox?.showField] ? (h(), i("span", Ie, [s(S(k), {
|
|
1775
|
+
modelValue: f.slots?.defaultProps?.checkbox?.checkedValue ? t[f.field] == f.slots?.defaultProps?.checkbox?.checkedValue : !!t[f.field],
|
|
1776
1776
|
indeterminate: f.slots?.defaultProps?.checkbox?.checkedIndeterminateField ? t[f.slots?.defaultProps?.checkbox?.checkedIndeterminateField] : !1,
|
|
1777
1777
|
disabled: f.slots?.defaultProps?.checkbox?.disabledField && t[f.slots?.defaultProps?.checkbox?.disabledField],
|
|
1778
1778
|
onChange: (e) => f.slots?.defaultProps?.checkbox?.onChange?.(t, g)
|
|
@@ -1781,7 +1781,7 @@ var _e = (e) => {
|
|
|
1781
1781
|
"indeterminate",
|
|
1782
1782
|
"disabled",
|
|
1783
1783
|
"onChange"
|
|
1784
|
-
])])) : (h(), i("span", {
|
|
1784
|
+
])])) : r("", !0)], 64)) : (h(), i("span", {
|
|
1785
1785
|
key: 10,
|
|
1786
1786
|
style: u({ paddingLeft: S(U).paddingLeft }),
|
|
1787
1787
|
title: p.showOverflow && t[f.field] || ""
|
|
@@ -125,6 +125,10 @@ export type HolyesTableColumnPropsTypeOption = {
|
|
|
125
125
|
checkedIndeterminateField?: string;
|
|
126
126
|
/** 多选框是否禁用,取决于row的哪个字段 */
|
|
127
127
|
disabledField?: string;
|
|
128
|
+
/** 多选框是否显示,取决于row的哪个字段 */
|
|
129
|
+
showField?: string;
|
|
130
|
+
/** 多选框选中时的值 */
|
|
131
|
+
checkedValue?: any;
|
|
128
132
|
/** 多选框点击事件 */
|
|
129
133
|
onChange?: (row: any, index: number) => void;
|
|
130
134
|
};
|
package/package.json
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# 更新日志
|
|
2
2
|
|
|
3
|
+
## v1.0.31 (2026-07-09)
|
|
4
|
+
|
|
5
|
+
- 插槽checkbox列增加checkedValue属性,用于设置选中时的值,默认值为true;
|
|
6
|
+
增加showField属性,用于设置是否显示多选框,默认值为true
|
|
7
|
+
|
|
8
|
+
## v1.0.30 (2026-07-09)
|
|
9
|
+
|
|
10
|
+
- 修复checkbox列问题
|
|
11
|
+
|
|
3
12
|
## v1.0.29 (2026-07-09)
|
|
4
13
|
|
|
5
14
|
- 修复树配置, treeConfig?.transform为false时, checkbox列问题
|