@gopowerteam/table-render 0.0.149 → 0.0.150
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/cjs/config/provide.config.d.ts +1 -1
- package/dist/cjs/hooks/use-events.d.ts +1 -1
- package/dist/cjs/hooks/use-table.d.ts +1 -1
- package/dist/cjs/index.cjs +1 -1
- package/dist/cjs/interfaces/table-column-options.d.ts +3 -3
- package/dist/cjs/interfaces/table-column-render.d.ts +2 -2
- package/dist/cjs/interfaces/table-load-params.d.ts +2 -2
- package/dist/cjs/table-columns/dropdown/index.d.ts +1 -1
- package/dist/cjs/table-render/index.d.ts +16 -1118
- package/dist/cjs/table-render/table-column-render.d.ts +4 -4
- package/dist/cjs/table-render/table-edit-render.d.ts +1 -1
- package/dist/cjs/table-render/table-selection-render.d.ts +2 -2
- package/dist/cjs/table-render/table-view-render.d.ts +3 -3
- package/dist/cjs/utils/create-table-form.d.ts +1 -1
- package/dist/cjs/utils/create-table-source.d.ts +1 -1
- package/dist/cjs/utils/page.service.d.ts +1 -1
- package/dist/cjs/utils/sort.service.d.ts +1 -1
- package/dist/es/config/provide.config.d.ts +1 -1
- package/dist/es/hooks/use-events.d.ts +1 -1
- package/dist/es/hooks/use-table.d.ts +1 -1
- package/dist/es/index.mjs +14 -14
- package/dist/es/interfaces/table-column-options.d.ts +3 -3
- package/dist/es/interfaces/table-column-render.d.ts +2 -2
- package/dist/es/interfaces/table-load-params.d.ts +2 -2
- package/dist/es/table-columns/dropdown/index.d.ts +1 -1
- package/dist/es/table-render/index.d.ts +16 -1118
- package/dist/es/table-render/table-column-render.d.ts +4 -4
- package/dist/es/table-render/table-edit-render.d.ts +1 -1
- package/dist/es/table-render/table-selection-render.d.ts +2 -2
- package/dist/es/table-render/table-view-render.d.ts +3 -3
- package/dist/es/utils/create-table-form.d.ts +1 -1
- package/dist/es/utils/create-table-source.d.ts +1 -1
- package/dist/es/utils/page.service.d.ts +1 -1
- package/dist/es/utils/sort.service.d.ts +1 -1
- package/dist/style.css +1 -1
- package/package.json +1 -1
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { EventEmits } from '../hooks';
|
|
2
|
-
import { RenderColumnType } from '../utils';
|
|
3
|
-
import { ColumnsGroup, TableColumnOptions, TableColumnSharedOptions, TableColumnsOptions } from '../interfaces';
|
|
4
|
-
import { Ref } from 'vue';
|
|
5
1
|
import { TableColumnData, TableData } from '@arco-design/web-vue';
|
|
2
|
+
import { Ref } from 'vue';
|
|
3
|
+
import { ColumnsGroup, TableColumnOptions, TableColumnSharedOptions, TableColumnsOptions } from '../interfaces';
|
|
4
|
+
import { RenderColumnType } from '../utils';
|
|
5
|
+
import { EventEmits } from '../hooks';
|
|
6
6
|
|
|
7
7
|
/**
|
|
8
8
|
* 生成Render模板
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TableRenderContext, TableRenderOptions, TableRenderProps } from '.';
|
|
2
|
-
import { TableData, TableRowSelection } from '@arco-design/web-vue';
|
|
3
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { TableData, TableRowSelection } from '@arco-design/web-vue';
|
|
3
|
+
import { TableRenderContext, TableRenderOptions, TableRenderProps } from '.';
|
|
4
4
|
|
|
5
5
|
export declare function tableSecletionRender(props: TableRenderProps, ctx: TableRenderContext, { tableSource, }: TableRenderOptions): {
|
|
6
6
|
selectedRowKeys: Ref<(string | number)[]>;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { RenderSingleButtonColumnOptions } from '../table-columns/button';
|
|
2
|
-
import { DataRecord, TableColumnsOptions } from '..';
|
|
3
1
|
import { PropType } from 'vue';
|
|
2
|
+
import { DataRecord, TableColumnsOptions } from '..';
|
|
3
|
+
import { RenderSingleButtonColumnOptions } from '../table-columns/button';
|
|
4
4
|
|
|
5
5
|
declare const _default: import('vue').DefineComponent<{
|
|
6
6
|
record: {
|
|
@@ -65,8 +65,8 @@ declare const _default: import('vue').DefineComponent<{
|
|
|
65
65
|
default: () => never[];
|
|
66
66
|
};
|
|
67
67
|
}>>, {
|
|
68
|
-
minWidth: number;
|
|
69
68
|
layout: "horizontal" | "vertical" | "inline-horizontal" | "inline-vertical";
|
|
69
|
+
minWidth: number;
|
|
70
70
|
buttons: RenderSingleButtonColumnOptions<DataRecord>[];
|
|
71
71
|
border: boolean;
|
|
72
72
|
exclude: string[];
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { DataRecord, TableColumnsOptions } from '../interfaces';
|
|
2
1
|
import { Ref } from 'vue';
|
|
2
|
+
import { DataRecord, TableColumnsOptions } from '../interfaces';
|
|
3
3
|
|
|
4
4
|
export declare function createTableSource(columns: TableColumnsOptions): [Ref<DataRecord[]>, (source: DataRecord[]) => void];
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { PageableOptions } from '../interfaces/pageable-options';
|
|
2
1
|
import { AdapterResponse, RequestPlugin, RequestSendOptions } from '@gopowerteam/request';
|
|
2
|
+
import { PageableOptions } from '../interfaces/pageable-options';
|
|
3
3
|
|
|
4
4
|
export declare class PageService implements RequestPlugin, PageableOptions {
|
|
5
5
|
data: {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { SortableOptions } from '../interfaces';
|
|
2
1
|
import { RequestPlugin, RequestSendOptions } from '@gopowerteam/request';
|
|
2
|
+
import { SortableOptions } from '../interfaces';
|
|
3
3
|
|
|
4
4
|
export declare class SortService implements RequestPlugin, SortableOptions {
|
|
5
5
|
private sort;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { DataRecord, TableColumnsOptions } from '..';
|
|
2
1
|
import { FormItemsOptions } from '@gopowerteam/form-render';
|
|
2
|
+
import { DataRecord, TableColumnsOptions } from '..';
|
|
3
3
|
|
|
4
4
|
export type TableEvent = 'export' | 'reload' | 'preview' | 'edit' | 'collapse';
|
|
5
5
|
export interface TableReloadEventOptions {
|
package/dist/es/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
var ve = Object.defineProperty;
|
|
2
2
|
var xe = (e, t, r) => t in e ? ve(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
-
var
|
|
3
|
+
var k = (e, t, r) => (xe(e, typeof t != "symbol" ? t + "" : t, r), r);
|
|
4
4
|
import { ref as h, getCurrentInstance as A, onMounted as q, onUpdated as Se, reactive as ke, createVNode as s, Fragment as B, createTextVNode as $, h as Ce, render as Te, defineComponent as E, isVNode as Me, mergeProps as ne, nextTick as X, getCurrentScope as Oe, onScopeDispose as _e, unref as Re, computed as O, watchEffect as $e, withDirectives as Ye, resolveDirective as qe, readonly as Ee } from "vue";
|
|
5
5
|
import { Button as M, Tag as ze, Dropdown as Z, Descriptions as je, DescriptionsItem as Le, Divider as Pe, Space as p, Pagination as De, Transfer as Ae, Table as Be } from "@arco-design/web-vue";
|
|
6
6
|
import { useModal as z, onSubmit as Ie, ModalProvider as Ke } from "@gopowerteam/modal-render";
|
|
@@ -49,13 +49,13 @@ class P {
|
|
|
49
49
|
* @param size
|
|
50
50
|
*/
|
|
51
51
|
constructor(t = 1, r = 10) {
|
|
52
|
-
|
|
52
|
+
k(this, "data", ke({
|
|
53
53
|
index: 1,
|
|
54
54
|
size: 10,
|
|
55
55
|
total: 0
|
|
56
56
|
}));
|
|
57
|
-
|
|
58
|
-
|
|
57
|
+
k(this, "pageSizeOpts", [10, 20, 30, 40, 50]);
|
|
58
|
+
k(this, "pageLayouts", ["PrevJump", "PrevPage", "JumpNumber", "NextPage", "NextJump", "Sizes", "FullJump", "Total"]);
|
|
59
59
|
this.pageIndex = t, this.pageSize = r;
|
|
60
60
|
}
|
|
61
61
|
get pageIndex() {
|
|
@@ -632,9 +632,9 @@ function Et() {
|
|
|
632
632
|
}
|
|
633
633
|
class K {
|
|
634
634
|
constructor(t) {
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
635
|
+
k(this, "sort", {});
|
|
636
|
+
k(this, "defaultSort", {});
|
|
637
|
+
k(this, "before", (t) => {
|
|
638
638
|
t.paramsQuery = {
|
|
639
639
|
...t.paramsQuery || {},
|
|
640
640
|
sort: this.stringify(this.sort)
|
|
@@ -913,7 +913,7 @@ function Wt(e, t) {
|
|
|
913
913
|
var r;
|
|
914
914
|
if (typeof e == "number")
|
|
915
915
|
return e + t;
|
|
916
|
-
const u = ((r = e.match(
|
|
916
|
+
const u = ((r = e.match(/^-?\d+\.?\d*/)) == null ? void 0 : r[0]) || "", n = e.slice(u.length), a = Number.parseFloat(u) + t;
|
|
917
917
|
return Number.isNaN(a) ? e : a + n;
|
|
918
918
|
}
|
|
919
919
|
const le = Kt ? window : void 0;
|
|
@@ -1281,7 +1281,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1281
1281
|
let b;
|
|
1282
1282
|
switch (!0) {
|
|
1283
1283
|
case !!(c != null && c.key):
|
|
1284
|
-
b = d.value.find((
|
|
1284
|
+
b = d.value.find((S) => S[e.rowKey] === (c == null ? void 0 : c.key));
|
|
1285
1285
|
break;
|
|
1286
1286
|
case !!(c != null && c.record):
|
|
1287
1287
|
b = c == null ? void 0 : c.record;
|
|
@@ -1301,7 +1301,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1301
1301
|
let b;
|
|
1302
1302
|
switch (!0) {
|
|
1303
1303
|
case !!(c != null && c.key):
|
|
1304
|
-
b = d.value.find((
|
|
1304
|
+
b = d.value.find((S) => S[e.rowKey] === (c == null ? void 0 : c.key));
|
|
1305
1305
|
break;
|
|
1306
1306
|
case !!(c != null && c.record):
|
|
1307
1307
|
b = c == null ? void 0 : c.record;
|
|
@@ -1323,7 +1323,7 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1323
1323
|
function L(c) {
|
|
1324
1324
|
var H, J;
|
|
1325
1325
|
if (!e.dataLoad)
|
|
1326
|
-
return;
|
|
1326
|
+
return Promise.reject();
|
|
1327
1327
|
c != null && c.reset && (o && o.reset(), y && y.reset(), (H = u.value) == null || H.resetSorters());
|
|
1328
1328
|
const b = {
|
|
1329
1329
|
...((J = n.value) == null ? void 0 : J.formSource) || {}
|
|
@@ -1331,15 +1331,15 @@ const Gt = /* @__PURE__ */ E({
|
|
|
1331
1331
|
Object.keys(b).forEach((Q) => {
|
|
1332
1332
|
[null, void 0, ""].includes(b[Q]) && delete b[Q];
|
|
1333
1333
|
});
|
|
1334
|
-
const
|
|
1334
|
+
const S = e.dataLoad({
|
|
1335
1335
|
form: b,
|
|
1336
1336
|
page: o,
|
|
1337
1337
|
sort: y,
|
|
1338
1338
|
update: m
|
|
1339
1339
|
});
|
|
1340
|
-
Y(
|
|
1340
|
+
return Y(S) ? (i.value = !0, Promise.resolve(S).finally(() => {
|
|
1341
1341
|
i.value = !1;
|
|
1342
|
-
}));
|
|
1342
|
+
}), S) : Promise.resolve();
|
|
1343
1343
|
}
|
|
1344
1344
|
function de() {
|
|
1345
1345
|
a.value.open(Gt, {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { DataRecord } from '.';
|
|
2
|
-
import { TableColumnRender } from './table-column-render';
|
|
3
|
-
import { TableColumnData } from '@arco-design/web-vue';
|
|
4
1
|
import { FormItemOptions } from '@gopowerteam/form-render';
|
|
2
|
+
import { TableColumnData } from '@arco-design/web-vue';
|
|
3
|
+
import { TableColumnRender } from './table-column-render';
|
|
4
|
+
import { DataRecord } from '.';
|
|
5
5
|
|
|
6
6
|
export interface TableColumnPreviewOptions {
|
|
7
7
|
span?: number;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TableColumnOptions } from './table-column-options';
|
|
2
|
-
import { TableColumnRenders } from '../table-columns';
|
|
3
1
|
import { EventEmits } from '../hooks';
|
|
2
|
+
import { TableColumnRenders } from '../table-columns';
|
|
3
|
+
import { TableColumnOptions } from './table-column-options';
|
|
4
4
|
|
|
5
5
|
interface TableColumnRenderResultType {
|
|
6
6
|
$type?: string;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { PageableOptions } from './pageable-options';
|
|
2
|
-
import { SortableOptions } from './sortable-options';
|
|
3
1
|
import { RequestPlugin } from '@gopowerteam/request';
|
|
2
|
+
import { SortableOptions } from './sortable-options';
|
|
3
|
+
import { PageableOptions } from './pageable-options';
|
|
4
4
|
|
|
5
5
|
export interface DataRecord {
|
|
6
6
|
[key: string]: any;
|