knt-shared 1.6.6 → 1.6.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/Form/BasicForm.vue.d.ts +2 -0
- package/dist/components/Form/BasicForm.vue.d.ts.map +1 -1
- package/dist/components/Form/types.d.ts +22 -1
- package/dist/components/Form/types.d.ts.map +1 -1
- package/dist/components/Table/BasicTable.vue.d.ts +1 -0
- package/dist/components/Table/BasicTable.vue.d.ts.map +1 -1
- package/dist/index.cjs.js +26 -3
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +27 -4
- package/dist/index.esm.js.map +1 -1
- package/package.json +1 -1
package/dist/index.esm.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { getCurrentInstance, inject, defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, resolveComponent, createCommentVNode, createVNode, createBlock, unref, reactive, Fragment, renderList, withModifiers, ref, watch, onMounted, onUnmounted, withDirectives, vModelText, vShow, toDisplayString, withCtx, createTextVNode, useCssVars, nextTick, renderSlot, mergeProps, createSlots, onBeforeUnmount, toRef, normalizeProps, guardReactiveProps, h, resolveDynamicComponent, useSlots } from "vue";
|
|
1
|
+
import { getCurrentInstance, inject, defineComponent, computed, createElementBlock, openBlock, normalizeStyle, normalizeClass, createElementVNode, resolveComponent, createCommentVNode, createVNode, createBlock, unref, reactive, Fragment, renderList, withModifiers, ref, watch, onMounted, onUnmounted, withDirectives, vModelText, vShow, toDisplayString, withCtx, createTextVNode, useCssVars, nextTick, renderSlot, mergeProps, createSlots, onBeforeUnmount, toRef, normalizeProps, guardReactiveProps, h, resolveDynamicComponent, isVNode, useSlots } from "vue";
|
|
2
2
|
import { Message, Transfer, Mention, Upload, Rate, Slider, Switch, RangePicker, TimePicker, DatePicker, TreeSelect, Cascader, CheckboxGroup, Checkbox, RadioGroup, Radio, Select, AutoComplete, Textarea, InputPassword, InputNumber, Input, ImagePreviewGroup, Image, Modal } from "@arco-design/web-vue";
|
|
3
3
|
const configProviderInjectionKey = Symbol("ArcoConfigProvider");
|
|
4
4
|
const CLASS_PREFIX = "arco";
|
|
@@ -4309,6 +4309,21 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4309
4309
|
}
|
|
4310
4310
|
return (component == null ? void 0 : component.name) || "Input";
|
|
4311
4311
|
};
|
|
4312
|
+
const isVNodeChild = (value) => {
|
|
4313
|
+
return isVNode(value) || typeof value === "string" || typeof value === "number";
|
|
4314
|
+
};
|
|
4315
|
+
const renderSlotContent = (slotConfig2, slotData) => {
|
|
4316
|
+
if (isVNodeChild(slotConfig2)) {
|
|
4317
|
+
return slotConfig2;
|
|
4318
|
+
}
|
|
4319
|
+
if (typeof slotConfig2 === "function") {
|
|
4320
|
+
return slotConfig2(slotData, formModel);
|
|
4321
|
+
}
|
|
4322
|
+
return null;
|
|
4323
|
+
};
|
|
4324
|
+
const hasComponentSlots = (schema) => {
|
|
4325
|
+
return !!(schema.componentSlots && Object.keys(schema.componentSlots).length > 0);
|
|
4326
|
+
};
|
|
4312
4327
|
const handleSubmit = async (data) => {
|
|
4313
4328
|
try {
|
|
4314
4329
|
submitLoading.value = true;
|
|
@@ -4535,7 +4550,15 @@ const _sfc_main$6 = /* @__PURE__ */ defineComponent({
|
|
|
4535
4550
|
modelValue: formModel[schema.field],
|
|
4536
4551
|
"onUpdate:modelValue": ($event) => formModel[schema.field] = $event,
|
|
4537
4552
|
placeholder: getPlaceholderText(schema)
|
|
4538
|
-
}, { ref_for: true }, getComponentProps(schema)),
|
|
4553
|
+
}, { ref_for: true }, getComponentProps(schema)), createSlots({ _: 2 }, [
|
|
4554
|
+
hasComponentSlots(schema) ? {
|
|
4555
|
+
name: slotName,
|
|
4556
|
+
fn: withCtx((slotData) => [
|
|
4557
|
+
(openBlock(), createBlock(resolveDynamicComponent(renderSlotContent(slotConfig, slotData))))
|
|
4558
|
+
]),
|
|
4559
|
+
key: "0"
|
|
4560
|
+
} : void 0
|
|
4561
|
+
]), 1040, ["modelValue", "onUpdate:modelValue", "placeholder"]))
|
|
4539
4562
|
];
|
|
4540
4563
|
}),
|
|
4541
4564
|
_: 2
|
|
@@ -5993,8 +6016,8 @@ const _sfc_main$3 = /* @__PURE__ */ defineComponent({
|
|
|
5993
6016
|
});
|
|
5994
6017
|
return result;
|
|
5995
6018
|
});
|
|
5996
|
-
const getFormSlotName = (
|
|
5997
|
-
const name =
|
|
6019
|
+
const getFormSlotName = (slotName2) => {
|
|
6020
|
+
const name = slotName2.toString();
|
|
5998
6021
|
return name.startsWith("form-") ? name.slice(5) : name;
|
|
5999
6022
|
};
|
|
6000
6023
|
const tableRef = ref();
|