@ftjs/antd 0.4.1 → 0.4.3
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/index.d.ts +1 -1
- package/dist/index.js +14 -5
- package/dist/vxe-table/ft-vxe-table.vue.d.ts +4 -0
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export * from './form/define-form';
|
|
2
|
-
export { registerForm } from './form/register';
|
|
2
|
+
export { registerForm, defineFormItem } from './form/register';
|
|
3
3
|
export type { FtAntdFormColumn, AntdColumnBase, RegisterColumnMap, } from './form/register';
|
|
4
4
|
export * from './vxe-table';
|
|
5
5
|
export * from './antd-table';
|
package/dist/index.js
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import { getField, useFormItem, unrefs, useForm, set, get, cloneDeep, useTable } from "@ftjs/core";
|
|
2
|
-
import { computed, toValue, createVNode, mergeProps, unref, createTextVNode, isVNode, defineComponent, createElementBlock, openBlock, Fragment, renderList, createBlock, resolveDynamicComponent, ref, useId, withCtx, createCommentVNode, createElementVNode, toDisplayString, reactive, watch, h, onMounted, onUnmounted, useTemplateRef, nextTick, normalizeStyle, renderSlot, createSlots, normalizeProps
|
|
2
|
+
import { computed, toValue, createVNode, mergeProps, unref, createTextVNode, isVNode, defineComponent, createElementBlock, openBlock, Fragment, renderList, createBlock, resolveDynamicComponent, ref, useId, withCtx, createCommentVNode, createElementVNode, toDisplayString, reactive, watch, h, onMounted, onUnmounted, useTemplateRef, nextTick, normalizeStyle, renderSlot, 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, Table, Spin, Pagination } from "ant-design-vue";
|
|
4
4
|
import dayjs from "dayjs";
|
|
5
5
|
import { SwapOutlined, SettingOutlined } from "@ant-design/icons-vue";
|
|
6
|
+
import { VxeGrid } from "vxe-table";
|
|
6
7
|
const useFormItemProps = (column) => {
|
|
7
8
|
return computed(() => {
|
|
8
9
|
const field = getField(column);
|
|
@@ -1471,6 +1472,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1471
1472
|
const pageSize = ref(props.defaultPageSize);
|
|
1472
1473
|
async function refresh() {
|
|
1473
1474
|
var _a;
|
|
1475
|
+
current.value = 1;
|
|
1474
1476
|
await ((_a = props.onSearch) == null ? void 0 : _a.call(props));
|
|
1475
1477
|
}
|
|
1476
1478
|
const definedSlots = ["pager", "loading"];
|
|
@@ -1500,10 +1502,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1500
1502
|
getSearchInfo() {
|
|
1501
1503
|
var _a;
|
|
1502
1504
|
return ((_a = searchRef.value) == null ? void 0 : _a.getFormData()) ?? {};
|
|
1503
|
-
}
|
|
1505
|
+
},
|
|
1506
|
+
/**
|
|
1507
|
+
* 刷新表格(会重置分页)
|
|
1508
|
+
*/
|
|
1509
|
+
refresh
|
|
1504
1510
|
});
|
|
1505
1511
|
return (_ctx, _cache) => {
|
|
1506
|
-
const _component_VxeGrid = resolveComponent("VxeGrid");
|
|
1507
1512
|
return openBlock(), createElementBlock("div", {
|
|
1508
1513
|
ref_key: "containerRef",
|
|
1509
1514
|
ref: containerRef,
|
|
@@ -1522,7 +1527,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1522
1527
|
}
|
|
1523
1528
|
})], 64)) : createCommentVNode("", true), createElementVNode("div", {
|
|
1524
1529
|
style: normalizeStyle(unref(tableStyle))
|
|
1525
|
-
}, [createVNode(
|
|
1530
|
+
}, [createVNode(unref(VxeGrid), mergeProps({
|
|
1526
1531
|
ref_key: "gridRef",
|
|
1527
1532
|
ref: gridRef,
|
|
1528
1533
|
border: "",
|
|
@@ -1550,7 +1555,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
1550
1555
|
showLessItems: "",
|
|
1551
1556
|
total: _ctx.total,
|
|
1552
1557
|
defaultPageSize: _ctx.defaultPageSize,
|
|
1553
|
-
onChange:
|
|
1558
|
+
onChange: _cache[2] || (_cache[2] = () => {
|
|
1559
|
+
var _a;
|
|
1560
|
+
return (_a = _ctx.onSearch) == null ? void 0 : _a.call(_ctx);
|
|
1561
|
+
})
|
|
1554
1562
|
}, null, 8, ["current", "pageSize", "total", "defaultPageSize"])])) : createCommentVNode("", true)]),
|
|
1555
1563
|
loading: withCtx(() => [_ctx.$slots.loading ? renderSlot(_ctx.$slots, "loading", {
|
|
1556
1564
|
key: 0
|
|
@@ -1572,6 +1580,7 @@ export {
|
|
|
1572
1580
|
_sfc_main$2 as FtAntdFormSearch,
|
|
1573
1581
|
_sfc_main$1 as FtAntdTable,
|
|
1574
1582
|
_sfc_main as FtVxeTable,
|
|
1583
|
+
defineFormItem,
|
|
1575
1584
|
editMap,
|
|
1576
1585
|
isComponentTuple,
|
|
1577
1586
|
registerEdit,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ftjs/antd",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.3",
|
|
4
4
|
"keywords": [],
|
|
5
5
|
"author": "",
|
|
6
6
|
"license": "MIT",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"vite": "^6.1.0",
|
|
31
31
|
"vite-plugin-dts": "^4.5.0",
|
|
32
32
|
"vue-tsc": "2.2.0",
|
|
33
|
-
"@ftjs/core": "0.4.
|
|
33
|
+
"@ftjs/core": "0.4.3"
|
|
34
34
|
},
|
|
35
35
|
"peerDependencies": {
|
|
36
36
|
"@ant-design/icons-vue": ">=7.0.0",
|