qidian-vue-ui 2.0.15 → 2.0.16

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.
@@ -1,31 +1,31 @@
1
- .qd-dialog-table-select[data-v-0fe40893] {
1
+ .qd-dialog-table-select[data-v-d632e883] {
2
2
  width: 100%;
3
3
  }
4
- .qd-dialog-table-select__trigger[data-v-0fe40893] {
4
+ .qd-dialog-table-select__trigger[data-v-d632e883] {
5
5
  width: 100%;
6
6
  }
7
- .qd-dialog-table-select__trigger[data-v-0fe40893]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
7
+ .qd-dialog-table-select__trigger[data-v-d632e883]:not(.qd-dialog-table-select__trigger--readonly):not(.qd-dialog-table-select__trigger--disabled) {
8
8
  cursor: pointer;
9
9
  }
10
- .qd-dialog-table-select__input-trigger[data-v-0fe40893] {
10
+ .qd-dialog-table-select__input-trigger[data-v-d632e883] {
11
11
  border-top-left-radius: 0;
12
12
  border-bottom-left-radius: 0;
13
13
  }
14
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-crud-search > .t-loading__parent > .t-card__body,
15
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-crud-table__body > .t-loading__parent > .t-card__body {
14
+ .qd-dialog-table-select__table[data-v-d632e883] .qd-crud-search > .t-loading__parent > .t-card__body,
15
+ .qd-dialog-table-select__table[data-v-d632e883] .qd-crud-table__body > .t-loading__parent > .t-card__body {
16
16
  padding: 0 !important;
17
17
  }
18
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-crud-table__toolbar {
18
+ .qd-dialog-table-select__table[data-v-d632e883] .qd-crud-table__toolbar {
19
19
  display: none;
20
20
  }
21
- .qd-dialog-table-select__table[data-v-0fe40893] .qd-service-table {
21
+ .qd-dialog-table-select__table[data-v-d632e883] .qd-service-table {
22
22
  margin-top: 0;
23
23
  }
24
- .qd-dialog-table-select__table-add[data-v-0fe40893] {
24
+ .qd-dialog-table-select__table-add[data-v-d632e883] {
25
25
  margin-top: var(--td-comp-margin-m);
26
26
  display: flex;
27
27
  }
28
- .qd-dialog-table-select__table-add .t-input__wrap[data-v-0fe40893] {
28
+ .qd-dialog-table-select__table-add .t-input__wrap[data-v-d632e883] {
29
29
  flex: 1 1 0;
30
30
  overflow: hidden;
31
31
  margin-right: var(--td-comp-margin-m);
@@ -23,6 +23,13 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
23
23
  default?: (props: {
24
24
  selectedRows: import("@vue/reactivity").UnwrapRefSimple<D>[];
25
25
  }) => any;
26
+ } & {
27
+ 'dialog-footer'?: (props: {
28
+ cancel: (event: MouseEvent) => void;
29
+ confirm: () => Promise<boolean | void>;
30
+ confirmLoading: boolean;
31
+ selectedOptions: D[];
32
+ }) => any;
26
33
  } & {
27
34
  'dialog-footer-extend'?: (props: {}) => any;
28
35
  } & {
@@ -2,7 +2,7 @@ import './index.css'
2
2
  import _sfc_main from "./index.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-0fe40893"]]);
5
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-d632e883"]]);
6
6
  export {
7
7
  index as default
8
8
  };
@@ -609,6 +609,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
609
609
  }
610
610
  return onConfirm(...eventParams, done);
611
611
  }
612
+ function handleFooterCancel(event) {
613
+ visible.value = false;
614
+ reProps.value.dialogOptions.onCancel?.({
615
+ e: event
616
+ });
617
+ }
612
618
  function openDialog() {
613
619
  const {
614
620
  selectOptions
@@ -825,10 +831,19 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
825
831
  };
826
832
  })]), 1040, ["search-data", "data", "selected-row-keys", "active-row-keys", "column-controller-visible", "expanded-rowKeys", "filter-value", "sort", "expanded-tree-nodes", "onSelectChange"])]),
827
833
  _: 2
828
- }, [_ctx.$slots["dialog-footer-extend"] ? {
834
+ }, [_ctx.$slots["dialog-footer"] ? {
835
+ name: "footer",
836
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer", {
837
+ cancel: handleFooterCancel,
838
+ confirm: () => handleConfirm(),
839
+ confirmLoading: confirmLoad.value,
840
+ selectedOptions: unref(latestSelectedRows)
841
+ }, void 0, true)]),
842
+ key: "0"
843
+ } : void 0, _ctx.$slots["dialog-footer-extend"] ? {
829
844
  name: "footer-extend",
830
845
  fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer-extend", {}, void 0, true)]),
831
- key: "0"
846
+ key: "1"
832
847
  } : void 0]), 1040, ["visible", "confirm-loading"])], 64);
833
848
  };
834
849
  }
@@ -1,37 +1,37 @@
1
- .qd-dialog-tabs-table-select[data-v-f8e4cc1d] {
1
+ .qd-dialog-tabs-table-select[data-v-cb44be3e] {
2
2
  width: 100%;
3
3
  }
4
- .qd-dialog-tabs-table-select__trigger[data-v-f8e4cc1d] {
4
+ .qd-dialog-tabs-table-select__trigger[data-v-cb44be3e] {
5
5
  width: 100%;
6
6
  }
7
- .qd-dialog-tabs-table-select__trigger[data-v-f8e4cc1d]:not(.qd-dialog-tabs-table-select__trigger--readonly):not(.qd-dialog-tabs-table-select__trigger--disabled) {
7
+ .qd-dialog-tabs-table-select__trigger[data-v-cb44be3e]:not(.qd-dialog-tabs-table-select__trigger--readonly):not(.qd-dialog-tabs-table-select__trigger--disabled) {
8
8
  cursor: pointer;
9
9
  }
10
- .qd-dialog-tabs-table-select__input-trigger[data-v-f8e4cc1d] {
10
+ .qd-dialog-tabs-table-select__input-trigger[data-v-cb44be3e] {
11
11
  border-top-left-radius: 0;
12
12
  border-bottom-left-radius: 0;
13
13
  }
14
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-crud-search > .t-loading__parent > .t-card__body {
14
+ .qd-dialog-tabs-table-select__table[data-v-cb44be3e] .qd-crud-search > .t-loading__parent > .t-card__body {
15
15
  padding-left: 0 !important;
16
16
  padding-right: 0 !important;
17
17
  padding-bottom: 0 !important;
18
18
  }
19
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-crud-table__body > .t-loading__parent > .t-card__body {
19
+ .qd-dialog-tabs-table-select__table[data-v-cb44be3e] .qd-crud-table__body > .t-loading__parent > .t-card__body {
20
20
  padding-left: 0 !important;
21
21
  padding-right: 0 !important;
22
22
  padding-bottom: 0 !important;
23
23
  }
24
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-crud-table__toolbar {
24
+ .qd-dialog-tabs-table-select__table[data-v-cb44be3e] .qd-crud-table__toolbar {
25
25
  display: none;
26
26
  }
27
- .qd-dialog-tabs-table-select__table[data-v-f8e4cc1d] .qd-service-table {
27
+ .qd-dialog-tabs-table-select__table[data-v-cb44be3e] .qd-service-table {
28
28
  margin-top: 0;
29
29
  }
30
- .qd-dialog-tabs-table-select__table-add[data-v-f8e4cc1d] {
30
+ .qd-dialog-tabs-table-select__table-add[data-v-cb44be3e] {
31
31
  margin-top: var(--td-comp-margin-m);
32
32
  display: flex;
33
33
  }
34
- .qd-dialog-tabs-table-select__table-add .t-input__wrap[data-v-f8e4cc1d] {
34
+ .qd-dialog-tabs-table-select__table-add .t-input__wrap[data-v-cb44be3e] {
35
35
  flex: 1 1 0;
36
36
  overflow: hidden;
37
37
  margin-right: var(--td-comp-margin-m);
@@ -18,6 +18,14 @@ declare const _default: <D extends TableRowData = TableRowData, R = unknown, P =
18
18
  default?: (props: {
19
19
  selectedRows: import("@vue/reactivity").UnwrapRefSimple<D>[];
20
20
  }) => any;
21
+ } & {
22
+ 'dialog-footer'?: (props: {
23
+ cancel: (event: MouseEvent) => void;
24
+ confirm: () => Promise<boolean | void>;
25
+ confirmLoading: boolean;
26
+ selectedOptions: D[];
27
+ activeTab: import("tdesign-vue-next").TabValue | undefined;
28
+ }) => any;
21
29
  } & {
22
30
  'dialog-footer-extend'?: (props: {
23
31
  activeTab: import("tdesign-vue-next").TabValue | undefined;
@@ -2,7 +2,7 @@ import './index.css'
2
2
  import _sfc_main from "./index.vue2.mjs";
3
3
  /* empty css */
4
4
  import _export_sfc from "../../_virtual/_plugin-vue_export-helper.mjs";
5
- const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-f8e4cc1d"]]);
5
+ const index = /* @__PURE__ */ _export_sfc(_sfc_main, [["__scopeId", "data-v-cb44be3e"]]);
6
6
  export {
7
7
  index as default
8
8
  };
@@ -468,6 +468,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
468
468
  await nextTick();
469
469
  return handleCommonConfirm(done);
470
470
  }
471
+ function handleFooterCancel(event) {
472
+ visible.value = false;
473
+ reProps.value.dialogOptions.onCancel?.({
474
+ e: event
475
+ });
476
+ }
471
477
  const handleTabsSelectChange = useDoubleClick({
472
478
  shouldReset: (tab, rowKeys, options) => {
473
479
  const change = lastRowKey.value !== options.currentRowKey;
@@ -1007,12 +1013,22 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
1007
1013
  };
1008
1014
  })]), 1040, ["active-tab", "search-data", "tabs", "shared-search", "sync-service-key"])]),
1009
1015
  _: 2
1010
- }, [_ctx.$slots["dialog-footer-extend"] ? {
1016
+ }, [_ctx.$slots["dialog-footer"] ? {
1017
+ name: "footer",
1018
+ fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer", {
1019
+ cancel: handleFooterCancel,
1020
+ confirm: () => handleConfirm(),
1021
+ confirmLoading: unref(confirmLoad),
1022
+ selectedOptions: unref(latestSelectedRows),
1023
+ activeTab: currentActiveTab.value
1024
+ }, void 0, true)]),
1025
+ key: "0"
1026
+ } : void 0, _ctx.$slots["dialog-footer-extend"] ? {
1011
1027
  name: "footer-extend",
1012
1028
  fn: withCtx(() => [renderSlot(_ctx.$slots, "dialog-footer-extend", {
1013
1029
  activeTab: currentActiveTab.value
1014
1030
  }, void 0, true)]),
1015
- key: "0"
1031
+ key: "1"
1016
1032
  } : void 0]), 1040, ["visible", "confirm-loading"])], 64);
1017
1033
  };
1018
1034
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "qidian-vue-ui",
3
- "version": "2.0.15",
3
+ "version": "2.0.16",
4
4
  "description": "基于 TDesign 的 QiDian Vue UI 组件库",
5
5
  "author": "qidian",
6
6
  "license": "MIT",