knt-shared 1.6.5 → 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/Description/BasicDescription.vue.d.ts.map +1 -1
- package/dist/components/Description/types.d.ts +6 -0
- package/dist/components/Description/types.d.ts.map +1 -1
- 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 +35 -6
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.esm.js +36 -7
- package/dist/index.esm.js.map +1 -1
- package/dist/style.css +7 -7
- 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();
|
|
@@ -8233,7 +8256,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8233
8256
|
align: { default: "left" },
|
|
8234
8257
|
style: {},
|
|
8235
8258
|
class: {},
|
|
8236
|
-
extra: {}
|
|
8259
|
+
extra: {},
|
|
8260
|
+
tableLayout: {},
|
|
8261
|
+
labelStyle: {},
|
|
8262
|
+
valueStyle: {}
|
|
8237
8263
|
},
|
|
8238
8264
|
emits: ["register"],
|
|
8239
8265
|
setup(__props, { expose: __expose, emit: __emit }) {
|
|
@@ -8279,7 +8305,10 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8279
8305
|
align: propsData.align,
|
|
8280
8306
|
colon: propsData.colon,
|
|
8281
8307
|
style: propsData.style,
|
|
8282
|
-
class: propsData.class
|
|
8308
|
+
class: propsData.class,
|
|
8309
|
+
tableLayout: propsData.tableLayout,
|
|
8310
|
+
labelStyle: propsData.labelStyle,
|
|
8311
|
+
valueStyle: propsData.valueStyle
|
|
8283
8312
|
};
|
|
8284
8313
|
});
|
|
8285
8314
|
const getSchema = computed(() => {
|
|
@@ -8413,7 +8442,7 @@ const _sfc_main$1 = /* @__PURE__ */ defineComponent({
|
|
|
8413
8442
|
};
|
|
8414
8443
|
}
|
|
8415
8444
|
});
|
|
8416
|
-
const BasicDescription = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-
|
|
8445
|
+
const BasicDescription = /* @__PURE__ */ _export_sfc(_sfc_main$1, [["__scopeId", "data-v-f100005c"]]);
|
|
8417
8446
|
function useDescription(props) {
|
|
8418
8447
|
const descriptionRef = ref(null);
|
|
8419
8448
|
const loadedRef = ref(false);
|