@epic-designer/antd 1.1.9-beta.0 → 1.1.9-beta.1
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/chunks/formItem.cjs +18 -3
- package/dist/chunks/formItem.mjs +19 -4
- package/dist/index.cjs +1 -1
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/form-item/formItem.vue +24 -2
- package/src/row/index.ts +1 -1
package/dist/chunks/formItem.cjs
CHANGED
|
@@ -5,11 +5,26 @@ const antDesignVue = require('ant-design-vue');
|
|
|
5
5
|
|
|
6
6
|
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
|
|
7
7
|
__name: "formItem",
|
|
8
|
+
props: {
|
|
9
|
+
checkPayload: { type: [Object, null], required: false }
|
|
10
|
+
},
|
|
8
11
|
setup(__props) {
|
|
9
|
-
const
|
|
12
|
+
const props = __props;
|
|
13
|
+
const rawAttrs = vue.useAttrs();
|
|
14
|
+
const attrs = vue.computed(() => {
|
|
15
|
+
var _a;
|
|
16
|
+
if (!props.checkPayload) {
|
|
17
|
+
return rawAttrs;
|
|
18
|
+
}
|
|
19
|
+
return {
|
|
20
|
+
...rawAttrs,
|
|
21
|
+
help: (_a = props.checkPayload.message) != null ? _a : props.checkPayload.result ? "\u6821\u9A8C\u901A\u8FC7" : "\u6821\u9A8C\u5931\u8D25",
|
|
22
|
+
validateStatus: props.checkPayload.result ? "success" : "error"
|
|
23
|
+
};
|
|
24
|
+
});
|
|
10
25
|
return (_ctx, _cache) => {
|
|
11
|
-
return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.FormItem), vue.mergeProps(
|
|
12
|
-
name:
|
|
26
|
+
return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.FormItem), vue.mergeProps(attrs.value, {
|
|
27
|
+
name: attrs.value.field
|
|
13
28
|
}), {
|
|
14
29
|
default: vue.withCtx(() => [
|
|
15
30
|
vue.renderSlot(_ctx.$slots, "default")
|
package/dist/chunks/formItem.mjs
CHANGED
|
@@ -1,13 +1,28 @@
|
|
|
1
|
-
import { defineComponent, useAttrs, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
|
|
1
|
+
import { defineComponent, useAttrs, computed, createBlock, openBlock, unref, mergeProps, withCtx, renderSlot } from 'vue';
|
|
2
2
|
import { FormItem } from 'ant-design-vue';
|
|
3
3
|
|
|
4
4
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
5
|
__name: "formItem",
|
|
6
|
+
props: {
|
|
7
|
+
checkPayload: { type: [Object, null], required: false }
|
|
8
|
+
},
|
|
6
9
|
setup(__props) {
|
|
7
|
-
const
|
|
10
|
+
const props = __props;
|
|
11
|
+
const rawAttrs = useAttrs();
|
|
12
|
+
const attrs = computed(() => {
|
|
13
|
+
var _a;
|
|
14
|
+
if (!props.checkPayload) {
|
|
15
|
+
return rawAttrs;
|
|
16
|
+
}
|
|
17
|
+
return {
|
|
18
|
+
...rawAttrs,
|
|
19
|
+
help: (_a = props.checkPayload.message) != null ? _a : props.checkPayload.result ? "\u6821\u9A8C\u901A\u8FC7" : "\u6821\u9A8C\u5931\u8D25",
|
|
20
|
+
validateStatus: props.checkPayload.result ? "success" : "error"
|
|
21
|
+
};
|
|
22
|
+
});
|
|
8
23
|
return (_ctx, _cache) => {
|
|
9
|
-
return openBlock(), createBlock(unref(FormItem), mergeProps(
|
|
10
|
-
name:
|
|
24
|
+
return openBlock(), createBlock(unref(FormItem), mergeProps(attrs.value, {
|
|
25
|
+
name: attrs.value.field
|
|
11
26
|
}), {
|
|
12
27
|
default: withCtx(() => [
|
|
13
28
|
renderSlot(_ctx.$slots, "default")
|
package/dist/index.cjs
CHANGED
package/dist/index.mjs
CHANGED
package/package.json
CHANGED
|
@@ -1,9 +1,31 @@
|
|
|
1
1
|
<script lang="ts" setup>
|
|
2
|
-
import { useAttrs } from 'vue';
|
|
2
|
+
import { computed, useAttrs } from 'vue';
|
|
3
3
|
|
|
4
4
|
import { FormItem } from 'ant-design-vue';
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
type FormItemCheckPayload = {
|
|
7
|
+
message?: string;
|
|
8
|
+
result?: boolean;
|
|
9
|
+
};
|
|
10
|
+
|
|
11
|
+
const props = defineProps<{
|
|
12
|
+
checkPayload?: FormItemCheckPayload | null;
|
|
13
|
+
}>();
|
|
14
|
+
|
|
15
|
+
const rawAttrs = useAttrs();
|
|
16
|
+
const attrs = computed<any>(() => {
|
|
17
|
+
if (!props.checkPayload) {
|
|
18
|
+
return rawAttrs;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return {
|
|
22
|
+
...rawAttrs,
|
|
23
|
+
help:
|
|
24
|
+
props.checkPayload.message ??
|
|
25
|
+
(props.checkPayload.result ? '校验通过' : '校验失败'),
|
|
26
|
+
validateStatus: props.checkPayload.result ? 'success' : 'error',
|
|
27
|
+
};
|
|
28
|
+
});
|
|
7
29
|
</script>
|
|
8
30
|
<template>
|
|
9
31
|
<FormItem v-bind="attrs" :name="attrs.field">
|