@epic-designer/antd 1.1.8 → 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 +2 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.mjs +2 -2
- package/package.json +1 -1
- package/src/form-item/formItem.vue +24 -2
- package/src/index.less +26 -1
- 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
|
@@ -1742,7 +1742,7 @@ const Row = {
|
|
|
1742
1742
|
props: {
|
|
1743
1743
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
1744
1744
|
},
|
|
1745
|
-
type: "
|
|
1745
|
+
type: "number"
|
|
1746
1746
|
},
|
|
1747
1747
|
{
|
|
1748
1748
|
field: "children",
|
|
@@ -2971,7 +2971,7 @@ function styleInject(css, ref) {
|
|
|
2971
2971
|
}
|
|
2972
2972
|
}
|
|
2973
2973
|
|
|
2974
|
-
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n";
|
|
2974
|
+
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n.ep-readonly {\n /* 上传组件样式 */\n}\n.ep-readonly .ant-form-item-control-input {\n pointer-events: none;\n}\n.ep-readonly .ant-upload {\n display: none !important;\n}\n.ep-readonly .ant-form-item-label {\n pointer-events: none;\n}\n.ep-readonly .ant-upload-list {\n pointer-events: auto;\n margin-bottom: 8px;\n}\n.ep-readonly .ant-upload-list [title='Remove file'] {\n display: none !important;\n}\n";
|
|
2975
2975
|
styleInject(css_248z);
|
|
2976
2976
|
|
|
2977
2977
|
function setupAntd(pluginManager = epicDesigner.pluginManager, config = {}) {
|
package/dist/index.d.cts
CHANGED
|
@@ -27,7 +27,7 @@ function styleInject(css, ref) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n";
|
|
30
|
+
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n.ep-readonly {\n /* 上传组件样式 */\n}\n.ep-readonly .ant-form-item-control-input {\n pointer-events: none;\n}\n.ep-readonly .ant-upload {\n display: none !important;\n}\n.ep-readonly .ant-form-item-label {\n pointer-events: none;\n}\n.ep-readonly .ant-upload-list {\n pointer-events: auto;\n margin-bottom: 8px;\n}\n.ep-readonly .ant-upload-list [title='Remove file'] {\n display: none !important;\n}\n";
|
|
31
31
|
styleInject(css_248z);
|
|
32
32
|
|
|
33
33
|
declare function setupAntd(pluginManager?: PluginManager, config?: SetupConfig): void;
|
package/dist/index.d.mts
CHANGED
|
@@ -27,7 +27,7 @@ function styleInject(css, ref) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n";
|
|
30
|
+
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n.ep-readonly {\n /* 上传组件样式 */\n}\n.ep-readonly .ant-form-item-control-input {\n pointer-events: none;\n}\n.ep-readonly .ant-upload {\n display: none !important;\n}\n.ep-readonly .ant-form-item-label {\n pointer-events: none;\n}\n.ep-readonly .ant-upload-list {\n pointer-events: auto;\n margin-bottom: 8px;\n}\n.ep-readonly .ant-upload-list [title='Remove file'] {\n display: none !important;\n}\n";
|
|
31
31
|
styleInject(css_248z);
|
|
32
32
|
|
|
33
33
|
declare function setupAntd(pluginManager?: PluginManager, config?: SetupConfig): void;
|
package/dist/index.d.ts
CHANGED
|
@@ -27,7 +27,7 @@ function styleInject(css, ref) {
|
|
|
27
27
|
}
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n";
|
|
30
|
+
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n.ep-readonly {\n /* 上传组件样式 */\n}\n.ep-readonly .ant-form-item-control-input {\n pointer-events: none;\n}\n.ep-readonly .ant-upload {\n display: none !important;\n}\n.ep-readonly .ant-form-item-label {\n pointer-events: none;\n}\n.ep-readonly .ant-upload-list {\n pointer-events: auto;\n margin-bottom: 8px;\n}\n.ep-readonly .ant-upload-list [title='Remove file'] {\n display: none !important;\n}\n";
|
|
31
31
|
styleInject(css_248z);
|
|
32
32
|
|
|
33
33
|
declare function setupAntd(pluginManager?: PluginManager, config?: SetupConfig): void;
|
package/dist/index.mjs
CHANGED
|
@@ -1740,7 +1740,7 @@ const Row = {
|
|
|
1740
1740
|
props: {
|
|
1741
1741
|
placeholder: "\u8BF7\u8F93\u5165"
|
|
1742
1742
|
},
|
|
1743
|
-
type: "
|
|
1743
|
+
type: "number"
|
|
1744
1744
|
},
|
|
1745
1745
|
{
|
|
1746
1746
|
field: "children",
|
|
@@ -2969,7 +2969,7 @@ function styleInject(css, ref) {
|
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
2971
|
|
|
2972
|
-
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n";
|
|
2972
|
+
var css_248z = ".epic-designer-main .ant-input-number {\n width: 100%;\n}\n.epic-designer-main .ant-collapse-content > .ant-collapse-content-box {\n padding: 8px;\n}\n.epic-designer-main .ant-select {\n width: 100%;\n}\n.epic-designer-main .epic-upload-image .avatar-uploader > .ant-upload {\n width: 128px;\n height: 128px;\n}\n.ep-input-size.ant-input-affix-wrapper {\n padding-top: 0;\n padding-right: 0;\n padding-bottom: 0;\n}\n.ep-input-size .ant-select-selector {\n border: none !important;\n box-shadow: none !important;\n padding: 0 4px !important;\n}\n.ep-readonly {\n /* 上传组件样式 */\n}\n.ep-readonly .ant-form-item-control-input {\n pointer-events: none;\n}\n.ep-readonly .ant-upload {\n display: none !important;\n}\n.ep-readonly .ant-form-item-label {\n pointer-events: none;\n}\n.ep-readonly .ant-upload-list {\n pointer-events: auto;\n margin-bottom: 8px;\n}\n.ep-readonly .ant-upload-list [title='Remove file'] {\n display: none !important;\n}\n";
|
|
2973
2973
|
styleInject(css_248z);
|
|
2974
2974
|
|
|
2975
2975
|
function setupAntd(pluginManager$1 = pluginManager, config = {}) {
|
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">
|
package/src/index.less
CHANGED
|
@@ -27,9 +27,34 @@
|
|
|
27
27
|
padding-bottom: 0;
|
|
28
28
|
}
|
|
29
29
|
|
|
30
|
-
.ant-select-selector{
|
|
30
|
+
.ant-select-selector {
|
|
31
31
|
border: none !important;
|
|
32
32
|
box-shadow: none !important;
|
|
33
33
|
padding: 0 4px !important;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
+
|
|
37
|
+
// 适配ep-readonly样式
|
|
38
|
+
.ep-readonly {
|
|
39
|
+
.ant-form-item-control-input {
|
|
40
|
+
pointer-events: none;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
.ant-upload {
|
|
44
|
+
display: none !important;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
.ant-form-item-label {
|
|
48
|
+
pointer-events: none;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/* 上传组件样式 */
|
|
52
|
+
.ant-upload-list {
|
|
53
|
+
pointer-events: auto;
|
|
54
|
+
margin-bottom: 8px;
|
|
55
|
+
|
|
56
|
+
[title='Remove file'] {
|
|
57
|
+
display: none !important;
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
}
|