@dao-style/core 0.7.0 → 0.8.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.
@@ -17,7 +17,7 @@ var __spreadValues = (a, b) => {
17
17
  return a;
18
18
  };
19
19
  var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
20
- import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock, toRef, h, toDisplayString, createVNode, withCtx, createTextVNode, ref, inject, watchEffect, mergeProps, provide, readonly, toRefs, withKeys, normalizeStyle, withDirectives, vShow, watch, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, Transition, nextTick, resolveDynamicComponent, createSlots, withModifiers, reactive, renderList, getCurrentScope, onScopeDispose, vModelText, onUnmounted } from "vue";
20
+ import { defineComponent, computed, openBlock, createElementBlock, normalizeClass, renderSlot, createCommentVNode, createElementVNode, unref, resolveComponent, Fragment, createBlock, toRef, h, resolveDynamicComponent, toDisplayString, createVNode, withCtx, createTextVNode, ref, inject, watchEffect, mergeProps, provide, readonly, toRefs, withKeys, normalizeStyle, withDirectives, vShow, watch, getCurrentInstance, onMounted, onBeforeUnmount, Teleport, Transition, nextTick, createSlots, withModifiers, reactive, renderList, getCurrentScope, onScopeDispose, vModelText, onUnmounted } from "vue";
21
21
  import { useI18n } from "vue-i18n";
22
22
  import { isFunction as isFunction$1, isArray as isArray$2, isSet, looseIndexOf, looseEqual, NOOP } from "@vue/shared";
23
23
  var common = "";
@@ -61,7 +61,7 @@ const _sfc_main$U = defineComponent({
61
61
  };
62
62
  }
63
63
  });
64
- const _hoisted_1$D = ["disabled"];
64
+ const _hoisted_1$C = ["disabled"];
65
65
  function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
66
66
  return openBlock(), createElementBlock("button", {
67
67
  class: normalizeClass([
@@ -78,7 +78,7 @@ function _sfc_render$Q(_ctx, _cache, $props, $setup, $data, $options) {
78
78
  class: normalizeClass(["dao-action-icon__iconfont", _ctx.name])
79
79
  }, null, 2)) : createCommentVNode("", true)
80
80
  ])
81
- ], 10, _hoisted_1$D);
81
+ ], 10, _hoisted_1$C);
82
82
  }
83
83
  var DaoActionIcon = /* @__PURE__ */ _export_sfc(_sfc_main$U, [["render", _sfc_render$Q]]);
84
84
  const BUTTON_TYPES = ["primary", "secondary", "tertiary", "ghost", "danger"];
@@ -132,7 +132,7 @@ const _sfc_main$T = defineComponent({
132
132
  }
133
133
  }
134
134
  });
135
- const _hoisted_1$C = {
135
+ const _hoisted_1$B = {
136
136
  key: 1,
137
137
  class: "dao-icon dao-svg-icon"
138
138
  };
@@ -141,7 +141,7 @@ function _sfc_render$P(_ctx, _cache, $props, $setup, $data, $options) {
141
141
  return _ctx.useFont ? (openBlock(), createElementBlock("i", {
142
142
  key: 0,
143
143
  class: normalizeClass(["dao-icon dao-iconfont", _ctx.name])
144
- }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$C, [
144
+ }, null, 2)) : (openBlock(), createElementBlock("svg", _hoisted_1$B, [
145
145
  createElementVNode("use", {
146
146
  "xlink:href": `#${_ctx.name}`
147
147
  }, null, 8, _hoisted_2$p)
@@ -244,7 +244,7 @@ const _sfc_main$S = defineComponent({
244
244
  };
245
245
  }
246
246
  });
247
- const _hoisted_1$B = ["disabled"];
247
+ const _hoisted_1$A = ["disabled"];
248
248
  const _hoisted_2$o = {
249
249
  key: 1,
250
250
  class: "dao-btn__text"
@@ -273,7 +273,7 @@ function _sfc_render$O(_ctx, _cache, $props, $setup, $data, $options) {
273
273
  name: _ctx.realIconRight
274
274
  }, null, 8, ["class", "use-font", "name"])) : createCommentVNode("", true)
275
275
  ], 64))
276
- ], 10, _hoisted_1$B);
276
+ ], 10, _hoisted_1$A);
277
277
  }
278
278
  var DaoButton = /* @__PURE__ */ _export_sfc(_sfc_main$S, [["render", _sfc_render$O]]);
279
279
  const textButtonType = ["default", "action", "link", "custom"];
@@ -338,7 +338,7 @@ const _sfc_main$R = defineComponent({
338
338
  return [key, newSlot];
339
339
  }));
340
340
  });
341
- return () => h(props.tag, __spreadValues({}, componentComputed.value), slotTemp.value);
341
+ return () => h(resolveDynamicComponent(props.tag), __spreadValues({}, componentComputed.value), slotTemp.value);
342
342
  }
343
343
  });
344
344
  const BatchBarProps = {
@@ -397,7 +397,7 @@ const _sfc_main$Q = defineComponent({
397
397
  };
398
398
  }
399
399
  });
400
- const _hoisted_1$A = {
400
+ const _hoisted_1$z = {
401
401
  key: 0,
402
402
  class: "dao-batch-bar"
403
403
  };
@@ -407,7 +407,7 @@ const _hoisted_4$c = { class: "dao-batch-bar__action" };
407
407
  function _sfc_render$N(_ctx, _cache, $props, $setup, $data, $options) {
408
408
  const _component_dao_text_button = resolveComponent("dao-text-button");
409
409
  const _component_dao_button = resolveComponent("dao-button");
410
- return _ctx.showSelf ? (openBlock(), createElementBlock("div", _hoisted_1$A, [
410
+ return _ctx.showSelf ? (openBlock(), createElementBlock("div", _hoisted_1$z, [
411
411
  createElementVNode("div", _hoisted_2$n, [
412
412
  createElementVNode("span", _hoisted_3$f, toDisplayString(_ctx.text.selected), 1),
413
413
  createVNode(_component_dao_text_button, {
@@ -440,9 +440,9 @@ var buttonGroup_vue_vue_type_style_index_0_lang = "";
440
440
  const _sfc_main$P = defineComponent({
441
441
  name: "DaoButtonGroup"
442
442
  });
443
- const _hoisted_1$z = { class: "dao-btn-group" };
443
+ const _hoisted_1$y = { class: "dao-btn-group" };
444
444
  function _sfc_render$M(_ctx, _cache, $props, $setup, $data, $options) {
445
- return openBlock(), createElementBlock("div", _hoisted_1$z, [
445
+ return openBlock(), createElementBlock("div", _hoisted_1$y, [
446
446
  renderSlot(_ctx.$slots, "default")
447
447
  ]);
448
448
  }
@@ -476,7 +476,7 @@ const _sfc_main$O = defineComponent({
476
476
  }
477
477
  }
478
478
  });
479
- const _hoisted_1$y = {
479
+ const _hoisted_1$x = {
480
480
  key: 0,
481
481
  class: "dao-card-header"
482
482
  };
@@ -491,7 +491,7 @@ function _sfc_render$L(_ctx, _cache, $props, $setup, $data, $options) {
491
491
  return openBlock(), createElementBlock("div", {
492
492
  class: normalizeClass(["dao-card", `dao-card--${_ctx.type}`])
493
493
  }, [
494
- _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$y, [
494
+ _ctx.type !== "headless" ? (openBlock(), createElementBlock("div", _hoisted_1$x, [
495
495
  renderSlot(_ctx.$slots, "header", {}, () => [
496
496
  renderSlot(_ctx.$slots, "header-prefix"),
497
497
  _ctx.icon || _ctx.$slots.icon ? (openBlock(), createElementBlock("div", _hoisted_2$m, [
@@ -536,9 +536,9 @@ var cardItem_scss_vue_type_style_index_0_src_lang = "";
536
536
  const _sfc_main$N = defineComponent({
537
537
  name: "DaoCardItem"
538
538
  });
539
- const _hoisted_1$x = { class: "dao-card-item" };
539
+ const _hoisted_1$w = { class: "dao-card-item" };
540
540
  function _sfc_render$K(_ctx, _cache, $props, $setup, $data, $options) {
541
- return openBlock(), createElementBlock("div", _hoisted_1$x, [
541
+ return openBlock(), createElementBlock("div", _hoisted_1$w, [
542
542
  renderSlot(_ctx.$slots, "default")
543
543
  ]);
544
544
  }
@@ -727,7 +727,7 @@ const _sfc_main$M = defineComponent({
727
727
  }
728
728
  }
729
729
  });
730
- const _hoisted_1$w = ["disabled", "indeterminate", "checked"];
730
+ const _hoisted_1$v = ["disabled", "indeterminate", "checked"];
731
731
  const _hoisted_2$l = /* @__PURE__ */ createElementVNode("span", { class: "dao-checkbox-inner" }, null, -1);
732
732
  const _hoisted_3$d = {
733
733
  key: 0,
@@ -756,7 +756,7 @@ function _sfc_render$J(_ctx, _cache, $props, $setup, $data, $options) {
756
756
  }, _ctx.$attrs, {
757
757
  checked: _ctx.currentChecked,
758
758
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
759
- }), null, 16, _hoisted_1$w),
759
+ }), null, 16, _hoisted_1$v),
760
760
  _hoisted_2$l
761
761
  ], 2),
762
762
  _ctx.hasLabel ? (openBlock(), createElementBlock("span", _hoisted_3$d, [
@@ -2061,7 +2061,7 @@ const _sfc_main$K = defineComponent({
2061
2061
  };
2062
2062
  }
2063
2063
  });
2064
- const _hoisted_1$v = ["id", "aria-hidden", "tabindex"];
2064
+ const _hoisted_1$u = ["id", "aria-hidden", "tabindex"];
2065
2065
  const _hoisted_2$k = {
2066
2066
  ref: "arrow",
2067
2067
  class: "dao-popper-arrow"
@@ -2105,7 +2105,7 @@ function _sfc_render$H(_ctx, _cache, $props, $setup, $data, $options) {
2105
2105
  withDirectives(createElementVNode("div", _hoisted_2$k, _hoisted_4$9, 512), [
2106
2106
  [vShow, _ctx.visibleArrow]
2107
2107
  ])
2108
- ], 42, _hoisted_1$v);
2108
+ ], 42, _hoisted_1$u);
2109
2109
  }
2110
2110
  var PopperContent = /* @__PURE__ */ _export_sfc(_sfc_main$K, [["render", _sfc_render$H]]);
2111
2111
  var PopperProps = {
@@ -2198,7 +2198,7 @@ function updatePopperOptions(popperInstance, modifiers, popperOptions = {}) {
2198
2198
  });
2199
2199
  }
2200
2200
  function getActualRoot(app) {
2201
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
2201
+ var _a2, _b2, _c, _d, _e, _f;
2202
2202
  let internalRoot = "body";
2203
2203
  if (!app) {
2204
2204
  return internalRoot;
@@ -2207,10 +2207,7 @@ function getActualRoot(app) {
2207
2207
  if ((ele == null ? void 0 : ele.nodeType) !== Node.ELEMENT_NODE && (ele == null ? void 0 : ele.nodeType) !== Node.DOCUMENT_FRAGMENT_NODE && (ele == null ? void 0 : ele.nodeType) !== Node.DOCUMENT_NODE) {
2208
2208
  ele = ele == null ? void 0 : ele.parentNode;
2209
2209
  }
2210
- const rootNode = (_g = ele == null ? void 0 : ele.getRootNode) == null ? void 0 : _g.call(ele);
2211
- if (rootNode) {
2212
- internalRoot = (_h = rootNode.body) != null ? _h : rootNode;
2213
- }
2210
+ internalRoot = ele;
2214
2211
  return internalRoot;
2215
2212
  }
2216
2213
  const _sfc_main$J = defineComponent({
@@ -2767,7 +2764,7 @@ const _sfc_main$G = defineComponent({
2767
2764
  };
2768
2765
  }
2769
2766
  });
2770
- const _hoisted_1$u = { key: 1 };
2767
+ const _hoisted_1$t = { key: 1 };
2771
2768
  function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
2772
2769
  return openBlock(), createBlock(resolveDynamicComponent(_ctx.ComponentType), {
2773
2770
  ref: "ComponentRef",
@@ -2800,7 +2797,7 @@ function _sfc_render$F(_ctx, _cache, $props, $setup, $data, $options) {
2800
2797
  key: 0,
2801
2798
  show: _ctx.isOpen,
2802
2799
  ellipsis: _ctx.isEllipsis
2803
- }) : _ctx.content ? (openBlock(), createElementBlock("span", _hoisted_1$u, toDisplayString(_ctx.content), 1)) : renderSlot(_ctx.$slots, "default", { key: 2 })
2800
+ }) : _ctx.content ? (openBlock(), createElementBlock("span", _hoisted_1$t, toDisplayString(_ctx.content), 1)) : renderSlot(_ctx.$slots, "default", { key: 2 })
2804
2801
  ])
2805
2802
  } : void 0
2806
2803
  ]), 1032, ["disabled", "placement", "offset", "class", "append-to", "delay", "popper-class", "width"]);
@@ -2830,12 +2827,12 @@ const _sfc_main$F = defineComponent({
2830
2827
  };
2831
2828
  }
2832
2829
  });
2833
- const _hoisted_1$t = { class: "dao-dialog__header" };
2830
+ const _hoisted_1$s = { class: "dao-dialog__header" };
2834
2831
  const _hoisted_2$j = { class: "dao-dialog__header--title" };
2835
2832
  function _sfc_render$E(_ctx, _cache, $props, $setup, $data, $options) {
2836
2833
  const _component_dao_ellipsis = resolveComponent("dao-ellipsis");
2837
2834
  const _component_dao_action_icon = resolveComponent("dao-action-icon");
2838
- return openBlock(), createElementBlock("div", _hoisted_1$t, [
2835
+ return openBlock(), createElementBlock("div", _hoisted_1$s, [
2839
2836
  renderSlot(_ctx.$slots, "default", {}, () => [
2840
2837
  createElementVNode("span", _hoisted_2$j, [
2841
2838
  renderSlot(_ctx.$slots, "before-title"),
@@ -2899,10 +2896,10 @@ const _sfc_main$E = defineComponent({
2899
2896
  };
2900
2897
  }
2901
2898
  });
2902
- const _hoisted_1$s = { class: "dao-dialog__footer" };
2899
+ const _hoisted_1$r = { class: "dao-dialog__footer" };
2903
2900
  function _sfc_render$D(_ctx, _cache, $props, $setup, $data, $options) {
2904
2901
  const _component_dao_button = resolveComponent("dao-button");
2905
- return openBlock(), createElementBlock("div", _hoisted_1$s, [
2902
+ return openBlock(), createElementBlock("div", _hoisted_1$r, [
2906
2903
  renderSlot(_ctx.$slots, "default", {}, () => [
2907
2904
  createVNode(_component_dao_button, {
2908
2905
  type: "ghost",
@@ -3133,7 +3130,7 @@ const _sfc_main$D = defineComponent({
3133
3130
  };
3134
3131
  }
3135
3132
  });
3136
- const _hoisted_1$r = { class: "dao-dialog__body" };
3133
+ const _hoisted_1$q = { class: "dao-dialog__body" };
3137
3134
  function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
3138
3135
  const _component_dialog_header = resolveComponent("dialog-header");
3139
3136
  const _component_dialog_footer = resolveComponent("dialog-footer");
@@ -3178,7 +3175,7 @@ function _sfc_render$C(_ctx, _cache, $props, $setup, $data, $options) {
3178
3175
  ]),
3179
3176
  _: 3
3180
3177
  }, 8, ["title", "show-close", "onClose"])) : createCommentVNode("", true),
3181
- createElementVNode("div", _hoisted_1$r, [
3178
+ createElementVNode("div", _hoisted_1$q, [
3182
3179
  renderSlot(_ctx.$slots, "default")
3183
3180
  ]),
3184
3181
  _ctx.footer ? (openBlock(), createBlock(_component_dialog_footer, {
@@ -3393,7 +3390,7 @@ const _sfc_main$C = defineComponent({
3393
3390
  };
3394
3391
  }
3395
3392
  });
3396
- const _hoisted_1$q = { class: "dao-drawer__content" };
3393
+ const _hoisted_1$p = { class: "dao-drawer__content" };
3397
3394
  const _hoisted_2$i = {
3398
3395
  key: 0,
3399
3396
  class: "dao-drawer__header"
@@ -3438,7 +3435,7 @@ function _sfc_render$B(_ctx, _cache, $props, $setup, $data, $options) {
3438
3435
  withDirectives(createElementVNode("div", {
3439
3436
  class: normalizeClass(_ctx.contentClassList)
3440
3437
  }, [
3441
- createElementVNode("div", _hoisted_1$q, [
3438
+ createElementVNode("div", _hoisted_1$p, [
3442
3439
  !_ctx.hideHeader ? (openBlock(), createElementBlock("div", _hoisted_2$i, [
3443
3440
  renderSlot(_ctx.$slots, "header", {}, () => [
3444
3441
  createElementVNode("div", _hoisted_3$b, [
@@ -3556,7 +3553,7 @@ const _sfc_main$B = defineComponent({
3556
3553
  };
3557
3554
  }
3558
3555
  });
3559
- const _hoisted_1$p = { tabindex: "0" };
3556
+ const _hoisted_1$o = { tabindex: "0" };
3560
3557
  function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
3561
3558
  const _component_dao_popper = resolveComponent("dao-popper");
3562
3559
  return openBlock(), createBlock(_component_dao_popper, {
@@ -3575,7 +3572,7 @@ function _sfc_render$A(_ctx, _cache, $props, $setup, $data, $options) {
3575
3572
  renderSlot(_ctx.$slots, "menu")
3576
3573
  ]),
3577
3574
  default: withCtx(() => [
3578
- createElementVNode("div", _hoisted_1$p, [
3575
+ createElementVNode("div", _hoisted_1$o, [
3579
3576
  renderSlot(_ctx.$slots, "default")
3580
3577
  ])
3581
3578
  ]),
@@ -3587,9 +3584,9 @@ var dropdownMenu_vue_vue_type_style_index_0_lang = "";
3587
3584
  const _sfc_main$A = defineComponent({
3588
3585
  name: "DaoDropdownMenu"
3589
3586
  });
3590
- const _hoisted_1$o = { class: "dao-dropdown-menu" };
3587
+ const _hoisted_1$n = { class: "dao-dropdown-menu" };
3591
3588
  function _sfc_render$z(_ctx, _cache, $props, $setup, $data, $options) {
3592
- return openBlock(), createElementBlock("ul", _hoisted_1$o, [
3589
+ return openBlock(), createElementBlock("ul", _hoisted_1$n, [
3593
3590
  renderSlot(_ctx.$slots, "default")
3594
3591
  ]);
3595
3592
  }
@@ -3860,7 +3857,7 @@ const _sfc_main$x = defineComponent({
3860
3857
  };
3861
3858
  }
3862
3859
  });
3863
- const _hoisted_1$n = {
3860
+ const _hoisted_1$m = {
3864
3861
  key: 0,
3865
3862
  class: "dao-expansion-item-header-handler"
3866
3863
  };
@@ -3897,7 +3894,7 @@ function _sfc_render$w(_ctx, _cache, $props, $setup, $data, $options) {
3897
3894
  class: "dao-expansion-item-header",
3898
3895
  onClick: _cache[2] || (_cache[2] = (...args) => _ctx.onItemClick && _ctx.onItemClick(...args))
3899
3896
  }, [
3900
- _ctx.$slots.handler ? (openBlock(), createElementBlock("div", _hoisted_1$n, [
3897
+ _ctx.$slots.handler ? (openBlock(), createElementBlock("div", _hoisted_1$m, [
3901
3898
  renderSlot(_ctx.$slots, "handler")
3902
3899
  ])) : createCommentVNode("", true),
3903
3900
  !_ctx.$slots.trigger ? (openBlock(), createElementBlock("div", _hoisted_2$h, [
@@ -4063,9 +4060,9 @@ const _sfc_main$v = defineComponent({
4063
4060
  }
4064
4061
  }
4065
4062
  });
4066
- const _hoisted_1$m = { class: "dao-error-text" };
4063
+ const _hoisted_1$l = { class: "dao-error-text" };
4067
4064
  function _sfc_render$u(_ctx, _cache, $props, $setup, $data, $options) {
4068
- return openBlock(), createElementBlock("div", _hoisted_1$m, [
4065
+ return openBlock(), createElementBlock("div", _hoisted_1$l, [
4069
4066
  renderSlot(_ctx.$slots, "default", {}, () => [
4070
4067
  createTextVNode(toDisplayString(_ctx.content), 1)
4071
4068
  ])
@@ -4082,9 +4079,9 @@ const _sfc_main$u = defineComponent({
4082
4079
  }
4083
4080
  }
4084
4081
  });
4085
- const _hoisted_1$l = { class: "dao-helper-text" };
4082
+ const _hoisted_1$k = { class: "dao-helper-text" };
4086
4083
  function _sfc_render$t(_ctx, _cache, $props, $setup, $data, $options) {
4087
- return openBlock(), createElementBlock("div", _hoisted_1$l, [
4084
+ return openBlock(), createElementBlock("div", _hoisted_1$k, [
4088
4085
  renderSlot(_ctx.$slots, "default", {}, () => [
4089
4086
  createTextVNode(toDisplayString(_ctx.content), 1)
4090
4087
  ])
@@ -4131,7 +4128,7 @@ const _sfc_main$t = defineComponent({
4131
4128
  };
4132
4129
  }
4133
4130
  });
4134
- const _hoisted_1$k = { class: "dao-form-item__label-icon-wrapper" };
4131
+ const _hoisted_1$j = { class: "dao-form-item__label-icon-wrapper" };
4135
4132
  const _hoisted_2$g = /* @__PURE__ */ createElementVNode("i", { class: "dao-form-item__label-icon icon-unknow" }, null, -1);
4136
4133
  function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
4137
4134
  const _component_dao_ellipsis = resolveComponent("dao-ellipsis");
@@ -4147,7 +4144,7 @@ function _sfc_render$s(_ctx, _cache, $props, $setup, $data, $options) {
4147
4144
  style: normalizeStyle(_ctx.labelStyle)
4148
4145
  }, [
4149
4146
  renderSlot(_ctx.$slots, "label", {}, () => [
4150
- createElementVNode("div", _hoisted_1$k, [
4147
+ createElementVNode("div", _hoisted_1$j, [
4151
4148
  createVNode(_component_dao_ellipsis, { class: "dao-form-item__label-icon-label" }, {
4152
4149
  default: withCtx(() => [
4153
4150
  createTextVNode(toDisplayString(_ctx.label), 1)
@@ -4197,10 +4194,10 @@ const _sfc_main$s = defineComponent({
4197
4194
  }
4198
4195
  }
4199
4196
  });
4200
- const _hoisted_1$j = { class: "dao-form-group" };
4197
+ const _hoisted_1$i = { class: "dao-form-group" };
4201
4198
  const _hoisted_2$f = { class: "dao-form-group__title" };
4202
4199
  function _sfc_render$r(_ctx, _cache, $props, $setup, $data, $options) {
4203
- return openBlock(), createElementBlock("div", _hoisted_1$j, [
4200
+ return openBlock(), createElementBlock("div", _hoisted_1$i, [
4204
4201
  createElementVNode("div", _hoisted_2$f, [
4205
4202
  renderSlot(_ctx.$slots, "title", {}, () => [
4206
4203
  createTextVNode(toDisplayString(_ctx.title), 1)
@@ -4690,7 +4687,7 @@ const _sfc_main$o = defineComponent({
4690
4687
  };
4691
4688
  }
4692
4689
  });
4693
- const _hoisted_1$i = {
4690
+ const _hoisted_1$h = {
4694
4691
  key: 0,
4695
4692
  class: "dao-input-prepend"
4696
4693
  };
@@ -4711,7 +4708,7 @@ function _sfc_render$n(_ctx, _cache, $props, $setup, $data, $options) {
4711
4708
  const _component_dao_icon = resolveComponent("dao-icon");
4712
4709
  return openBlock(), createElementBlock("div", mergeProps({ class: _ctx.wrapClasses }, _ctx.rootAttrs), [
4713
4710
  renderSlot(_ctx.$slots, "prepend", {}, () => [
4714
- _ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$i, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
4711
+ _ctx.prepend ? (openBlock(), createElementBlock("div", _hoisted_1$h, toDisplayString(_ctx.prepend), 1)) : createCommentVNode("", true)
4715
4712
  ]),
4716
4713
  createElementVNode("div", {
4717
4714
  class: normalizeClass(["dao-input-inner", { "dao-input__changing-number": _ctx.isChangingNumber }])
@@ -4852,7 +4849,7 @@ const _sfc_main$n = defineComponent({
4852
4849
  };
4853
4850
  }
4854
4851
  });
4855
- const _hoisted_1$h = { class: "dao-message-icon" };
4852
+ const _hoisted_1$g = { class: "dao-message-icon" };
4856
4853
  const _hoisted_2$d = { class: "dao-message-section" };
4857
4854
  const _hoisted_3$8 = {
4858
4855
  key: 0,
@@ -4876,7 +4873,7 @@ function _sfc_render$m(_ctx, _cache, $props, $setup, $data, $options) {
4876
4873
  "dao-message-only-content": _ctx.onlyContent
4877
4874
  }])
4878
4875
  }, [
4879
- createElementVNode("div", _hoisted_1$h, [
4876
+ createElementVNode("div", _hoisted_1$g, [
4880
4877
  renderSlot(_ctx.$slots, "icon", {}, () => [
4881
4878
  createElementVNode("i", {
4882
4879
  class: normalizeClass(`icon-sys-${_ctx.type} dao-message-icon-general dao-message-icon-${_ctx.type}`)
@@ -5072,10 +5069,10 @@ const _sfc_main$m = defineComponent({
5072
5069
  });
5073
5070
  }
5074
5071
  });
5075
- const _hoisted_1$g = { class: "dao-nav-bar" };
5072
+ const _hoisted_1$f = { class: "dao-nav-bar" };
5076
5073
  const _hoisted_2$c = { class: "dao-nav" };
5077
5074
  function _sfc_render$l(_ctx, _cache, $props, $setup, $data, $options) {
5078
- return openBlock(), createElementBlock("nav", _hoisted_1$g, [
5075
+ return openBlock(), createElementBlock("nav", _hoisted_1$f, [
5079
5076
  renderSlot(_ctx.$slots, "header"),
5080
5077
  createElementVNode("ul", _hoisted_2$c, [
5081
5078
  renderSlot(_ctx.$slots, "default")
@@ -5119,7 +5116,7 @@ const _sfc_main$l = defineComponent({
5119
5116
  };
5120
5117
  }
5121
5118
  });
5122
- const _hoisted_1$f = { class: "dao-nav__head-text dao-nav-text" };
5119
+ const _hoisted_1$e = { class: "dao-nav__head-text dao-nav-text" };
5123
5120
  function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
5124
5121
  const _component_dao_icon = resolveComponent("dao-icon");
5125
5122
  const _component_dao_ellipsis = resolveComponent("dao-ellipsis");
@@ -5136,7 +5133,7 @@ function _sfc_render$k(_ctx, _cache, $props, $setup, $data, $options) {
5136
5133
  onClick: _ctx.handleClickBack,
5137
5134
  onKeydown: withKeys(withModifiers(_ctx.handleClickBack, ["stop"]), ["esc"])
5138
5135
  }, null, 8, ["name", "use-font", "onClick", "onKeydown"])) : createCommentVNode("", true),
5139
- createElementVNode("span", _hoisted_1$f, [
5136
+ createElementVNode("span", _hoisted_1$e, [
5140
5137
  createVNode(_component_dao_ellipsis, { "ellipsis-placement": "right" }, {
5141
5138
  default: withCtx(() => [
5142
5139
  createTextVNode(toDisplayString(_ctx.title), 1)
@@ -5230,7 +5227,7 @@ const _sfc_main$k = defineComponent({
5230
5227
  };
5231
5228
  }
5232
5229
  });
5233
- const _hoisted_1$e = { class: "dao-nav-slot" };
5230
+ const _hoisted_1$d = { class: "dao-nav-slot" };
5234
5231
  const _hoisted_2$b = { class: "dao-nav__item-text dao-nav-text" };
5235
5232
  function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
5236
5233
  const _component_dao_icon = resolveComponent("dao-icon");
@@ -5244,7 +5241,7 @@ function _sfc_render$j(_ctx, _cache, $props, $setup, $data, $options) {
5244
5241
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
5245
5242
  onKeydown: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
5246
5243
  }, [
5247
- createElementVNode("div", _hoisted_1$e, [
5244
+ createElementVNode("div", _hoisted_1$d, [
5248
5245
  renderSlot(_ctx.$slots, "default", {}, () => [
5249
5246
  _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
5250
5247
  key: 0,
@@ -5389,7 +5386,7 @@ const _sfc_main$j = defineComponent({
5389
5386
  };
5390
5387
  }
5391
5388
  });
5392
- const _hoisted_1$d = { class: "dao-nav-slot" };
5389
+ const _hoisted_1$c = { class: "dao-nav-slot" };
5393
5390
  const _hoisted_2$a = { class: "dao-nav__sub-text dao-nav-text" };
5394
5391
  const _hoisted_3$7 = {
5395
5392
  key: 0,
@@ -5410,7 +5407,7 @@ function _sfc_render$i(_ctx, _cache, $props, $setup, $data, $options) {
5410
5407
  onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args)),
5411
5408
  onKeydown: _cache[1] || (_cache[1] = withKeys((...args) => _ctx.handleClick && _ctx.handleClick(...args), ["enter"]))
5412
5409
  }, [
5413
- createElementVNode("div", _hoisted_1$d, [
5410
+ createElementVNode("div", _hoisted_1$c, [
5414
5411
  renderSlot(_ctx.$slots, "title", {}, () => [
5415
5412
  _ctx.showIcon ? (openBlock(), createBlock(_component_dao_icon, {
5416
5413
  key: 0,
@@ -5999,7 +5996,7 @@ const _sfc_main$i = defineComponent({
5999
5996
  };
6000
5997
  }
6001
5998
  });
6002
- const _hoisted_1$c = { class: "dao-selection-text" };
5999
+ const _hoisted_1$b = { class: "dao-selection-text" };
6003
6000
  const _hoisted_2$9 = /* @__PURE__ */ createElementVNode("i", { class: "icon-dropdown-line dao-selection-icon" }, null, -1);
6004
6001
  const _hoisted_3$6 = {
6005
6002
  key: 0,
@@ -6101,7 +6098,7 @@ function _sfc_render$h(_ctx, _cache, $props, $setup, $data, $options) {
6101
6098
  ],
6102
6099
  onClick: _cache[1] || (_cache[1] = ($event) => _ctx.state.visible = !_ctx.state.visible)
6103
6100
  }, [
6104
- withDirectives(createElementVNode("span", _hoisted_1$c, [
6101
+ withDirectives(createElementVNode("span", _hoisted_1$b, [
6105
6102
  _ctx.multiple ? renderSlot(_ctx.$slots, "selected", {
6106
6103
  key: 0,
6107
6104
  selectedLabel: _ctx.state.selectedOption.map((o) => o.label),
@@ -6217,7 +6214,7 @@ const _sfc_main$h = defineComponent({
6217
6214
  };
6218
6215
  }
6219
6216
  });
6220
- const _hoisted_1$b = ["title"];
6217
+ const _hoisted_1$a = ["title"];
6221
6218
  const _hoisted_2$8 = {
6222
6219
  key: 0,
6223
6220
  class: "icon-checked dao-option-checkmark"
@@ -6241,7 +6238,7 @@ function _sfc_render$g(_ctx, _cache, $props, $setup, $data, $options) {
6241
6238
  renderSlot(_ctx.$slots, "default", {}, () => [
6242
6239
  createTextVNode(toDisplayString(_ctx.labelValue), 1)
6243
6240
  ])
6244
- ], 8, _hoisted_1$b),
6241
+ ], 8, _hoisted_1$a),
6245
6242
  _ctx.isSelected ? (openBlock(), createElementBlock("i", _hoisted_2$8)) : createCommentVNode("", true)
6246
6243
  ], 2)), [
6247
6244
  [vShow, _ctx.visible]
@@ -6366,7 +6363,7 @@ const _sfc_main$g = defineComponent({
6366
6363
  };
6367
6364
  }
6368
6365
  });
6369
- const _hoisted_1$a = ["disabled"];
6366
+ const _hoisted_1$9 = ["disabled"];
6370
6367
  const _hoisted_2$7 = { class: "dao-pagination__pager-total" };
6371
6368
  function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
6372
6369
  const _component_dao_option = resolveComponent("dao-option");
@@ -6399,7 +6396,7 @@ function _sfc_render$f(_ctx, _cache, $props, $setup, $data, $options) {
6399
6396
  disabled: _ctx.totalPage <= 1,
6400
6397
  onKeydown: _cache[2] || (_cache[2] = withKeys((...args) => _ctx.targetPage && _ctx.targetPage(...args), ["enter"])),
6401
6398
  onInput: _cache[3] || (_cache[3] = (...args) => _ctx.currentShowPageFormat && _ctx.currentShowPageFormat(...args))
6402
- }, null, 40, _hoisted_1$a), [
6399
+ }, null, 40, _hoisted_1$9), [
6403
6400
  [vModelText, _ctx.currentShowPage]
6404
6401
  ]),
6405
6402
  createElementVNode("span", _hoisted_2$7, " / " + toDisplayString(_ctx.totalPage), 1),
@@ -6445,7 +6442,7 @@ const _sfc_main$f = defineComponent({
6445
6442
  },
6446
6443
  bgColor: {
6447
6444
  type: String,
6448
- default: "#ebeef5"
6445
+ default: "#eeeeee"
6449
6446
  },
6450
6447
  fill: {
6451
6448
  type: [Array, String],
@@ -6484,7 +6481,7 @@ const _sfc_main$f = defineComponent({
6484
6481
  };
6485
6482
  }
6486
6483
  });
6487
- const _hoisted_1$9 = { class: "dao-progress" };
6484
+ const _hoisted_1$8 = { class: "dao-progress" };
6488
6485
  const _hoisted_2$6 = {
6489
6486
  key: 1,
6490
6487
  class: "dao-progress__stacked"
@@ -6494,7 +6491,7 @@ const _hoisted_3$5 = {
6494
6491
  class: "dao-progress__text"
6495
6492
  };
6496
6493
  function _sfc_render$e(_ctx, _cache, $props, $setup, $data, $options) {
6497
- return openBlock(), createElementBlock("div", _hoisted_1$9, [
6494
+ return openBlock(), createElementBlock("div", _hoisted_1$8, [
6498
6495
  createElementVNode("div", {
6499
6496
  class: "dao-progress__inner",
6500
6497
  style: normalizeStyle({ background: _ctx.bgColor })
@@ -6590,7 +6587,7 @@ const _sfc_main$e = defineComponent({
6590
6587
  };
6591
6588
  }
6592
6589
  });
6593
- const _hoisted_1$8 = ["disabled", "name", "checked"];
6590
+ const _hoisted_1$7 = ["disabled", "name", "checked"];
6594
6591
  const _hoisted_2$5 = /* @__PURE__ */ createElementVNode("span", { class: "dao-radio-inner" }, null, -1);
6595
6592
  const _hoisted_3$4 = {
6596
6593
  key: 0,
@@ -6618,7 +6615,7 @@ function _sfc_render$d(_ctx, _cache, $props, $setup, $data, $options) {
6618
6615
  name: _ctx.name,
6619
6616
  checked: _ctx.currentValue,
6620
6617
  onChange: _cache[0] || (_cache[0] = (...args) => _ctx.change && _ctx.change(...args))
6621
- }, null, 40, _hoisted_1$8),
6618
+ }, null, 40, _hoisted_1$7),
6622
6619
  _hoisted_2$5
6623
6620
  ], 2),
6624
6621
  _ctx.$slots.default || _ctx.label || _ctx.$slots.helper ? (openBlock(), createElementBlock("div", _hoisted_3$4, [
@@ -6742,7 +6739,7 @@ const _sfc_main$c = defineComponent({
6742
6739
  };
6743
6740
  }
6744
6741
  });
6745
- const _hoisted_1$7 = ["value", "name", "disabled"];
6742
+ const _hoisted_1$6 = ["value", "name", "disabled"];
6746
6743
  const _hoisted_2$4 = {
6747
6744
  key: 0,
6748
6745
  class: "dao-switch__label"
@@ -6758,7 +6755,7 @@ function _sfc_render$b(_ctx, _cache, $props, $setup, $data, $options) {
6758
6755
  value: _ctx.currentValue,
6759
6756
  name: _ctx.name,
6760
6757
  disabled: _ctx.disabled
6761
- }, null, 8, _hoisted_1$7),
6758
+ }, null, 8, _hoisted_1$6),
6762
6759
  createElementVNode("span", {
6763
6760
  class: normalizeClass(["dao-switch__pill", { "dao-switch-checked": _ctx.currentValue }])
6764
6761
  }, null, 2),
@@ -6814,9 +6811,9 @@ const _sfc_main$b = defineComponent({
6814
6811
  };
6815
6812
  }
6816
6813
  });
6817
- const _hoisted_1$6 = { class: "dao-table-resizer-separator" };
6814
+ const _hoisted_1$5 = { class: "dao-table-resizer-separator" };
6818
6815
  function _sfc_render$a(_ctx, _cache, $props, $setup, $data, $options) {
6819
- return openBlock(), createElementBlock("span", _hoisted_1$6, [
6816
+ return openBlock(), createElementBlock("span", _hoisted_1$5, [
6820
6817
  !_ctx.disabled ? (openBlock(), createElementBlock("span", {
6821
6818
  key: 0,
6822
6819
  class: "dao-table-resizer-handle",
@@ -6853,12 +6850,12 @@ const _sfc_main$a = defineComponent({
6853
6850
  },
6854
6851
  emits: ["close"]
6855
6852
  });
6856
- const _hoisted_1$5 = { class: "dao-tag" };
6853
+ const _hoisted_1$4 = { class: "dao-tag" };
6857
6854
  const _hoisted_2$3 = { class: "dao-tag__key" };
6858
6855
  const _hoisted_3$3 = { class: "dao-tag__value" };
6859
6856
  function _sfc_render$9(_ctx, _cache, $props, $setup, $data, $options) {
6860
6857
  const _component_dao_icon = resolveComponent("dao-icon");
6861
- return openBlock(), createElementBlock("span", _hoisted_1$5, [
6858
+ return openBlock(), createElementBlock("span", _hoisted_1$4, [
6862
6859
  renderSlot(_ctx.$slots, "default", {}, () => [
6863
6860
  createElementVNode("span", null, [
6864
6861
  createElementVNode("span", _hoisted_2$3, [
@@ -7221,7 +7218,7 @@ const _sfc_main$8 = defineComponent({
7221
7218
  };
7222
7219
  }
7223
7220
  });
7224
- const _hoisted_1$4 = { class: "dao-toolbar" };
7221
+ const _hoisted_1$3 = { class: "dao-toolbar" };
7225
7222
  const _hoisted_2$2 = {
7226
7223
  key: 0,
7227
7224
  class: "dao-toolbar__filter"
@@ -7249,7 +7246,7 @@ function _sfc_render$7(_ctx, _cache, $props, $setup, $data, $options) {
7249
7246
  "dao-toolbar-container--with-rounded": !_ctx.noRounded
7250
7247
  }])
7251
7248
  }, [
7252
- createElementVNode("div", _hoisted_1$4, [
7249
+ createElementVNode("div", _hoisted_1$3, [
7253
7250
  _ctx.$slots.filter ? (openBlock(), createElementBlock("div", _hoisted_2$2, [
7254
7251
  renderSlot(_ctx.$slots, "filter", { classNames: {
7255
7252
  label: "dao-toolbar__filter-label",
@@ -7357,7 +7354,7 @@ const _sfc_main$7 = defineComponent({
7357
7354
  };
7358
7355
  }
7359
7356
  });
7360
- const _hoisted_1$3 = /* @__PURE__ */ createElementVNode("img", {
7357
+ const _hoisted_1$2 = /* @__PURE__ */ createElementVNode("img", {
7361
7358
  src: _imports_0,
7362
7359
  alt: ""
7363
7360
  }, null, -1);
@@ -7366,7 +7363,7 @@ function _sfc_render$6(_ctx, _cache, $props, $setup, $data, $options) {
7366
7363
  class: normalizeClass(["dao-empty", `dao-empty--${_ctx.type}`])
7367
7364
  }, [
7368
7365
  renderSlot(_ctx.$slots, "default", {}, () => [
7369
- _hoisted_1$3
7366
+ _hoisted_1$2
7370
7367
  ]),
7371
7368
  _ctx.$slots.title || _ctx.formattedTitle ? renderSlot(_ctx.$slots, "title", {
7372
7369
  key: 0,
@@ -8162,7 +8159,7 @@ const _sfc_main$5 = defineComponent({
8162
8159
  };
8163
8160
  }
8164
8161
  });
8165
- const _hoisted_1$2 = {
8162
+ const _hoisted_1$1 = {
8166
8163
  key: 0,
8167
8164
  class: "dao-table__toolbar"
8168
8165
  };
@@ -8216,7 +8213,7 @@ function _sfc_render$4(_ctx, _cache, $props, $setup, $data, $options) {
8216
8213
  "dao-table-container--with-rounded": !_ctx.noRounded && _ctx.showToolbar
8217
8214
  }])
8218
8215
  }, [
8219
- _ctx.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_1$2, [
8216
+ _ctx.showToolbar ? (openBlock(), createElementBlock("div", _hoisted_1$1, [
8220
8217
  createVNode(_component_dao_toolbar, {
8221
8218
  search: _ctx.searchModel,
8222
8219
  "onUpdate:search": _cache[0] || (_cache[0] = ($event) => _ctx.searchModel = $event),
@@ -8635,7 +8632,7 @@ const _sfc_main$3 = defineComponent({
8635
8632
  };
8636
8633
  }
8637
8634
  });
8638
- const _hoisted_1$1 = { class: "dao-tabs__nav__wrap" };
8635
+ const _hoisted_1 = { class: "dao-tabs__nav__wrap" };
8639
8636
  const _hoisted_2 = {
8640
8637
  key: 0,
8641
8638
  class: "dao-tabs__action"
@@ -8652,7 +8649,7 @@ function _sfc_render$3(_ctx, _cache, $props, $setup, $data, $options) {
8652
8649
  createElementVNode("div", {
8653
8650
  class: normalizeClass(["dao-tabs__header", "dao-tabs__header--" + _ctx.type])
8654
8651
  }, [
8655
- createElementVNode("div", _hoisted_1$1, [
8652
+ createElementVNode("div", _hoisted_1, [
8656
8653
  createVNode(_component_tab_nav, {
8657
8654
  type: _ctx.type,
8658
8655
  "tab-list": _ctx.tabList,
@@ -8713,7 +8710,16 @@ function _sfc_render$2(_ctx, _cache, $props, $setup, $data, $options) {
8713
8710
  ], 2);
8714
8711
  }
8715
8712
  var tabItem = /* @__PURE__ */ _export_sfc(_sfc_main$2, [["render", _sfc_render$2]]);
8716
- const transferProps = {
8713
+ function simpleOmit(target, keys) {
8714
+ return Object.fromEntries(Object.entries(target).filter(([key]) => !keys.includes(key)));
8715
+ }
8716
+ const transferType = ["normal", "full"];
8717
+ const transferProps = __spreadProps(__spreadValues({
8718
+ type: {
8719
+ type: String,
8720
+ default: "normal",
8721
+ validator: (value) => transferType.includes(value)
8722
+ },
8717
8723
  source: {
8718
8724
  type: Array,
8719
8725
  default: () => []
@@ -8754,7 +8760,11 @@ const transferProps = {
8754
8760
  type: Object,
8755
8761
  default: () => ({})
8756
8762
  }
8757
- };
8763
+ }, simpleOmit(paginationProps, ["compact", "noShadow", "layout"])), {
8764
+ pageLayout: __spreadProps(__spreadValues({}, paginationProps.layout), {
8765
+ default: () => []
8766
+ })
8767
+ });
8758
8768
  const panelType = ["source", "target"];
8759
8769
  const transferPanelProp = {
8760
8770
  type: {
@@ -8794,24 +8804,20 @@ const _sfc_main$1 = defineComponent({
8794
8804
  DaoEmpty
8795
8805
  },
8796
8806
  props: transferPanelProp,
8797
- emits: ["selectedChange", "refresh", "checkAll"],
8807
+ emits: ["selectedChange", "search", "refresh", "checkAll"],
8798
8808
  setup(props, { slots, emit }) {
8799
8809
  const { t } = useI18n();
8800
8810
  const query = ref("");
8811
+ watch(query, (val) => emit("search", val));
8801
8812
  const labelProp = computed(() => props.props.label || "label");
8802
8813
  const keyProp = computed(() => props.props.key || "key");
8803
8814
  const descProp = computed(() => props.props.desc || "desc");
8804
8815
  const isSource = computed(() => props.type === "source");
8805
- const filteredData = computed(() => props.data.filter((item) => {
8806
- if (!props.filterable) {
8807
- return true;
8808
- }
8809
- if (typeof props.filterMethod === "function") {
8810
- return props.filterMethod(query.value, item);
8811
- }
8816
+ const filterFn = computed(() => typeof props.filterMethod === "function" ? props.filterMethod : (queryText, item) => {
8812
8817
  const label = item[labelProp.value] || item[keyProp.value];
8813
- return String(label).toLowerCase().includes(query.value.toLowerCase());
8814
- }));
8818
+ return String(label).toLowerCase().includes(queryText.toLowerCase());
8819
+ });
8820
+ const filteredData = computed(() => props.filterable ? props.data.filter((item) => filterFn.value(query.value, item)) : props.data);
8815
8821
  const checkedStatus = reactive({
8816
8822
  checked: false,
8817
8823
  indeterminate: false,
@@ -9038,11 +9044,11 @@ function _sfc_render$1(_ctx, _cache, $props, $setup, $data, $options) {
9038
9044
  ], 2), [
9039
9045
  [vShow, _ctx.isEmpty]
9040
9046
  ]),
9041
- _ctx.hasFooter ? (openBlock(), createElementBlock("p", {
9047
+ _ctx.hasFooter ? (openBlock(), createElementBlock("div", {
9042
9048
  key: 2,
9043
9049
  class: normalizeClass(`${_ctx.ns}__footer`)
9044
9050
  }, [
9045
- renderSlot(_ctx.$slots, "footer")
9051
+ renderSlot(_ctx.$slots, "footer", { isEmpty: _ctx.isEmpty })
9046
9052
  ], 2)) : createCommentVNode("", true)
9047
9053
  ], 2);
9048
9054
  }
@@ -9052,27 +9058,54 @@ const _sfc_main = defineComponent({
9052
9058
  name: "DaoTransfer",
9053
9059
  components: {
9054
9060
  transferPanel,
9055
- DaoTextButton: _sfc_main$R
9061
+ DaoTextButton: _sfc_main$R,
9062
+ DaoPagination
9056
9063
  },
9057
9064
  props: transferProps,
9058
- emits: ["update:modelValue", "add", "clear", "change", "refresh", "checkAll"],
9065
+ emits: [
9066
+ "update:modelValue",
9067
+ "add",
9068
+ "clear",
9069
+ "change",
9070
+ "left-search",
9071
+ "right-search",
9072
+ "refresh",
9073
+ "checkAll",
9074
+ "update:current-page",
9075
+ "update:page-size",
9076
+ "next",
9077
+ "prev",
9078
+ "pageChange",
9079
+ "sizeChange"
9080
+ ],
9059
9081
  setup(props, { emit }) {
9060
9082
  const { t } = useI18n();
9061
9083
  const keyProp = computed(() => props.props.key || "key");
9062
9084
  const sourceData = computed(() => props.source || []);
9085
+ const sourceDataMap = ref(new Map());
9086
+ watch(sourceData, () => {
9087
+ sourceData.value.forEach((item) => {
9088
+ sourceDataMap.value.set(item[keyProp.value], item);
9089
+ });
9090
+ }, {
9091
+ immediate: true
9092
+ });
9063
9093
  const selectedKeys = useVModel(props, "modelValue", emit, {
9064
9094
  passive: true
9065
9095
  });
9066
- const targetData = computed(() => {
9067
- const _selectedKeys = new Set(selectedKeys.value);
9068
- return sourceData.value.reduce((pre, cur) => {
9069
- const key = cur == null ? void 0 : cur[keyProp.value];
9070
- if (_selectedKeys.has(key)) {
9071
- pre.push(cur);
9072
- }
9073
- return pre;
9074
- }, []);
9096
+ const currentPage = useVModel(props, "currentPage", emit, {
9097
+ eventName: "update:current-page"
9075
9098
  });
9099
+ const pageSize = useVModel(props, "pageSize", emit, {
9100
+ eventName: "update:page-size"
9101
+ });
9102
+ const targetData = computed(() => selectedKeys.value.reduce((pre, key) => {
9103
+ const target = sourceDataMap.value.get(key);
9104
+ if (target) {
9105
+ pre.push(target);
9106
+ }
9107
+ return pre;
9108
+ }, []));
9076
9109
  const onChange = ({
9077
9110
  direction,
9078
9111
  row
@@ -9103,12 +9136,10 @@ const _sfc_main = defineComponent({
9103
9136
  checked,
9104
9137
  checkableList
9105
9138
  }) => {
9106
- const curOperatingKeys = checkableList;
9107
9139
  if (checked) {
9108
- const selectedKeysSet = new Set(selectedKeys.value.concat(curOperatingKeys));
9109
- selectedKeys.value = [...selectedKeysSet];
9140
+ selectedKeys.value = [...new Set(selectedKeys.value.concat(checkableList))];
9110
9141
  } else {
9111
- selectedKeys.value = selectedKeys.value.filter((key) => !curOperatingKeys.includes(key));
9142
+ selectedKeys.value = selectedKeys.value.filter((key) => !checkableList.includes(key));
9112
9143
  emit("clear", selectedKeys.value);
9113
9144
  }
9114
9145
  emit("checkAll", selectedKeys.value);
@@ -9118,18 +9149,22 @@ const _sfc_main = defineComponent({
9118
9149
  sourceData,
9119
9150
  targetData,
9120
9151
  selectedKeys,
9152
+ currentPage,
9153
+ pageSize,
9121
9154
  onChange,
9122
9155
  onClear,
9123
9156
  onCheckAll
9124
9157
  };
9125
9158
  }
9126
9159
  });
9127
- const _hoisted_1 = { class: "dao-transfer" };
9128
9160
  function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9129
- var _a2, _b2, _c, _d, _e, _f, _g, _h;
9161
+ var _a2, _b2, _c, _d, _e, _f, _g, _h, _i;
9162
+ const _component_dao_pagination = resolveComponent("dao-pagination");
9130
9163
  const _component_transfer_panel = resolveComponent("transfer-panel");
9131
9164
  const _component_dao_text_button = resolveComponent("dao-text-button");
9132
- return openBlock(), createElementBlock("div", _hoisted_1, [
9165
+ return openBlock(), createElementBlock("div", {
9166
+ class: normalizeClass(["dao-transfer", `dao-transfer--${_ctx.type}`])
9167
+ }, [
9133
9168
  createVNode(_component_transfer_panel, {
9134
9169
  ref: "leftPanel",
9135
9170
  type: "source",
@@ -9142,8 +9177,9 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9142
9177
  "disabled-keys": _ctx.disabledKeys,
9143
9178
  props: _ctx.props,
9144
9179
  onSelectedChange: _ctx.onChange,
9145
- onRefresh: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("refresh")),
9146
- onCheckAll: _ctx.onCheckAll
9180
+ onRefresh: _cache[6] || (_cache[6] = ($event) => _ctx.$emit("refresh")),
9181
+ onCheckAll: _ctx.onCheckAll,
9182
+ onSearch: _cache[7] || (_cache[7] = ($event) => _ctx.$emit("left-search", $event))
9147
9183
  }, createSlots({ _: 2 }, [
9148
9184
  _ctx.$slots["left-header"] ? {
9149
9185
  name: "header",
@@ -9182,10 +9218,30 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9182
9218
  renderSlot(_ctx.$slots, "left-empty")
9183
9219
  ])
9184
9220
  } : void 0,
9185
- ((_d = _ctx.$slots) == null ? void 0 : _d["left-footer"]) ? {
9221
+ ((_d = _ctx.$slots) == null ? void 0 : _d["left-footer"]) || ((_e = _ctx.pageLayout) == null ? void 0 : _e.length) ? {
9186
9222
  name: "footer",
9187
- fn: withCtx(() => [
9188
- renderSlot(_ctx.$slots, "left-footer")
9223
+ fn: withCtx(({ isEmpty: isEmpty2 }) => [
9224
+ renderSlot(_ctx.$slots, "left-footer", {}, () => [
9225
+ !isEmpty2 ? (openBlock(), createBlock(_component_dao_pagination, {
9226
+ key: 0,
9227
+ "current-page": _ctx.currentPage,
9228
+ "onUpdate:current-page": _cache[0] || (_cache[0] = ($event) => _ctx.currentPage = $event),
9229
+ "page-size": _ctx.pageSize,
9230
+ "onUpdate:page-size": _cache[1] || (_cache[1] = ($event) => _ctx.pageSize = $event),
9231
+ class: "dao-pagination--transfer",
9232
+ "page-size-options": _ctx.pageSizeOptions,
9233
+ "page-format": _ctx.pageFormat,
9234
+ total: _ctx.total,
9235
+ "total-format": _ctx.totalFormat,
9236
+ layout: _ctx.pageLayout,
9237
+ "page-sizer-width": _ctx.pageSizerWidth,
9238
+ "no-shadow": "",
9239
+ onNext: _cache[2] || (_cache[2] = ($event) => _ctx.$emit("next", $event)),
9240
+ onPrev: _cache[3] || (_cache[3] = ($event) => _ctx.$emit("prev", $event)),
9241
+ onPageChange: _cache[4] || (_cache[4] = ($event) => _ctx.$emit("pageChange", $event)),
9242
+ onSizeChange: _cache[5] || (_cache[5] = ($event) => _ctx.$emit("sizeChange", $event))
9243
+ }, null, 8, ["current-page", "page-size", "page-size-options", "page-format", "total", "total-format", "layout", "page-sizer-width"])) : createCommentVNode("", true)
9244
+ ])
9189
9245
  ])
9190
9246
  } : void 0
9191
9247
  ]), 1032, ["hide-desc", "data", "checked-keys", "filterable", "filter-method", "filter-placeholder", "disabled-keys", "props", "onSelectedChange", "onCheckAll"]),
@@ -9194,12 +9250,13 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9194
9250
  type: "target",
9195
9251
  "hide-desc": _ctx.hideDesc,
9196
9252
  data: _ctx.targetData,
9197
- filterable: (_e = _ctx.filterable) == null ? void 0 : _e[1],
9198
- "filter-method": (_f = _ctx.filterMethod) == null ? void 0 : _f[1],
9199
- "filter-placeholder": (_g = _ctx.filterPlaceholder) == null ? void 0 : _g[1],
9253
+ filterable: (_f = _ctx.filterable) == null ? void 0 : _f[1],
9254
+ "filter-method": (_g = _ctx.filterMethod) == null ? void 0 : _g[1],
9255
+ "filter-placeholder": (_h = _ctx.filterPlaceholder) == null ? void 0 : _h[1],
9200
9256
  "disabled-keys": _ctx.disabledKeys,
9201
9257
  props: _ctx.props,
9202
- onSelectedChange: _ctx.onChange
9258
+ onSelectedChange: _ctx.onChange,
9259
+ onSearch: _cache[8] || (_cache[8] = ($event) => _ctx.$emit("right-search", $event))
9203
9260
  }, createSlots({ _: 2 }, [
9204
9261
  _ctx.$slots["right-header"] ? {
9205
9262
  name: "header",
@@ -9249,14 +9306,14 @@ function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
9249
9306
  renderSlot(_ctx.$slots, "right-empty")
9250
9307
  ])
9251
9308
  } : void 0,
9252
- ((_h = _ctx.$slots) == null ? void 0 : _h["right-footer"]) ? {
9309
+ ((_i = _ctx.$slots) == null ? void 0 : _i["right-footer"]) ? {
9253
9310
  name: "footer",
9254
9311
  fn: withCtx(() => [
9255
9312
  renderSlot(_ctx.$slots, "right-footer")
9256
9313
  ])
9257
9314
  } : void 0
9258
9315
  ]), 1032, ["hide-desc", "data", "filterable", "filter-method", "filter-placeholder", "disabled-keys", "props", "onSelectedChange"])
9259
- ]);
9316
+ ], 2);
9260
9317
  }
9261
9318
  var transfer = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
9262
9319
  var components = /* @__PURE__ */ Object.freeze({