@ftjs/antd 1.2.1 → 1.4.0
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/form/index.d.ts +10 -0
- package/dist/index.js +15 -10
- package/dist/vxe-table/column-edit.d.ts +3 -1
- package/package.json +11 -1
package/dist/form/index.d.ts
CHANGED
|
@@ -25,6 +25,16 @@ export interface FtAntdFormProps<F extends Record<string, any>> extends FtFormPr
|
|
|
25
25
|
* @default false
|
|
26
26
|
*/
|
|
27
27
|
hideReset?: boolean;
|
|
28
|
+
/**
|
|
29
|
+
* 提交按钮文本
|
|
30
|
+
* @default '确认'
|
|
31
|
+
*/
|
|
32
|
+
confirmText?: string;
|
|
33
|
+
/**
|
|
34
|
+
* 重置按钮文本
|
|
35
|
+
* @default '重置'
|
|
36
|
+
*/
|
|
37
|
+
resetText?: string;
|
|
28
38
|
}
|
|
29
39
|
export interface FtAntdFormSearchProps<F extends Record<string, any>> extends FtFormProps<F> {
|
|
30
40
|
}
|
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { getField, useFormItem, unrefs, useFormInject, toValueWithForm, useForm, set, useTable, get } from "@ftjs/core";
|
|
2
|
-
import { computed, toValue, createVNode, mergeProps, unref, createTextVNode, isVNode, defineComponent, createBlock, openBlock, resolveDynamicComponent, createElementBlock, Fragment, renderList, ref, useId, withCtx, renderSlot, createCommentVNode,
|
|
2
|
+
import { computed, toValue, createVNode, mergeProps, unref, createTextVNode, isVNode, defineComponent, createBlock, openBlock, resolveDynamicComponent, createElementBlock, Fragment, renderList, ref, useId, withCtx, renderSlot, createCommentVNode, toDisplayString, createElementVNode, onMounted, h, useTemplateRef, normalizeStyle, createSlots, normalizeProps } from "vue";
|
|
3
3
|
import { FormItem, Input, Select, DatePicker, RangePicker, Radio, Textarea, Upload, Cascader, AutoComplete, CheckboxGroup, InputNumber, Mentions, Rate, Slider, Switch, TreeSelect, Form, Button, Modal, Tree, Divider, Spin, Pagination } from "ant-design-vue";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import { SwapOutlined, SettingOutlined } from "@ant-design/icons-vue";
|
|
@@ -551,11 +551,13 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
551
551
|
hideFooter: { type: Boolean },
|
|
552
552
|
hideConfirm: { type: Boolean },
|
|
553
553
|
hideReset: { type: Boolean },
|
|
554
|
+
confirmText: { default: "确认" },
|
|
555
|
+
resetText: { default: "重置" },
|
|
554
556
|
columns: {},
|
|
555
557
|
internalFormProps: {},
|
|
556
558
|
formData: {},
|
|
557
|
-
"onUpdate:formData": {
|
|
558
|
-
onSubmit: {
|
|
559
|
+
"onUpdate:formData": {},
|
|
560
|
+
onSubmit: {},
|
|
559
561
|
isView: { type: Boolean },
|
|
560
562
|
cache: {}
|
|
561
563
|
},
|
|
@@ -613,9 +615,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
613
615
|
type: "primary",
|
|
614
616
|
htmlType: "submit"
|
|
615
617
|
}, {
|
|
616
|
-
default: withCtx(() =>
|
|
617
|
-
createTextVNode(
|
|
618
|
-
])
|
|
618
|
+
default: withCtx(() => [
|
|
619
|
+
createTextVNode(toDisplayString(_ctx.confirmText), 1)
|
|
620
|
+
]),
|
|
619
621
|
_: 1
|
|
620
622
|
})) : createCommentVNode("", true),
|
|
621
623
|
!_ctx.hideReset ? (openBlock(), createBlock(unref(Button), {
|
|
@@ -625,9 +627,9 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
|
|
|
625
627
|
danger: "",
|
|
626
628
|
onClick: _cache[0] || (_cache[0] = () => unref(resetToDefault)())
|
|
627
629
|
}, {
|
|
628
|
-
default: withCtx(() =>
|
|
629
|
-
createTextVNode(
|
|
630
|
-
])
|
|
630
|
+
default: withCtx(() => [
|
|
631
|
+
createTextVNode(toDisplayString(_ctx.resetText), 1)
|
|
632
|
+
]),
|
|
631
633
|
_: 1
|
|
632
634
|
})) : createCommentVNode("", true)
|
|
633
635
|
]),
|
|
@@ -914,6 +916,8 @@ function isComponentTuple(value) {
|
|
|
914
916
|
return Array.isArray(value);
|
|
915
917
|
}
|
|
916
918
|
const editMap = /* @__PURE__ */ new Map([
|
|
919
|
+
["auto-complete", AutoComplete],
|
|
920
|
+
["cascader", Cascader],
|
|
917
921
|
["input", Input],
|
|
918
922
|
["select", Select],
|
|
919
923
|
["input-number", InputNumber],
|
|
@@ -1054,7 +1058,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1054
1058
|
value2 = valueSetter(value2);
|
|
1055
1059
|
}
|
|
1056
1060
|
set(row, field, value2);
|
|
1057
|
-
}
|
|
1061
|
+
},
|
|
1062
|
+
style: "width: 100%"
|
|
1058
1063
|
};
|
|
1059
1064
|
return h(component, props2);
|
|
1060
1065
|
} : null,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Refs } from '@ftjs/core';
|
|
2
|
-
import { InputProps, SelectProps, SwitchProps, InputNumberProps } from 'ant-design-vue';
|
|
2
|
+
import { InputProps, SelectProps, SwitchProps, InputNumberProps, AutoCompleteProps, CascaderProps } from 'ant-design-vue';
|
|
3
3
|
import { Component, MaybeRefOrGetter } from 'vue';
|
|
4
4
|
import { VxeTableDefines } from 'vxe-table';
|
|
5
5
|
export interface Edit<Type, Props, Row extends Record<string, any>> {
|
|
@@ -20,6 +20,8 @@ export interface Edit<Type, Props, Row extends Record<string, any>> {
|
|
|
20
20
|
rules?: MaybeRefOrGetter<VxeTableDefines.ValidatorRule<Row>[]>;
|
|
21
21
|
}
|
|
22
22
|
export interface EditMap<_TableData extends Record<string, any>> {
|
|
23
|
+
"auto-complete": Edit<"auto-complete", Refs<AutoCompleteProps>, _TableData>;
|
|
24
|
+
cascader: Edit<"cascader", Refs<CascaderProps>, _TableData>;
|
|
23
25
|
input: Edit<"input", Refs<InputProps>, _TableData>;
|
|
24
26
|
select: Edit<"select", Refs<SelectProps>, _TableData>;
|
|
25
27
|
switch: Edit<"switch", Refs<SwitchProps>, _TableData>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ftjs/antd",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -40,6 +40,16 @@
|
|
|
40
40
|
"dayjs": ">=1.0.0",
|
|
41
41
|
"vxe-table": ">=4.0.0"
|
|
42
42
|
},
|
|
43
|
+
"publishConfig": {
|
|
44
|
+
"access": "public",
|
|
45
|
+
"registry": "https://registry.npmjs.org/",
|
|
46
|
+
"provenance": true
|
|
47
|
+
},
|
|
48
|
+
"repository": {
|
|
49
|
+
"type": "git",
|
|
50
|
+
"url": "https://github.com/yuhengshen/ftjs",
|
|
51
|
+
"directory": "packages/antd"
|
|
52
|
+
},
|
|
43
53
|
"scripts": {
|
|
44
54
|
"build": "vite build",
|
|
45
55
|
"minify": "pnpm dlx esbuild ./dist/index.js --minify --outfile=./dist/index.min.js"
|