@tmagic/table 1.5.0-beta.0 → 1.5.0-beta.2

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.
@@ -255,7 +255,8 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
255
255
  key: 0,
256
256
  placement: _ctx.config.popover.placement,
257
257
  width: _ctx.config.popover.width,
258
- trigger: _ctx.config.popover.trigger
258
+ trigger: _ctx.config.popover.trigger,
259
+ "destroy-on-close": _ctx.config.popover.destroyOnClose ?? true
259
260
  }, {
260
261
  reference: withCtx(() => [
261
262
  createVNode(unref(TMagicButton), {
@@ -277,7 +278,7 @@ const _sfc_main$2 = /* @__PURE__ */ defineComponent({
277
278
  }, null, 8, ["show-header", "columns", "data"])) : createCommentVNode("", true)
278
279
  ]),
279
280
  _: 2
280
- }, 1032, ["placement", "width", "trigger"])) : createCommentVNode("", true)
281
+ }, 1032, ["placement", "width", "trigger", "destroy-on-close"])) : createCommentVNode("", true)
281
282
  ]),
282
283
  _: 1
283
284
  }, 8, ["label", "width", "fixed"]);
@@ -255,7 +255,8 @@
255
255
  key: 0,
256
256
  placement: _ctx.config.popover.placement,
257
257
  width: _ctx.config.popover.width,
258
- trigger: _ctx.config.popover.trigger
258
+ trigger: _ctx.config.popover.trigger,
259
+ "destroy-on-close": _ctx.config.popover.destroyOnClose ?? true
259
260
  }, {
260
261
  reference: vue.withCtx(() => [
261
262
  vue.createVNode(vue.unref(design.TMagicButton), {
@@ -277,7 +278,7 @@
277
278
  }, null, 8, ["show-header", "columns", "data"])) : vue.createCommentVNode("", true)
278
279
  ]),
279
280
  _: 2
280
- }, 1032, ["placement", "width", "trigger"])) : vue.createCommentVNode("", true)
281
+ }, 1032, ["placement", "width", "trigger", "destroy-on-close"])) : vue.createCommentVNode("", true)
281
282
  ]),
282
283
  _: 1
283
284
  }, 8, ["label", "width", "fixed"]);
package/package.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.0-beta.0",
2
+ "version": "1.5.0-beta.2",
3
3
  "name": "@tmagic/table",
4
4
  "type": "module",
5
5
  "main": "dist/tmagic-table.umd.cjs",
@@ -46,9 +46,9 @@
46
46
  "peerDependencies": {
47
47
  "vue": "^3.4.35",
48
48
  "typescript": "*",
49
- "@tmagic/design": "1.5.0-beta.0",
50
- "@tmagic/utils": "1.5.0-beta.0",
51
- "@tmagic/form": "1.5.0-beta.0"
49
+ "@tmagic/form": "1.5.0-beta.2",
50
+ "@tmagic/design": "1.5.0-beta.2",
51
+ "@tmagic/utils": "1.5.0-beta.2"
52
52
  },
53
53
  "peerDependenciesMeta": {
54
54
  "typescript": {
@@ -6,6 +6,7 @@
6
6
  :placement="config.popover.placement"
7
7
  :width="config.popover.width"
8
8
  :trigger="config.popover.trigger"
9
+ :destroy-on-close="config.popover.destroyOnClose ?? true"
9
10
  >
10
11
  <MTable
11
12
  v-if="config.popover.tableEmbed"
package/src/schema.ts CHANGED
@@ -50,7 +50,7 @@ export interface ColumnConfig<T = any> {
50
50
  table?: ColumnConfig[];
51
51
  formatter?: 'datetime' | ((item: any, row: T) => any);
52
52
  popover?: {
53
- placement:
53
+ placement?:
54
54
  | 'auto'
55
55
  | 'auto-start'
56
56
  | 'auto-end'
@@ -66,9 +66,10 @@ export interface ColumnConfig<T = any> {
66
66
  | 'right-end'
67
67
  | 'left-start'
68
68
  | 'left-end';
69
- width: string | number;
70
- trigger: 'hover' | 'click';
71
- tableEmbed: boolean;
69
+ width?: string | number;
70
+ trigger?: 'hover' | 'click';
71
+ tableEmbed?: boolean;
72
+ destroyOnClose?: boolean;
72
73
  };
73
74
  sortable?: boolean | 'custom';
74
75
  action?: 'tip' | 'actionLink' | 'img' | 'link' | 'tag';
package/types/index.d.ts CHANGED
@@ -35,10 +35,11 @@ interface ColumnConfig<T = any> {
35
35
  table?: ColumnConfig[];
36
36
  formatter?: 'datetime' | ((item: any, row: T) => any);
37
37
  popover?: {
38
- placement: 'auto' | 'auto-start' | 'auto-end' | 'left' | 'right' | 'top' | 'bottom' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
39
- width: string | number;
40
- trigger: 'hover' | 'click';
41
- tableEmbed: boolean;
38
+ placement?: 'auto' | 'auto-start' | 'auto-end' | 'left' | 'right' | 'top' | 'bottom' | 'top-start' | 'top-end' | 'bottom-start' | 'bottom-end' | 'right-start' | 'right-end' | 'left-start' | 'left-end';
39
+ width?: string | number;
40
+ trigger?: 'hover' | 'click';
41
+ tableEmbed?: boolean;
42
+ destroyOnClose?: boolean;
42
43
  };
43
44
  sortable?: boolean | 'custom';
44
45
  action?: 'tip' | 'actionLink' | 'img' | 'link' | 'tag';