@maxax/ui 1.1.14 → 1.1.15
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/dist/components/basic-checkbox-group/BasicCheckboxGroup.d.ts +39 -13
- package/dist/components/basic-checkbox-group/BasicCheckboxGroup.d.ts.map +1 -1
- package/dist/components/basic-checkbox-group/interface.d.ts +35 -1
- package/dist/components/basic-checkbox-group/interface.d.ts.map +1 -1
- package/dist/index.cjs +46 -11
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +46 -11
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
|
@@ -7347,6 +7347,38 @@ const basicCheckboxGroupProps = {
|
|
|
7347
7347
|
type: Number,
|
|
7348
7348
|
required: false
|
|
7349
7349
|
},
|
|
7350
|
+
/**
|
|
7351
|
+
* @zh 值变更回调(受控、非受控通用)
|
|
7352
|
+
* @en Value change callback
|
|
7353
|
+
*/
|
|
7354
|
+
onChange: {
|
|
7355
|
+
type: Function,
|
|
7356
|
+
default: void 0
|
|
7357
|
+
},
|
|
7358
|
+
/**
|
|
7359
|
+
* @zh 受控更新回调(等价于 onUpdate:value)
|
|
7360
|
+
* @en Controlled update callback
|
|
7361
|
+
*/
|
|
7362
|
+
onUpdateValue: {
|
|
7363
|
+
type: Function,
|
|
7364
|
+
default: void 0
|
|
7365
|
+
},
|
|
7366
|
+
/**
|
|
7367
|
+
* @zh v-model 语法糖事件
|
|
7368
|
+
* @en v-model syntax sugar event
|
|
7369
|
+
*/
|
|
7370
|
+
"onUpdate:value": {
|
|
7371
|
+
type: Function,
|
|
7372
|
+
default: void 0
|
|
7373
|
+
},
|
|
7374
|
+
/**
|
|
7375
|
+
* @zh 全选时触发(回调新值与事件)
|
|
7376
|
+
* @en Triggered on select all
|
|
7377
|
+
*/
|
|
7378
|
+
onAllChange: {
|
|
7379
|
+
type: Function,
|
|
7380
|
+
default: void 0
|
|
7381
|
+
},
|
|
7350
7382
|
/**
|
|
7351
7383
|
* @zh 选项
|
|
7352
7384
|
* @en Options
|
|
@@ -7438,15 +7470,7 @@ const BasicCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
7438
7470
|
name: "XBasicCheckboxGroup",
|
|
7439
7471
|
props: basicCheckboxGroupProps,
|
|
7440
7472
|
emits: {
|
|
7441
|
-
"update:value": (_value) => true
|
|
7442
|
-
"all-change": (_value, _ev) => true,
|
|
7443
|
-
/**
|
|
7444
|
-
* @zh 值改变时触发
|
|
7445
|
-
* @en Trigger when the value changes
|
|
7446
|
-
* @param {(string | number | boolean)[]} _value
|
|
7447
|
-
* @param {Event} _ev
|
|
7448
|
-
*/
|
|
7449
|
-
change: (_value, _ev) => true
|
|
7473
|
+
"update:value": (_value) => true
|
|
7450
7474
|
},
|
|
7451
7475
|
setup(props, {
|
|
7452
7476
|
emit,
|
|
@@ -7502,16 +7526,27 @@ const BasicCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
7502
7526
|
indeterminate.value = checkedOptions > 0 && checkedOptions < totalOptions;
|
|
7503
7527
|
};
|
|
7504
7528
|
const handleChange = (value, e) => {
|
|
7529
|
+
if (props.disabled) return;
|
|
7505
7530
|
$value.value = value;
|
|
7506
7531
|
updateAllChecked();
|
|
7532
|
+
const {
|
|
7533
|
+
onChange,
|
|
7534
|
+
onUpdateValue,
|
|
7535
|
+
"onUpdate:value": _onUpdateValue
|
|
7536
|
+
} = props;
|
|
7537
|
+
if (onChange) call(onChange, value, e);
|
|
7538
|
+
if (onUpdateValue) call(onUpdateValue, value, e);
|
|
7539
|
+
if (_onUpdateValue) call(_onUpdateValue, value, e);
|
|
7507
7540
|
emit("update:value", value);
|
|
7508
|
-
emit("change", value, e);
|
|
7509
7541
|
};
|
|
7510
7542
|
const handleSelectAll = (value, e) => {
|
|
7511
7543
|
allChecked.value = value;
|
|
7512
7544
|
const newValue = allChecked.value ? options.value.map((option) => option.value) : [];
|
|
7513
7545
|
handleChange(newValue, e);
|
|
7514
|
-
|
|
7546
|
+
const {
|
|
7547
|
+
onAllChange
|
|
7548
|
+
} = props;
|
|
7549
|
+
if (onAllChange) call(onAllChange, newValue, e);
|
|
7515
7550
|
};
|
|
7516
7551
|
const cls = computed(() => [b(), is(`direction-${props.direction}`)]);
|
|
7517
7552
|
watch(() => props.searchInfo, () => {
|