yc-design-vue 2.1.5 → 2.1.6
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.umd.js +1 -1
- package/es/Alert/index.vue.js +2 -2
- package/es/Avatar/Avatar.vue.js +1 -1
- package/es/BackTop/index.vue.js +1 -1
- package/es/Breadcrumb/BreadcrumbItem.vue.js +1 -1
- package/es/Breadcrumb/BreadcrumbMore.vue.js +1 -1
- package/es/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
- package/es/Calendar/Calendar.vue.js +2 -2
- package/es/Carousel/CarouselArrow.vue.js +1 -1
- package/es/Cascader/CascaderIcon.vue.js +2 -2
- package/es/Cascader/CascaderOption.vue.js +1 -1
- package/es/Checkbox/Checkbox.vue.js +2 -2
- package/es/Collapse/CollapseItem.vue.js +2 -2
- package/es/Drawer/Drawer.vue.js +2 -2
- package/es/Dropdown/DropdownButton.vue.js +1 -1
- package/es/Dropdown/Dsubmenu.vue.js +1 -1
- package/es/Empty/index.vue.js +1 -1
- package/es/Image/Image.vue.js +1 -1
- package/es/Image/ImagePreview.vue.js +1 -1
- package/es/Image/ImagePreviewArrow.vue.js +1 -1
- package/es/Image/ImagePreviewToolbar.vue.js +1 -1
- package/es/Input/Input.vue.js +2 -2
- package/es/Input/InputSuffix.vue.js +2 -2
- package/es/InputNumber/InputOperaBtn.vue.js +1 -1
- package/es/InputTag/index.vue.js +2 -2
- package/es/Layout/LayoutSider.vue.js +1 -1
- package/es/Link/index.vue.js +1 -1
- package/es/Menu/Menu.vue.js +1 -1
- package/es/Menu/MenuEllipsis.vue.js +1 -1
- package/es/Menu/SubMenu.vue.js +1 -1
- package/es/Message/Message.vue.js +2 -2
- package/es/Modal/Modal.vue.js +2 -2
- package/es/Notification/Notification.vue.js +2 -2
- package/es/PageHeader/index.vue.js +2 -2
- package/es/Pagination/PaginationItem.vue.js +1 -1
- package/es/Progress/ProgressCircle.vue.js +1 -1
- package/es/Radio/Radio.vue.js +2 -2
- package/es/Rate/index.vue.js +1 -1
- package/es/ResizeBox/index.vue.js +5 -6
- package/es/Select/SelectIcon.vue.js +2 -2
- package/es/Spin/index.vue.js +1 -1
- package/es/Split/index.vue.js +1 -1
- package/es/Steps/Step.vue.js +1 -1
- package/es/Tabs/TabButton.vue.js +2 -2
- package/es/Tabs/Tabs.vue.js +1 -1
- package/es/Tag/index.vue.js +2 -2
- package/es/Textarea/index.vue.js +2 -2
- package/es/TimePicker/TimePicker.vue.js +2 -2
- package/es/Transfer/Transfer.vue.d.ts +2 -2
- package/es/Transfer/Transfer.vue.js +49 -4
- package/es/Transfer/TransferPanel.vue.d.ts +25 -2
- package/es/Transfer/TransferPanel.vue.js +70 -77
- package/es/Transfer/hooks/useContext.d.ts +1 -1
- package/es/Transfer/hooks/useContext.js +8 -9
- package/es/Transfer/index.d.ts +1 -1
- package/es/Trigger/index.vue.js +1 -1
- package/es/Typography/TypographyBase.vue.js +1 -1
- package/es/Upload/UploadButton.vue.js +1 -1
- package/es/Upload/UploadDrag.vue.js +1 -1
- package/es/Upload/UploadFileList.vue2.js +2 -2
- package/es/Upload/UploadPictureCard.vue2.js +1 -1
- package/es/_shared/components/IconButton/{index.vue2.js → index.vue.js} +1 -1
- package/es/_shared/components/IconButton/index.vue3.js +2 -2
- package/es/_shared/constants/index.js +1 -1
- package/es/_shared/icons/IconArrowDown.vue.js +1 -1
- package/es/_shared/icons/IconArrowRight.vue.js +1 -1
- package/es/_shared/icons/IconCheck.vue.js +1 -1
- package/es/_shared/icons/IconCheckboxChecked.vue.js +1 -1
- package/es/_shared/icons/IconClose.vue.js +1 -1
- package/es/_shared/icons/IconCopy.vue2.js +1 -1
- package/es/_shared/icons/IconDelete.vue2.js +1 -1
- package/es/_shared/icons/IconDragDot.vue.js +1 -1
- package/es/_shared/icons/IconEdit.vue2.js +1 -1
- package/es/_shared/icons/IconEmpty.vue.js +1 -1
- package/es/_shared/icons/IconError.vue.js +1 -1
- package/es/_shared/icons/IconExclamation.vue2.js +1 -1
- package/es/_shared/icons/IconEyeClose.vue2.js +1 -1
- package/es/_shared/icons/IconEyeOpen.vue2.js +1 -1
- package/es/_shared/icons/IconFaceSmile.vue.js +1 -1
- package/es/_shared/icons/IconFile.vue2.js +1 -1
- package/es/_shared/icons/IconFullScreen.vue2.js +1 -1
- package/es/_shared/icons/IconImageClose.vue.js +1 -1
- package/es/_shared/icons/IconInfo.vue.js +1 -1
- package/es/_shared/icons/IconInfoLine.vue.js +1 -1
- package/es/_shared/icons/IconLink.vue.js +1 -1
- package/es/_shared/icons/IconLoading.vue.js +1 -1
- package/es/_shared/icons/IconMenuFold.vue.js +1 -1
- package/es/_shared/icons/IconMenuUnfold.vue.js +1 -1
- package/es/_shared/icons/IconMinus.vue2.js +1 -1
- package/es/_shared/icons/IconMore.vue.js +1 -1
- package/es/_shared/icons/IconOriginSize.vue2.js +1 -1
- package/es/_shared/icons/IconPlus.vue.js +1 -1
- package/es/_shared/icons/IconRight.vue.js +1 -1
- package/es/_shared/icons/IconRotateLeft.vue2.js +1 -1
- package/es/_shared/icons/IconRotateRight.vue2.js +1 -1
- package/es/_shared/icons/IconSearch.vue2.js +1 -1
- package/es/_shared/icons/IconSeparator.vue2.js +1 -1
- package/es/_shared/icons/IconStar.vue.js +1 -1
- package/es/_shared/icons/IconSuccess.vue.js +1 -1
- package/es/_shared/icons/IconTime.vue.js +1 -1
- package/es/_shared/icons/IconToTop.vue.js +1 -1
- package/es/_shared/icons/IconUpload.vue2.js +1 -1
- package/es/_shared/icons/IconWarning.vue.js +1 -1
- package/es/_shared/icons/IconZoomIn.vue2.js +1 -1
- package/es/_shared/icons/IconZoomOut.vue2.js +1 -1
- package/lib/Alert/index.vue.js +1 -1
- package/lib/Avatar/Avatar.vue.js +1 -1
- package/lib/BackTop/index.vue.js +1 -1
- package/lib/Breadcrumb/BreadcrumbItem.vue.js +1 -1
- package/lib/Breadcrumb/BreadcrumbMore.vue.js +1 -1
- package/lib/Breadcrumb/BreadcrumbSeparator.vue.js +1 -1
- package/lib/Calendar/Calendar.vue.js +1 -1
- package/lib/Carousel/CarouselArrow.vue.js +1 -1
- package/lib/Cascader/CascaderIcon.vue.js +1 -1
- package/lib/Cascader/CascaderOption.vue.js +1 -1
- package/lib/Checkbox/Checkbox.vue.js +1 -1
- package/lib/Collapse/CollapseItem.vue.js +1 -1
- package/lib/Drawer/Drawer.vue.js +1 -1
- package/lib/Dropdown/DropdownButton.vue.js +1 -1
- package/lib/Dropdown/Dsubmenu.vue.js +1 -1
- package/lib/Empty/index.vue.js +1 -1
- package/lib/Image/Image.vue.js +1 -1
- package/lib/Image/ImagePreview.vue.js +1 -1
- package/lib/Image/ImagePreviewArrow.vue.js +1 -1
- package/lib/Image/ImagePreviewToolbar.vue.js +1 -1
- package/lib/Input/Input.vue.js +1 -1
- package/lib/Input/InputSuffix.vue.js +1 -1
- package/lib/InputNumber/InputOperaBtn.vue.js +1 -1
- package/lib/InputTag/index.vue.js +1 -1
- package/lib/Layout/LayoutSider.vue.js +1 -1
- package/lib/Link/index.vue.js +1 -1
- package/lib/Menu/Menu.vue.js +1 -1
- package/lib/Menu/MenuEllipsis.vue.js +1 -1
- package/lib/Menu/SubMenu.vue.js +1 -1
- package/lib/Message/Message.vue.js +1 -1
- package/lib/Modal/Modal.vue.js +1 -1
- package/lib/Notification/Notification.vue.js +1 -1
- package/lib/PageHeader/index.vue.js +1 -1
- package/lib/Pagination/PaginationItem.vue.js +1 -1
- package/lib/Progress/ProgressCircle.vue.js +1 -1
- package/lib/Radio/Radio.vue.js +1 -1
- package/lib/Rate/index.vue.js +1 -1
- package/lib/ResizeBox/index.vue.js +1 -1
- package/lib/Select/SelectIcon.vue.js +1 -1
- package/lib/Spin/index.vue.js +1 -1
- package/lib/Split/index.vue.js +1 -1
- package/lib/Steps/Step.vue.js +1 -1
- package/lib/Tabs/TabButton.vue.js +1 -1
- package/lib/Tabs/Tabs.vue.js +1 -1
- package/lib/Tag/index.vue.js +1 -1
- package/lib/Textarea/index.vue.js +1 -1
- package/lib/TimePicker/TimePicker.vue.js +1 -1
- package/lib/Transfer/Transfer.vue.d.ts +2 -2
- package/lib/Transfer/Transfer.vue.js +1 -1
- package/lib/Transfer/TransferPanel.vue.d.ts +25 -2
- package/lib/Transfer/TransferPanel.vue.js +1 -1
- package/lib/Transfer/hooks/useContext.d.ts +1 -1
- package/lib/Transfer/hooks/useContext.js +1 -1
- package/lib/Transfer/index.d.ts +1 -1
- package/lib/Trigger/index.vue.js +1 -1
- package/lib/Typography/TypographyBase.vue.js +1 -1
- package/lib/Upload/UploadButton.vue.js +1 -1
- package/lib/Upload/UploadDrag.vue.js +1 -1
- package/lib/Upload/UploadFileList.vue2.js +1 -1
- package/lib/Upload/UploadPictureCard.vue2.js +1 -1
- package/lib/_shared/components/IconButton/index.vue.js +1 -0
- package/lib/_shared/components/IconButton/index.vue3.js +1 -1
- package/lib/_shared/constants/index.js +1 -1
- package/lib/_shared/icons/IconArrowDown.vue.js +1 -1
- package/lib/_shared/icons/IconArrowRight.vue.js +1 -1
- package/lib/_shared/icons/IconCheck.vue.js +1 -1
- package/lib/_shared/icons/IconCheckboxChecked.vue.js +1 -1
- package/lib/_shared/icons/IconClose.vue.js +1 -1
- package/lib/_shared/icons/IconCopy.vue2.js +1 -1
- package/lib/_shared/icons/IconDelete.vue2.js +1 -1
- package/lib/_shared/icons/IconDragDot.vue.js +1 -1
- package/lib/_shared/icons/IconEdit.vue2.js +1 -1
- package/lib/_shared/icons/IconEmpty.vue.js +1 -1
- package/lib/_shared/icons/IconError.vue.js +1 -1
- package/lib/_shared/icons/IconExclamation.vue2.js +1 -1
- package/lib/_shared/icons/IconEyeClose.vue2.js +1 -1
- package/lib/_shared/icons/IconEyeOpen.vue2.js +1 -1
- package/lib/_shared/icons/IconFaceSmile.vue.js +1 -1
- package/lib/_shared/icons/IconFile.vue2.js +1 -1
- package/lib/_shared/icons/IconFullScreen.vue2.js +1 -1
- package/lib/_shared/icons/IconImageClose.vue.js +1 -1
- package/lib/_shared/icons/IconInfo.vue.js +1 -1
- package/lib/_shared/icons/IconInfoLine.vue.js +1 -1
- package/lib/_shared/icons/IconLink.vue.js +1 -1
- package/lib/_shared/icons/IconLoading.vue.js +1 -1
- package/lib/_shared/icons/IconMenuFold.vue.js +1 -1
- package/lib/_shared/icons/IconMenuUnfold.vue.js +1 -1
- package/lib/_shared/icons/IconMinus.vue2.js +1 -1
- package/lib/_shared/icons/IconMore.vue.js +1 -1
- package/lib/_shared/icons/IconOriginSize.vue2.js +1 -1
- package/lib/_shared/icons/IconPlus.vue.js +1 -1
- package/lib/_shared/icons/IconRight.vue.js +1 -1
- package/lib/_shared/icons/IconRotateLeft.vue2.js +1 -1
- package/lib/_shared/icons/IconRotateRight.vue2.js +1 -1
- package/lib/_shared/icons/IconSearch.vue2.js +1 -1
- package/lib/_shared/icons/IconSeparator.vue2.js +1 -1
- package/lib/_shared/icons/IconStar.vue.js +1 -1
- package/lib/_shared/icons/IconSuccess.vue.js +1 -1
- package/lib/_shared/icons/IconTime.vue.js +1 -1
- package/lib/_shared/icons/IconToTop.vue.js +1 -1
- package/lib/_shared/icons/IconUpload.vue2.js +1 -1
- package/lib/_shared/icons/IconWarning.vue.js +1 -1
- package/lib/_shared/icons/IconZoomIn.vue2.js +1 -1
- package/lib/_shared/icons/IconZoomOut.vue2.js +1 -1
- package/package.json +1 -1
- package/lib/_shared/components/IconButton/index.vue2.js +0 -1
@@ -1,4 +1,4 @@
|
|
1
|
-
import { defineComponent, createElementBlock, openBlock, normalizeClass, createVNode, createCommentVNode,
|
1
|
+
import { defineComponent, useSlots, createElementBlock, openBlock, normalizeClass, createVNode, createCommentVNode, createSlots, withCtx, renderSlot, normalizeProps, guardReactiveProps, createBlock, unref } from "vue";
|
2
2
|
import useTransferContext from "./hooks/useContext.js";
|
3
3
|
import "../_shared/utils/dom.js";
|
4
4
|
import "../node_modules/b-tween/dist/b-tween.es.js";
|
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
10
10
|
import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
11
11
|
import "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
14
|
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$2 from "../_shared/icons/IconArrowRight.vue.js";
|
@@ -47,6 +47,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
47
47
|
},
|
48
48
|
emits: ["update:selected", "update:modelValue", "change", "select", "search"],
|
49
49
|
setup(__props, { emit: __emit }) {
|
50
|
+
const $slots = useSlots();
|
50
51
|
const props = __props;
|
51
52
|
const emits = __emit;
|
52
53
|
const { computedValue, targetChecked, computedSelected, sourceChecked } = useTransferContext().provide(props, emits);
|
@@ -76,7 +77,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
76
77
|
}
|
77
78
|
])
|
78
79
|
}, [
|
79
|
-
createVNode(_sfc_main$1, { type: "source" }
|
80
|
+
createVNode(_sfc_main$1, { type: "source" }, createSlots({ _: 2 }, [
|
81
|
+
$slots["source-title"] ? {
|
82
|
+
name: "source-title",
|
83
|
+
fn: withCtx((scope) => [
|
84
|
+
renderSlot(_ctx.$slots, "source-title", normalizeProps(guardReactiveProps(scope)))
|
85
|
+
]),
|
86
|
+
key: "0"
|
87
|
+
} : void 0,
|
88
|
+
$slots["source"] ? {
|
89
|
+
name: "source",
|
90
|
+
fn: withCtx((scope) => [
|
91
|
+
renderSlot(_ctx.$slots, "source", normalizeProps(guardReactiveProps(scope)))
|
92
|
+
]),
|
93
|
+
key: "1"
|
94
|
+
} : void 0,
|
95
|
+
$slots["item"] ? {
|
96
|
+
name: "item",
|
97
|
+
fn: withCtx((scope) => [
|
98
|
+
renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(scope)))
|
99
|
+
]),
|
100
|
+
key: "2"
|
101
|
+
} : void 0
|
102
|
+
]), 1024),
|
80
103
|
!_ctx.simple ? (openBlock(), createElementBlock("div", _hoisted_1, [
|
81
104
|
createVNode(unref(Button), {
|
82
105
|
disabled: !unref(sourceChecked).length || _ctx.disabled,
|
@@ -104,7 +127,29 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
104
127
|
_: 3
|
105
128
|
}, 8, ["disabled"])) : createCommentVNode("", true)
|
106
129
|
])) : createCommentVNode("", true),
|
107
|
-
createVNode(_sfc_main$1, { type: "target" }
|
130
|
+
createVNode(_sfc_main$1, { type: "target" }, createSlots({ _: 2 }, [
|
131
|
+
$slots["target-title"] ? {
|
132
|
+
name: "target-title",
|
133
|
+
fn: withCtx((scope) => [
|
134
|
+
renderSlot(_ctx.$slots, "source-title", normalizeProps(guardReactiveProps(scope)))
|
135
|
+
]),
|
136
|
+
key: "0"
|
137
|
+
} : void 0,
|
138
|
+
$slots["target"] ? {
|
139
|
+
name: "target",
|
140
|
+
fn: withCtx((scope) => [
|
141
|
+
renderSlot(_ctx.$slots, "source", normalizeProps(guardReactiveProps(scope)))
|
142
|
+
]),
|
143
|
+
key: "1"
|
144
|
+
} : void 0,
|
145
|
+
$slots["item"] ? {
|
146
|
+
name: "item",
|
147
|
+
fn: withCtx((scope) => [
|
148
|
+
renderSlot(_ctx.$slots, "item", normalizeProps(guardReactiveProps(scope)))
|
149
|
+
]),
|
150
|
+
key: "2"
|
151
|
+
} : void 0
|
152
|
+
]), 1024)
|
108
153
|
], 2);
|
109
154
|
};
|
110
155
|
}
|
@@ -1,10 +1,33 @@
|
|
1
|
-
import {
|
1
|
+
import { TransferItem, TransferItemValue } from './type';
|
2
2
|
type __VLS_Props = {
|
3
3
|
type: 'source' | 'target';
|
4
4
|
};
|
5
5
|
declare function __VLS_template(): {
|
6
6
|
attrs: Partial<{}>;
|
7
|
-
slots:
|
7
|
+
slots: Partial<Record<NonNullable<"target-title" | "source-title">, (_: {
|
8
|
+
countTotal: number;
|
9
|
+
countSelected: number;
|
10
|
+
searchValue: string;
|
11
|
+
checked: boolean;
|
12
|
+
indeterminate: boolean;
|
13
|
+
onSelectAllChange: (v: boolean) => void;
|
14
|
+
onClear: () => void;
|
15
|
+
}) => any>> & Partial<Record<NonNullable<"target" | "source">, (_: {
|
16
|
+
selectedKeys: TransferItemValue[];
|
17
|
+
data: TransferItem[];
|
18
|
+
onSelect: (val: TransferItemValue[]) => void;
|
19
|
+
}) => any>> & {
|
20
|
+
item?(_: {
|
21
|
+
label?: string;
|
22
|
+
value?: TransferItemValue;
|
23
|
+
disabled?: boolean;
|
24
|
+
}): any;
|
25
|
+
item?(_: {
|
26
|
+
label?: string;
|
27
|
+
value?: TransferItemValue;
|
28
|
+
disabled?: boolean;
|
29
|
+
}): any;
|
30
|
+
};
|
8
31
|
refs: {};
|
9
32
|
rootEl: HTMLDivElement;
|
10
33
|
};
|
@@ -1,6 +1,6 @@
|
|
1
|
-
import { defineComponent, toRefs, ref, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode,
|
2
|
-
import _sfc_main$1 from "../_shared/components/IconButton/index.
|
3
|
-
/* empty css
|
1
|
+
import { defineComponent, toRefs, ref, computed, createElementBlock, openBlock, createElementVNode, createCommentVNode, renderSlot, unref, normalizeProps, guardReactiveProps, createBlock, withCtx, createTextVNode, toDisplayString, Fragment, createVNode, mergeProps, renderList, normalizeClass } from "vue";
|
2
|
+
import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
|
3
|
+
/* empty css */
|
4
4
|
import "../_shared/utils/dom.js";
|
5
5
|
import "../node_modules/b-tween/dist/b-tween.es.js";
|
6
6
|
import "../node_modules/dayjs/dayjs.min.js";
|
@@ -31,7 +31,6 @@ const _hoisted_5 = {
|
|
31
31
|
};
|
32
32
|
const _hoisted_6 = { class: "yc-transfer-view-body" };
|
33
33
|
const _hoisted_7 = {
|
34
|
-
key: 1,
|
35
34
|
role: "list",
|
36
35
|
class: "yc-transfer-list"
|
37
36
|
};
|
@@ -80,6 +79,28 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
80
79
|
const title = computed(() => {
|
81
80
|
return type.value == "source" ? _title.value[0] : _title.value[1];
|
82
81
|
});
|
82
|
+
const titleParams = computed(() => {
|
83
|
+
return {
|
84
|
+
countTotal: type.value == "source" ? sourceOptions.value.length : targetOptions.value.length,
|
85
|
+
countSelected: type.value == "source" ? sourceChecked.value.length : targetChecked.value.length,
|
86
|
+
searchValue: keywords.value,
|
87
|
+
checked: selectedAll.value,
|
88
|
+
indeterminate: indeterminate.value,
|
89
|
+
onSelectAllChange: (v) => {
|
90
|
+
selectedAll.value = v;
|
91
|
+
},
|
92
|
+
onClear: handleClear
|
93
|
+
};
|
94
|
+
});
|
95
|
+
const listParams = computed(() => {
|
96
|
+
return {
|
97
|
+
selectedKeys: curSeleced.value,
|
98
|
+
data: curData.value,
|
99
|
+
onSelect: (val) => {
|
100
|
+
computedSelected.value = val;
|
101
|
+
}
|
102
|
+
};
|
103
|
+
});
|
83
104
|
const selectedAll = computed({
|
84
105
|
get() {
|
85
106
|
return !!curSeleced.value.length && curSeleced.value.length == curData.value.length;
|
@@ -121,40 +142,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
121
142
|
if (disabled.value || !computedValue.value.length) return;
|
122
143
|
computedValue.value = [];
|
123
144
|
};
|
124
|
-
const renderTitle = () => {
|
125
|
-
var _a;
|
126
|
-
return (_a = slots[type.value == "source" ? "source-title" : "target-title"]) == null ? void 0 : _a.call(slots, {
|
127
|
-
countTotal: type.value == "source" ? sourceOptions.value.length : targetOptions.value.length,
|
128
|
-
countSelected: type.value == "source" ? sourceChecked.value.length : targetChecked.value.length,
|
129
|
-
searchValue: keywords.value,
|
130
|
-
checked: selectedAll.value,
|
131
|
-
indeterminate: indeterminate.value,
|
132
|
-
onSelectAllChange: (v) => {
|
133
|
-
selectedAll.value = v;
|
134
|
-
},
|
135
|
-
onClear: handleClear
|
136
|
-
});
|
137
|
-
};
|
138
|
-
const renderList$1 = () => {
|
139
|
-
var _a;
|
140
|
-
return (_a = slots[type.value]) == null ? void 0 : _a.call(slots, {
|
141
|
-
selectedKeys: curSeleced.value,
|
142
|
-
data: curData.value,
|
143
|
-
onSelect: (val) => {
|
144
|
-
computedSelected.value = val;
|
145
|
-
}
|
146
|
-
});
|
147
|
-
};
|
148
|
-
const renderItem = (item) => {
|
149
|
-
return () => {
|
150
|
-
var _a;
|
151
|
-
return (_a = slots.item) == null ? void 0 : _a.call(slots, item);
|
152
|
-
};
|
153
|
-
};
|
154
145
|
return (_ctx, _cache) => {
|
155
146
|
return openBlock(), createElementBlock("div", _hoisted_1, [
|
156
147
|
createElementVNode("div", _hoisted_2, [
|
157
|
-
|
148
|
+
renderSlot(_ctx.$slots, `${unref(type)}-title`, normalizeProps(guardReactiveProps(titleParams.value)), () => [
|
158
149
|
createElementVNode("span", _hoisted_3, [
|
159
150
|
unref(showSelectAll) && !unref(simple) && (!unref(oneWay) || unref(type) != "target") ? (openBlock(), createBlock(unref(Checkbox), {
|
160
151
|
key: 0,
|
@@ -185,7 +176,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
185
176
|
_: 1
|
186
177
|
})) : createCommentVNode("", true)
|
187
178
|
])
|
188
|
-
]
|
179
|
+
])
|
189
180
|
]),
|
190
181
|
unref(showSearch) ? (openBlock(), createElementBlock("div", _hoisted_5, [
|
191
182
|
createVNode(unref(Input), mergeProps({
|
@@ -203,54 +194,56 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
203
194
|
createElementVNode("div", _hoisted_6, [
|
204
195
|
curData.value.length ? (openBlock(), createBlock(unref(Scrollbar), { key: 0 }, {
|
205
196
|
default: withCtx(() => [
|
206
|
-
|
207
|
-
(
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
214
|
-
|
215
|
-
|
216
|
-
|
217
|
-
onClick: ($event) => handleClick(item)
|
218
|
-
}, [
|
219
|
-
(!unref(oneWay) || unref(oneWay) && unref(type) == "source") && !unref(simple) ? (openBlock(), createBlock(unref(Checkbox), {
|
220
|
-
key: 0,
|
221
|
-
"model-value": curSeleced.value.includes(item.value),
|
222
|
-
disabled: item.disabled || unref(disabled),
|
223
|
-
onChange: (isSelected) => handleCheck(isSelected, item.value)
|
224
|
-
}, {
|
225
|
-
default: withCtx(() => [
|
226
|
-
unref(slots).item ? (openBlock(), createBlock(resolveDynamicComponent(renderItem(item)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
227
|
-
createTextVNode(toDisplayString(item.label), 1)
|
228
|
-
], 64))
|
229
|
-
]),
|
230
|
-
_: 2
|
231
|
-
}, 1032, ["model-value", "disabled", "onChange"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
232
|
-
createElementVNode("span", _hoisted_9, [
|
233
|
-
unref(slots).item ? (openBlock(), createBlock(resolveDynamicComponent(renderItem(item)), { key: 0 })) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
234
|
-
createTextVNode(toDisplayString(item.label), 1)
|
235
|
-
], 64))
|
197
|
+
renderSlot(_ctx.$slots, unref(type), normalizeProps(guardReactiveProps(listParams.value)), () => [
|
198
|
+
createElementVNode("div", _hoisted_7, [
|
199
|
+
(openBlock(true), createElementBlock(Fragment, null, renderList(curData.value, (item) => {
|
200
|
+
return openBlock(), createElementBlock("div", {
|
201
|
+
key: item.value,
|
202
|
+
role: "listitem",
|
203
|
+
class: normalizeClass([
|
204
|
+
"yc-transfer-list-item",
|
205
|
+
{
|
206
|
+
"yc-transfer-list-item-disabled": item.disabled || unref(disabled)
|
207
|
+
}
|
236
208
|
]),
|
237
|
-
|
209
|
+
onClick: ($event) => handleClick(item)
|
210
|
+
}, [
|
211
|
+
(!unref(oneWay) || unref(oneWay) && unref(type) == "source") && !unref(simple) ? (openBlock(), createBlock(unref(Checkbox), {
|
238
212
|
key: 0,
|
239
|
-
"
|
213
|
+
"model-value": curSeleced.value.includes(item.value),
|
214
|
+
disabled: item.disabled || unref(disabled),
|
215
|
+
onChange: (isSelected) => handleCheck(isSelected, item.value)
|
240
216
|
}, {
|
241
217
|
default: withCtx(() => [
|
242
|
-
|
218
|
+
renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, item), () => [
|
219
|
+
createTextVNode(toDisplayString(item.label), 1)
|
220
|
+
])
|
243
221
|
]),
|
244
|
-
_:
|
245
|
-
})) :
|
246
|
-
|
247
|
-
|
248
|
-
|
249
|
-
|
222
|
+
_: 2
|
223
|
+
}, 1032, ["model-value", "disabled", "onChange"])) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
224
|
+
createElementVNode("span", _hoisted_9, [
|
225
|
+
renderSlot(_ctx.$slots, "item", mergeProps({ ref_for: true }, item), () => [
|
226
|
+
createTextVNode(toDisplayString(item.label), 1)
|
227
|
+
])
|
228
|
+
]),
|
229
|
+
unref(type) == "target" && !unref(simple) ? (openBlock(), createBlock(unref(_sfc_main$1), {
|
230
|
+
key: 0,
|
231
|
+
"hover-size": 20
|
232
|
+
}, {
|
233
|
+
default: withCtx(() => [
|
234
|
+
createVNode(unref(_sfc_main$4))
|
235
|
+
]),
|
236
|
+
_: 1
|
237
|
+
})) : createCommentVNode("", true)
|
238
|
+
], 64))
|
239
|
+
], 10, _hoisted_8);
|
240
|
+
}), 128))
|
241
|
+
])
|
242
|
+
])
|
250
243
|
]),
|
251
|
-
_:
|
244
|
+
_: 3
|
252
245
|
})) : createCommentVNode("", true),
|
253
|
-
(
|
246
|
+
createVNode(unref(Empty))
|
254
247
|
])
|
255
248
|
]);
|
256
249
|
};
|
@@ -23,8 +23,8 @@ type TransferContext = {
|
|
23
23
|
export default function useTransferContext(): {
|
24
24
|
provide: (props: RecordType, emits: TransferEmits) => {
|
25
25
|
computedValue: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
|
26
|
-
targetChecked: import('vue').ComputedRef<TransferItemValue[]>;
|
27
26
|
computedSelected: import('vue').WritableComputedRef<TransferItemValue[], TransferItemValue[]>;
|
27
|
+
targetChecked: import('vue').ComputedRef<TransferItemValue[]>;
|
28
28
|
sourceChecked: import('vue').ComputedRef<TransferItemValue[]>;
|
29
29
|
};
|
30
30
|
inject: () => TransferContext;
|
@@ -61,19 +61,18 @@ function useTransferContext() {
|
|
61
61
|
});
|
62
62
|
const targetOptions = computed(() => {
|
63
63
|
return computedValue.value.map((item) => {
|
64
|
-
|
65
|
-
return target;
|
64
|
+
return dataMap.value[item];
|
66
65
|
});
|
67
66
|
});
|
68
67
|
const sourceChecked = computed(() => {
|
69
|
-
return computedSelected.value.filter(
|
70
|
-
|
71
|
-
);
|
68
|
+
return computedSelected.value.filter((item) => {
|
69
|
+
return !computedValueMap.value.has(item);
|
70
|
+
});
|
72
71
|
});
|
73
72
|
const targetChecked = computed(() => {
|
74
|
-
return computedSelected.value.filter(
|
75
|
-
|
76
|
-
);
|
73
|
+
return computedSelected.value.filter((item) => {
|
74
|
+
return computedValueMap.value.has(item);
|
75
|
+
});
|
77
76
|
});
|
78
77
|
provide(TRANSFER_CONTEXT_KEY, {
|
79
78
|
computedValue,
|
@@ -95,8 +94,8 @@ function useTransferContext() {
|
|
95
94
|
});
|
96
95
|
return {
|
97
96
|
computedValue,
|
98
|
-
targetChecked,
|
99
97
|
computedSelected,
|
98
|
+
targetChecked,
|
100
99
|
sourceChecked
|
101
100
|
};
|
102
101
|
};
|
package/es/Transfer/index.d.ts
CHANGED
@@ -87,7 +87,7 @@ declare const Transfer: {
|
|
87
87
|
showSearch: boolean;
|
88
88
|
showSelectAll: boolean;
|
89
89
|
}, {}, string, {}, import('vue').GlobalComponents, import('vue').GlobalDirectives, string, import('vue').ComponentProvideOptions> & import('vue').VNodeProps & import('vue').AllowedComponentProps & import('vue').ComponentCustomProps & (new () => {
|
90
|
-
$slots:
|
90
|
+
$slots: any;
|
91
91
|
}) & {
|
92
92
|
install: (app: App) => void;
|
93
93
|
};
|
package/es/Trigger/index.vue.js
CHANGED
@@ -13,7 +13,7 @@ import "../_shared/utils/time.js";
|
|
13
13
|
import { findFirstLegitChild } from "../_shared/utils/vue-utils.js";
|
14
14
|
import useTriggerVisible from "./hooks/useTriggerVisible.js";
|
15
15
|
import useTriggerPosition from "./hooks/useTriggerPosition.js";
|
16
|
-
/* empty css
|
16
|
+
/* empty css */
|
17
17
|
import _sfc_main$1 from "../_shared/components/PreventFocus/index.vue.js";
|
18
18
|
/* empty css */
|
19
19
|
/* empty css */
|
@@ -11,7 +11,7 @@ import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
|
11
11
|
import { useControlValue } from "../_shared/utils/hooks.js";
|
12
12
|
import { useI18n } from "../_shared/utils/locale.js";
|
13
13
|
import "../_shared/utils/time.js";
|
14
|
-
/* empty css
|
14
|
+
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
/* empty css */
|
17
17
|
import _sfc_main$3 from "../_shared/icons/IconCopy.vue2.js";
|
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
10
10
|
import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
11
11
|
import { useI18n } from "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
14
|
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$1 from "../_shared/icons/IconUpload.vue2.js";
|
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
10
10
|
import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
11
11
|
import { useI18n } from "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
14
|
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$1 from "../_shared/icons/IconPlus.vue.js";
|
@@ -1,7 +1,7 @@
|
|
1
1
|
import { defineComponent, createElementBlock, openBlock, normalizeClass, unref, Fragment, renderList, renderSlot, createCommentVNode, createElementVNode, createBlock, resolveDynamicComponent, createVNode, withCtx } from "vue";
|
2
2
|
import useUploadContext from "./hooks/useContext.js";
|
3
|
-
import _sfc_main$1 from "../_shared/components/IconButton/index.
|
4
|
-
/* empty css
|
3
|
+
import _sfc_main$1 from "../_shared/components/IconButton/index.vue.js";
|
4
|
+
/* empty css */
|
5
5
|
import "../_shared/utils/dom.js";
|
6
6
|
import "../node_modules/b-tween/dist/b-tween.es.js";
|
7
7
|
import "../node_modules/dayjs/dayjs.min.js";
|
@@ -10,7 +10,7 @@ import "../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
10
10
|
import "../node_modules/dayjs/plugin/isSameOrBefore.js";
|
11
11
|
import "../_shared/utils/locale.js";
|
12
12
|
import "../_shared/utils/time.js";
|
13
|
-
/* empty css
|
13
|
+
/* empty css */
|
14
14
|
/* empty css */
|
15
15
|
/* empty css */
|
16
16
|
import _sfc_main$3 from "../_shared/icons/IconDelete.vue2.js";
|
@@ -9,7 +9,7 @@ import "../../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../../utils/locale.js";
|
11
11
|
import "../../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
/* empty css */
|
15
15
|
import _sfc_main$1 from "../../icons/IconClose.vue.js";
|
@@ -12,7 +12,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
12
12
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
13
13
|
import "../utils/locale.js";
|
14
14
|
import "../utils/time.js";
|
15
|
-
/* empty css
|
15
|
+
/* empty css */
|
16
16
|
/* empty css */
|
17
17
|
/* empty css */
|
18
18
|
import _sfc_main from "../icons/IconCheck.vue.js";
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|
@@ -9,7 +9,7 @@ import "../../node_modules/dayjs/plugin/isSameOrAfter.js";
|
|
9
9
|
import "../../node_modules/dayjs/plugin/isSameOrBefore.js";
|
10
10
|
import "../utils/locale.js";
|
11
11
|
import "../utils/time.js";
|
12
|
-
/* empty css
|
12
|
+
/* empty css */
|
13
13
|
/* empty css */
|
14
14
|
import _sfc_main$1 from "../components/Icon/index.vue3.js";
|
15
15
|
/* empty css */
|