knt-shared 1.1.5 → 1.1.7
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/Modal/BasicModal.vue.d.ts +3 -0
- package/dist/components/Modal/BasicModal.vue.d.ts.map +1 -1
- package/dist/components/Table/BasicTable.vue.d.ts +1 -11
- package/dist/components/Table/BasicTable.vue.d.ts.map +1 -1
- package/dist/components/Table/types.d.ts +10 -8
- package/dist/components/Table/types.d.ts.map +1 -1
- package/dist/index.cjs.js +16 -4
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +16 -4
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +16 -16
- package/dist/types/global.d.ts +8 -0
- package/dist/types/global.d.ts.map +1 -0
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -190,11 +190,23 @@ const _sfc_main$9 = /* @__PURE__ */ defineComponent({
|
|
|
190
190
|
const handleSubmit = async (data) => {
|
|
191
191
|
try {
|
|
192
192
|
submitLoading.value = true;
|
|
193
|
+
if (!data) {
|
|
194
|
+
try {
|
|
195
|
+
await validate();
|
|
196
|
+
const values = getFieldsValue();
|
|
197
|
+
emit("submit", values);
|
|
198
|
+
return values;
|
|
199
|
+
} catch (error) {
|
|
200
|
+
console.warn("表单验证失败:", error);
|
|
201
|
+
throw error;
|
|
202
|
+
}
|
|
203
|
+
}
|
|
193
204
|
if (data.errors) {
|
|
194
205
|
console.warn("表单验证失败:", data.errors);
|
|
195
206
|
return;
|
|
196
207
|
}
|
|
197
208
|
emit("submit", data.values);
|
|
209
|
+
return data.values;
|
|
198
210
|
} finally {
|
|
199
211
|
submitLoading.value = false;
|
|
200
212
|
}
|
|
@@ -1437,7 +1449,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
1437
1449
|
const getPaginationConfig = computed(() => {
|
|
1438
1450
|
const mergedProps = getMergedProps.value;
|
|
1439
1451
|
if (mergedProps.pagination === false) {
|
|
1440
|
-
return
|
|
1452
|
+
return false;
|
|
1441
1453
|
}
|
|
1442
1454
|
return {
|
|
1443
1455
|
...mergedProps.pagination,
|
|
@@ -2376,7 +2388,7 @@ const _export_sfc = (sfc, props) => {
|
|
|
2376
2388
|
}
|
|
2377
2389
|
return target;
|
|
2378
2390
|
};
|
|
2379
|
-
const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-
|
|
2391
|
+
const BasicTable = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["__scopeId", "data-v-f0b71ff8"]]);
|
|
2380
2392
|
function useTable(options = {}) {
|
|
2381
2393
|
const tableRef = ref(null);
|
|
2382
2394
|
const formRef = ref(null);
|
|
@@ -2657,7 +2669,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
2657
2669
|
footer: { type: Boolean, default: true },
|
|
2658
2670
|
titleAlign: { default: "center" },
|
|
2659
2671
|
height: {},
|
|
2660
|
-
minHeight: {},
|
|
2672
|
+
minHeight: { default: 60 },
|
|
2661
2673
|
useWrapper: { type: Boolean, default: true },
|
|
2662
2674
|
wrapperFooterOffset: { default: 0 },
|
|
2663
2675
|
canFullscreen: { type: Boolean, default: false },
|
|
@@ -3025,7 +3037,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
3025
3037
|
};
|
|
3026
3038
|
}
|
|
3027
3039
|
});
|
|
3028
|
-
const BasicModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
3040
|
+
const BasicModal = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-4117f967"]]);
|
|
3029
3041
|
function useModal(props) {
|
|
3030
3042
|
const modalRef = ref(null);
|
|
3031
3043
|
const loadedRef = ref(false);
|