@maxax/ui 1.1.16 → 1.1.18
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-cascader/BasicCascader.vue.d.ts +3 -4
- package/dist/components/basic-cascader/BasicCascader.vue.d.ts.map +1 -1
- package/dist/components/basic-cascader/interface.d.ts +5 -0
- package/dist/components/basic-cascader/interface.d.ts.map +1 -1
- package/dist/components/basic-checkbox-group/BasicCheckboxGroup.d.ts.map +1 -1
- package/dist/components/basic-checkbox-group/interface.d.ts +1 -0
- package/dist/components/basic-checkbox-group/interface.d.ts.map +1 -1
- package/dist/components/basic-form/components/FormItem.vue.d.ts.map +1 -1
- package/dist/components/basic-form/hooks/use-form-events.d.ts.map +1 -1
- package/dist/components/basic-radio-group/BasicRadioGroup.d.ts.map +1 -1
- package/dist/components/basic-radio-group/interface.d.ts +1 -0
- package/dist/components/basic-radio-group/interface.d.ts.map +1 -1
- package/dist/components/basic-select/BasicSelect.vue.d.ts +1 -0
- package/dist/components/basic-select/BasicSelect.vue.d.ts.map +1 -1
- package/dist/components/basic-select/interface.d.ts +1 -0
- package/dist/components/basic-select/interface.d.ts.map +1 -1
- package/dist/index.cjs +39 -16
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +39 -16
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -7066,9 +7066,16 @@ const _sfc_main$z = /* @__PURE__ */ defineComponent({
|
|
|
7066
7066
|
function getSearchInfo() {
|
|
7067
7067
|
return searchInfoRef.value;
|
|
7068
7068
|
}
|
|
7069
|
-
|
|
7069
|
+
function getOptionsMethod() {
|
|
7070
|
+
return unref(getOptions);
|
|
7071
|
+
}
|
|
7072
|
+
const cascaderActionType = {
|
|
7070
7073
|
reload,
|
|
7071
|
-
getSearchInfo
|
|
7074
|
+
getSearchInfo,
|
|
7075
|
+
getOptions: getOptionsMethod
|
|
7076
|
+
};
|
|
7077
|
+
__expose({
|
|
7078
|
+
...cascaderActionType
|
|
7072
7079
|
});
|
|
7073
7080
|
return (_ctx, _cache) => {
|
|
7074
7081
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
@@ -7650,8 +7657,12 @@ const BasicCheckboxGroup = /* @__PURE__ */ defineComponent({
|
|
|
7650
7657
|
async function reload(opt) {
|
|
7651
7658
|
return await fetch2(opt);
|
|
7652
7659
|
}
|
|
7660
|
+
function getOptions() {
|
|
7661
|
+
return options.value;
|
|
7662
|
+
}
|
|
7653
7663
|
const checkboxGroupActionType = {
|
|
7654
|
-
reload
|
|
7664
|
+
reload,
|
|
7665
|
+
getOptions
|
|
7655
7666
|
};
|
|
7656
7667
|
expose({
|
|
7657
7668
|
...checkboxGroupActionType
|
|
@@ -9031,8 +9042,12 @@ const BasicRadioGroup = /* @__PURE__ */ defineComponent({
|
|
|
9031
9042
|
async function reload(opt) {
|
|
9032
9043
|
return await fetch2(opt);
|
|
9033
9044
|
}
|
|
9045
|
+
function getOptions() {
|
|
9046
|
+
return options.value;
|
|
9047
|
+
}
|
|
9034
9048
|
const radioGroupActionType = {
|
|
9035
|
-
reload
|
|
9049
|
+
reload,
|
|
9050
|
+
getOptions
|
|
9036
9051
|
};
|
|
9037
9052
|
expose({
|
|
9038
9053
|
...radioGroupActionType
|
|
@@ -9151,9 +9166,13 @@ const _sfc_main$p = /* @__PURE__ */ defineComponent({
|
|
|
9151
9166
|
function getSearchInfo() {
|
|
9152
9167
|
return searchInfoRef.value;
|
|
9153
9168
|
}
|
|
9169
|
+
function getOptionsMethod() {
|
|
9170
|
+
return unref(getOptions);
|
|
9171
|
+
}
|
|
9154
9172
|
const selectActionType = {
|
|
9155
9173
|
reload,
|
|
9156
|
-
getSearchInfo
|
|
9174
|
+
getSearchInfo,
|
|
9175
|
+
getOptions: getOptionsMethod
|
|
9157
9176
|
};
|
|
9158
9177
|
__expose({
|
|
9159
9178
|
...selectActionType
|
|
@@ -9212,7 +9231,7 @@ const getComponentsEventTrigger$1 = (component) => {
|
|
|
9212
9231
|
}
|
|
9213
9232
|
return "onUpdate:value";
|
|
9214
9233
|
};
|
|
9215
|
-
function getComponentDefaultValue
|
|
9234
|
+
function getComponentDefaultValue(component) {
|
|
9216
9235
|
if (DEFAULT_VALUE_ARRAY$1.includes(component)) {
|
|
9217
9236
|
return [];
|
|
9218
9237
|
}
|
|
@@ -9472,7 +9491,7 @@ const _sfc_main$o = /* @__PURE__ */ defineComponent({
|
|
|
9472
9491
|
}
|
|
9473
9492
|
propsData.codeField = field;
|
|
9474
9493
|
propsData.formValues = unref(getValues);
|
|
9475
|
-
let bindValueValue = props.formModel[field] || props.formModel[field] === 0 ? props.formModel[field] : getComponentDefaultValue
|
|
9494
|
+
let bindValueValue = props.formModel[field] || props.formModel[field] === 0 ? props.formModel[field] : getComponentDefaultValue(component);
|
|
9476
9495
|
if (itemIsDateComponent$1(component)) {
|
|
9477
9496
|
if (!isArray(bindValueValue)) {
|
|
9478
9497
|
bindValueValue = bindValueValue ? dayjs(bindValueValue).valueOf() : null;
|
|
@@ -10520,12 +10539,6 @@ const getComponentsEventTrigger = (component) => {
|
|
|
10520
10539
|
}
|
|
10521
10540
|
return "onUpdate:value";
|
|
10522
10541
|
};
|
|
10523
|
-
function getComponentDefaultValue(component) {
|
|
10524
|
-
if (DEFAULT_VALUE_ARRAY.includes(component)) {
|
|
10525
|
-
return [];
|
|
10526
|
-
}
|
|
10527
|
-
return null;
|
|
10528
|
-
}
|
|
10529
10542
|
function setComponentRuleType(rule, component) {
|
|
10530
10543
|
if (Reflect.has(rule, "type")) {
|
|
10531
10544
|
return;
|
|
@@ -10882,7 +10895,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
10882
10895
|
}
|
|
10883
10896
|
propsData.codeField = field;
|
|
10884
10897
|
propsData.formValues = unref(getValues);
|
|
10885
|
-
let bindValueValue = props.formModel[field]
|
|
10898
|
+
let bindValueValue = props.formModel[field];
|
|
10886
10899
|
if (itemIsDateComponent(component)) {
|
|
10887
10900
|
if (!isArray(bindValueValue)) {
|
|
10888
10901
|
bindValueValue = bindValueValue ? dayjs(bindValueValue).valueOf() : null;
|
|
@@ -11293,7 +11306,12 @@ function useFormEvents({ emit, getProps, getSchema, formModel, defaultValueRef,
|
|
|
11293
11306
|
valuesKeys.forEach((key2) => {
|
|
11294
11307
|
if (!fields.includes(key2)) {
|
|
11295
11308
|
const value = get(values, key2);
|
|
11296
|
-
|
|
11309
|
+
if (isUndefined(value)) {
|
|
11310
|
+
const defaultValue = cloneDeep$1(defaultValueRef.value[key2]);
|
|
11311
|
+
unref(formModel)[key2] = defaultValue;
|
|
11312
|
+
} else {
|
|
11313
|
+
unref(formModel)[key2] = value;
|
|
11314
|
+
}
|
|
11297
11315
|
}
|
|
11298
11316
|
});
|
|
11299
11317
|
}
|
|
@@ -11347,7 +11365,12 @@ function useFormEvents({ emit, getProps, getSchema, formModel, defaultValueRef,
|
|
|
11347
11365
|
if (hasKey) {
|
|
11348
11366
|
constructValue = get(value, key2);
|
|
11349
11367
|
const fieldValue = constructValue || value;
|
|
11350
|
-
|
|
11368
|
+
if (isUndefined(fieldValue)) {
|
|
11369
|
+
const defaultValue = cloneDeep$1(defaultValueRef.value[key2]);
|
|
11370
|
+
unref(formModel)[key2] = defaultValue;
|
|
11371
|
+
} else {
|
|
11372
|
+
unref(formModel)[key2] = fieldValue;
|
|
11373
|
+
}
|
|
11351
11374
|
if ($props == null ? void 0 : $props.onChange) {
|
|
11352
11375
|
$props == null ? void 0 : $props.onChange(fieldValue);
|
|
11353
11376
|
}
|