@w-run/wdesign-ui 0.0.0-stage → 1.1.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.
- package/README.md +255 -2
- package/dist/index.d.ts +1013 -0
- package/dist/parts/WdAffix.js +159 -0
- package/dist/parts/WdAiMessage.js +277 -0
- package/dist/parts/WdAlert.js +92 -0
- package/dist/parts/WdAnchor.js +159 -0
- package/dist/parts/WdAudioPlayer.js +1024 -0
- package/dist/parts/WdAvatar.js +6 -0
- package/dist/parts/WdAvatarGroup.js +46 -0
- package/dist/parts/WdBacktop.js +120 -0
- package/dist/parts/WdBadge.js +61 -0
- package/dist/parts/WdBento.js +40 -0
- package/dist/parts/WdBentoItem.js +43 -0
- package/dist/parts/WdBottomSheet.js +263 -0
- package/dist/parts/WdBreadcrumb.js +64 -0
- package/dist/parts/WdButton.js +94 -0
- package/dist/parts/WdCalendar.js +11 -0
- package/dist/parts/WdCard.js +113 -0
- package/dist/parts/WdCarousel.js +365 -0
- package/dist/parts/WdCascader.js +386 -0
- package/dist/parts/WdCheckbox.js +81 -0
- package/dist/parts/WdCollapse.js +135 -0
- package/dist/parts/WdColorPicker.js +592 -0
- package/dist/parts/WdCommand.js +357 -0
- package/dist/parts/WdContainer.js +37 -0
- package/dist/parts/WdCountdown.js +163 -0
- package/dist/parts/WdDanmaku.js +6 -0
- package/dist/parts/WdDatePicker.js +169 -0
- package/dist/parts/WdDateTimePicker.js +162 -0
- package/dist/parts/WdDescriptions.js +146 -0
- package/dist/parts/WdDivider.js +64 -0
- package/dist/parts/WdDrawer.js +176 -0
- package/dist/parts/WdDropdown.js +140 -0
- package/dist/parts/WdEmpty.js +79 -0
- package/dist/parts/WdExplorer.js +336 -0
- package/dist/parts/WdFileList.js +177 -0
- package/dist/parts/WdForm.js +111 -0
- package/dist/parts/WdFormItem.js +156 -0
- package/dist/parts/WdGrid.js +40 -0
- package/dist/parts/WdGroup.js +68 -0
- package/dist/parts/WdImagePreview.js +274 -0
- package/dist/parts/WdInput.js +10 -0
- package/dist/parts/WdInputNumber.js +253 -0
- package/dist/parts/WdListItem.js +60 -0
- package/dist/parts/WdLoading.js +128 -0
- package/dist/parts/WdMarkdown.js +172 -0
- package/dist/parts/WdMarquee.js +80 -0
- package/dist/parts/WdMasonry.js +40 -0
- package/dist/parts/WdMediaCard.js +302 -0
- package/dist/parts/WdMentions.js +277 -0
- package/dist/parts/WdModal.js +149 -0
- package/dist/parts/WdNav.js +311 -0
- package/dist/parts/WdNotification.js +112 -0
- package/dist/parts/WdOtp.js +107 -0
- package/dist/parts/WdPagination.js +252 -0
- package/dist/parts/WdPopconfirm.js +214 -0
- package/dist/parts/WdPopover.js +203 -0
- package/dist/parts/WdPostItem.js +84 -0
- package/dist/parts/WdProgress.js +48 -0
- package/dist/parts/WdProgressRing.js +101 -0
- package/dist/parts/WdPullRefresh.js +167 -0
- package/dist/parts/WdQRCode.js +1909 -0
- package/dist/parts/WdRadioGroup.js +95 -0
- package/dist/parts/WdRate.js +128 -0
- package/dist/parts/WdResult.js +86 -0
- package/dist/parts/WdScrollbar.js +186 -0
- package/dist/parts/WdSegmented.js +11 -0
- package/dist/parts/WdSelect.js +465 -0
- package/dist/parts/WdSkeleton.js +69 -0
- package/dist/parts/WdSlider.js +100 -0
- package/dist/parts/WdSortableList.js +291 -0
- package/dist/parts/WdSpace.js +46 -0
- package/dist/parts/WdSparkline.js +148 -0
- package/dist/parts/WdSpinner.js +6 -0
- package/dist/parts/WdSplitter.js +183 -0
- package/dist/parts/WdStatBar.js +202 -0
- package/dist/parts/WdStatistic.js +131 -0
- package/dist/parts/WdSteps.js +110 -0
- package/dist/parts/WdSwitch.js +63 -0
- package/dist/parts/WdTabBar.js +84 -0
- package/dist/parts/WdTable.js +589 -0
- package/dist/parts/WdTabs.js +219 -0
- package/dist/parts/WdTag.js +6 -0
- package/dist/parts/WdTagInput.js +181 -0
- package/dist/parts/WdTimePicker.js +12 -0
- package/dist/parts/WdTimeline.js +145 -0
- package/dist/parts/WdTooltip.js +108 -0
- package/dist/parts/WdTour.js +264 -0
- package/dist/parts/WdTransfer.js +446 -0
- package/dist/parts/WdTree.js +322 -0
- package/dist/parts/WdUpload.js +309 -0
- package/dist/parts/WdVideoPlayer.js +1006 -0
- package/dist/parts/WdVirtualList.js +169 -0
- package/dist/parts/WdWatermark.js +150 -0
- package/dist/parts/chunk-3LVE72ZK.js +361 -0
- package/dist/parts/chunk-5HYOQ52I.js +101 -0
- package/dist/parts/chunk-7M3MUL3B.js +275 -0
- package/dist/parts/chunk-AOTJ63HN.js +15 -0
- package/dist/parts/chunk-AXEF2U2A.js +41 -0
- package/dist/parts/chunk-CY3QOSFP.js +645 -0
- package/dist/parts/chunk-G7NN4A6J.js +40 -0
- package/dist/parts/chunk-HAKYCUAR.js +9 -0
- package/dist/parts/chunk-JDE4AHBR.js +160 -0
- package/dist/parts/chunk-LT3NTWIT.js +117 -0
- package/dist/parts/chunk-OGHYFT7B.js +387 -0
- package/dist/parts/chunk-Q34U2HES.js +261 -0
- package/dist/parts/chunk-RLSVPJHM.js +10 -0
- package/dist/parts/chunk-U2CDKD2T.js +30 -0
- package/dist/parts/chunk-UYUNYHZD.js +40 -0
- package/dist/parts/chunk-VUJL2HGD.js +23 -0
- package/dist/parts/chunk-WCFG5KNT.js +51 -0
- package/dist/parts/chunk-WDDAALPI.js +42 -0
- package/dist/parts/chunk-WFXLDBP2.js +149 -0
- package/dist/style/affix.css +566 -0
- package/dist/style/ai-msg.css +746 -0
- package/dist/style/alert.css +636 -0
- package/dist/style/anchor.css +630 -0
- package/dist/style/audio.css +1954 -0
- package/dist/style/avatar.css +651 -0
- package/dist/style/backtop.css +625 -0
- package/dist/style/badge.css +632 -0
- package/dist/style/bento.css +763 -0
- package/dist/style/bottom-sheet.css +776 -0
- package/dist/style/breadcrumb.css +629 -0
- package/dist/style/button.css +829 -0
- package/dist/style/calendar.css +1512 -0
- package/dist/style/card.css +748 -0
- package/dist/style/carousel.css +670 -0
- package/dist/style/cascader.css +862 -0
- package/dist/style/checkbox.css +706 -0
- package/dist/style/chevron.css +575 -0
- package/dist/style/collapse.css +648 -0
- package/dist/style/colorpicker.css +876 -0
- package/dist/style/command.css +760 -0
- package/dist/style/container.css +550 -0
- package/dist/style/countdown.css +722 -0
- package/dist/style/danmaku.css +644 -0
- package/dist/style/datepicker.css +683 -0
- package/dist/style/datetime-picker.css +714 -0
- package/dist/style/descriptions.css +712 -0
- package/dist/style/divider.css +604 -0
- package/dist/style/dot.css +585 -0
- package/dist/style/drawer.css +743 -0
- package/dist/style/dropdown.css +645 -0
- package/dist/style/empty.css +657 -0
- package/dist/style/explorer.css +944 -0
- package/dist/style/file-list.css +664 -0
- package/dist/style/flip.css +600 -0
- package/dist/style/form.css +638 -0
- package/dist/style/grid.css +618 -0
- package/dist/style/group.css +1022 -0
- package/dist/style/icon-btn.css +641 -0
- package/dist/style/image-preview.css +725 -0
- package/dist/style/input-number.css +680 -0
- package/dist/style/input.css +682 -0
- package/dist/style/list.css +630 -0
- package/dist/style/loading.css +667 -0
- package/dist/style/markdown.css +884 -0
- package/dist/style/marquee.css +678 -0
- package/dist/style/masonry.css +614 -0
- package/dist/style/media-card.css +1229 -0
- package/dist/style/mentions.css +690 -0
- package/dist/style/modal.css +775 -0
- package/dist/style/nav.css +1046 -0
- package/dist/style/notification.css +601 -0
- package/dist/style/otp.css +699 -0
- package/dist/style/pagination.css +680 -0
- package/dist/style/popconfirm.css +645 -0
- package/dist/style/popover.css +740 -0
- package/dist/style/post-item.css +676 -0
- package/dist/style/progress-ring.css +640 -0
- package/dist/style/progress.css +576 -0
- package/dist/style/pull-refresh.css +637 -0
- package/dist/style/qrcode.css +613 -0
- package/dist/style/radio.css +705 -0
- package/dist/style/rate.css +637 -0
- package/dist/style/result.css +597 -0
- package/dist/style/scroll-reveal.css +613 -0
- package/dist/style/scrollbar.css +644 -0
- package/dist/style/segmented-picker.css +679 -0
- package/dist/style/segmented.css +894 -0
- package/dist/style/select.css +937 -0
- package/dist/style/skeleton.css +590 -0
- package/dist/style/slider.css +642 -0
- package/dist/style/sortable.css +714 -0
- package/dist/style/space.css +568 -0
- package/dist/style/sparkline.css +606 -0
- package/dist/style/spinner.css +586 -0
- package/dist/style/splitter.css +711 -0
- package/dist/style/stat-bar.css +767 -0
- package/dist/style/statistic.css +589 -0
- package/dist/style/steps.css +724 -0
- package/dist/style/switch.css +676 -0
- package/dist/style/tab-bar.css +647 -0
- package/dist/style/table.css +1229 -0
- package/dist/style/tabs.css +756 -0
- package/dist/style/tag-input.css +710 -0
- package/dist/style/tag.css +682 -0
- package/dist/style/time-picker.css +749 -0
- package/dist/style/timeline.css +1082 -0
- package/dist/style/toast.css +598 -0
- package/dist/style/tooltip.css +604 -0
- package/dist/style/tour.css +683 -0
- package/dist/style/transfer.css +858 -0
- package/dist/style/tree.css +786 -0
- package/dist/style/typography.css +947 -0
- package/dist/style/upload.css +758 -0
- package/dist/style/vlist.css +591 -0
- package/dist/style/vplayer.css +1588 -0
- package/dist/style/watermark.css +570 -0
- package/dist/wdesign-ui.css +21093 -0
- package/dist/wdesign-ui.esm.js +20265 -0
- package/package.json +134 -4
- package/tokens.json +385 -0
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
import {
|
|
2
|
+
WdInput_default
|
|
3
|
+
} from "./chunk-JDE4AHBR.js";
|
|
4
|
+
import {
|
|
5
|
+
useControllable
|
|
6
|
+
} from "./chunk-G7NN4A6J.js";
|
|
7
|
+
import "./chunk-U2CDKD2T.js";
|
|
8
|
+
import {
|
|
9
|
+
WdSpinner_default
|
|
10
|
+
} from "./chunk-WDDAALPI.js";
|
|
11
|
+
import "./chunk-UYUNYHZD.js";
|
|
12
|
+
import {
|
|
13
|
+
WdIcon_default
|
|
14
|
+
} from "./chunk-Q34U2HES.js";
|
|
15
|
+
|
|
16
|
+
// .lib-build/WdTransfer.ts
|
|
17
|
+
import { defineComponent as _defineComponent } from "vue";
|
|
18
|
+
import { createCommentVNode as _createCommentVNode, createElementVNode as _createElementVNode, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, createVNode as _createVNode, renderList as _renderList, unref as _unref, createBlock as _createBlock, normalizeClass as _normalizeClass, renderSlot as _renderSlot, withModifiers as _withModifiers, withKeys as _withKeys, normalizeStyle as _normalizeStyle } from "vue";
|
|
19
|
+
import { computed, ref } from "vue";
|
|
20
|
+
var _hoisted_1 = { class: "wd-transfer__panel" };
|
|
21
|
+
var _hoisted_2 = { class: "wd-transfer__head" };
|
|
22
|
+
var _hoisted_3 = { class: "wd-transfer__check-all" };
|
|
23
|
+
var _hoisted_4 = ["checked", ".indeterminate"];
|
|
24
|
+
var _hoisted_5 = { class: "wd-transfer__count" };
|
|
25
|
+
var _hoisted_6 = {
|
|
26
|
+
key: 0,
|
|
27
|
+
class: "wd-transfer__search"
|
|
28
|
+
};
|
|
29
|
+
var _hoisted_7 = {
|
|
30
|
+
key: 0,
|
|
31
|
+
class: "wd-transfer__empty"
|
|
32
|
+
};
|
|
33
|
+
var _hoisted_8 = ["aria-checked", "tabindex", "aria-disabled", "onClick", "onKeydown"];
|
|
34
|
+
var _hoisted_9 = { class: "wd-transfer__label" };
|
|
35
|
+
var _hoisted_10 = {
|
|
36
|
+
key: 0,
|
|
37
|
+
class: "wd-transfer__desc"
|
|
38
|
+
};
|
|
39
|
+
var _hoisted_11 = { class: "wd-transfer__ops" };
|
|
40
|
+
var _hoisted_12 = ["disabled"];
|
|
41
|
+
var _hoisted_13 = ["disabled"];
|
|
42
|
+
var _hoisted_14 = { class: "wd-transfer__panel" };
|
|
43
|
+
var _hoisted_15 = { class: "wd-transfer__head" };
|
|
44
|
+
var _hoisted_16 = { class: "wd-transfer__check-all" };
|
|
45
|
+
var _hoisted_17 = ["checked", ".indeterminate"];
|
|
46
|
+
var _hoisted_18 = { class: "wd-transfer__count" };
|
|
47
|
+
var _hoisted_19 = {
|
|
48
|
+
key: 0,
|
|
49
|
+
class: "wd-transfer__search"
|
|
50
|
+
};
|
|
51
|
+
var _hoisted_20 = {
|
|
52
|
+
key: 0,
|
|
53
|
+
class: "wd-transfer__loading",
|
|
54
|
+
role: "status",
|
|
55
|
+
"aria-live": "polite"
|
|
56
|
+
};
|
|
57
|
+
var _hoisted_21 = {
|
|
58
|
+
key: 1,
|
|
59
|
+
class: "wd-transfer__empty"
|
|
60
|
+
};
|
|
61
|
+
var _hoisted_22 = ["aria-checked", "tabindex", "aria-disabled", "onClick", "onKeydown"];
|
|
62
|
+
var _hoisted_23 = { class: "wd-transfer__label" };
|
|
63
|
+
var _hoisted_24 = {
|
|
64
|
+
key: 0,
|
|
65
|
+
class: "wd-transfer__desc"
|
|
66
|
+
};
|
|
67
|
+
var WdTransfer_default = /* @__PURE__ */ _defineComponent({
|
|
68
|
+
...{ name: "WdTransfer" },
|
|
69
|
+
__name: "WdTransfer",
|
|
70
|
+
props: {
|
|
71
|
+
data: { type: Array, required: false, default: () => [] },
|
|
72
|
+
modelValue: { type: Array, required: false },
|
|
73
|
+
defaultValue: { type: Array, required: false, default: () => [] },
|
|
74
|
+
loading: { type: Boolean, required: false, default: false },
|
|
75
|
+
sourceTitle: { type: String, required: false, default: "\u5F85\u9009" },
|
|
76
|
+
targetTitle: { type: String, required: false, default: "\u5DF2\u9009" },
|
|
77
|
+
searchPlaceholder: { type: String, required: false, default: "\u641C\u7D22" },
|
|
78
|
+
height: { type: Number, required: false, default: 280 },
|
|
79
|
+
filterable: { type: Boolean, required: false, default: true },
|
|
80
|
+
disabled: { type: Boolean, required: false, default: false }
|
|
81
|
+
},
|
|
82
|
+
emits: ["update:modelValue", "change"],
|
|
83
|
+
setup(__props, { emit: __emit }) {
|
|
84
|
+
const props = __props;
|
|
85
|
+
const emit = __emit;
|
|
86
|
+
const { value: selectedKeys, set: setSelected } = useControllable({
|
|
87
|
+
modelValue: computed(() => props.modelValue),
|
|
88
|
+
defaultValue: computed(() => props.defaultValue),
|
|
89
|
+
fallback: [],
|
|
90
|
+
onChange: (v) => emit("update:modelValue", v)
|
|
91
|
+
});
|
|
92
|
+
const leftQuery = ref("");
|
|
93
|
+
const rightQuery = ref("");
|
|
94
|
+
function match(item, q) {
|
|
95
|
+
if (!q.trim()) return true;
|
|
96
|
+
const s = q.trim().toLowerCase();
|
|
97
|
+
return item.label.toLowerCase().includes(s) || (item.desc ?? "").toLowerCase().includes(s);
|
|
98
|
+
}
|
|
99
|
+
const selectedSet = computed(() => new Set(selectedKeys.value));
|
|
100
|
+
const leftList = computed(
|
|
101
|
+
() => props.loading ? [] : props.data.filter((d) => !selectedSet.value.has(d.key) && match(d, leftQuery.value))
|
|
102
|
+
);
|
|
103
|
+
const rightList = computed(
|
|
104
|
+
() => props.loading ? [] : props.data.filter((d) => selectedSet.value.has(d.key) && match(d, rightQuery.value))
|
|
105
|
+
);
|
|
106
|
+
const leftChecked = ref(/* @__PURE__ */ new Set());
|
|
107
|
+
const rightChecked = ref(/* @__PURE__ */ new Set());
|
|
108
|
+
function toggleCheck(side, key) {
|
|
109
|
+
const set = side === "left" ? leftChecked : rightChecked;
|
|
110
|
+
const next = new Set(set.value);
|
|
111
|
+
if (next.has(key)) next.delete(key);
|
|
112
|
+
else next.add(key);
|
|
113
|
+
set.value = next;
|
|
114
|
+
}
|
|
115
|
+
function checkAll(side, list) {
|
|
116
|
+
const set = side === "left" ? leftChecked : rightChecked;
|
|
117
|
+
const enabled = list.filter((d) => !d.disabled).map((d) => d.key);
|
|
118
|
+
const allOn = enabled.length > 0 && enabled.every((k) => set.value.has(k));
|
|
119
|
+
const next = new Set(set.value);
|
|
120
|
+
enabled.forEach((k) => allOn ? next.delete(k) : next.add(k));
|
|
121
|
+
set.value = next;
|
|
122
|
+
}
|
|
123
|
+
function isAllChecked(list, set) {
|
|
124
|
+
const enabled = list.filter((d) => !d.disabled);
|
|
125
|
+
return enabled.length > 0 && enabled.every((d) => set.has(d.key));
|
|
126
|
+
}
|
|
127
|
+
function move(dir) {
|
|
128
|
+
if (props.disabled) return;
|
|
129
|
+
const from = dir === "right" ? leftChecked.value : rightChecked.value;
|
|
130
|
+
if (from.size === 0) return;
|
|
131
|
+
const keys = [...from];
|
|
132
|
+
let next;
|
|
133
|
+
if (dir === "right") {
|
|
134
|
+
next = [...selectedKeys.value, ...keys.filter((k) => !selectedSet.value.has(k))];
|
|
135
|
+
} else {
|
|
136
|
+
const drop = new Set(keys);
|
|
137
|
+
next = selectedKeys.value.filter((k) => !drop.has(k));
|
|
138
|
+
}
|
|
139
|
+
setSelected(next);
|
|
140
|
+
emit("change", next, dir);
|
|
141
|
+
if (dir === "right") leftChecked.value = /* @__PURE__ */ new Set();
|
|
142
|
+
else rightChecked.value = /* @__PURE__ */ new Set();
|
|
143
|
+
}
|
|
144
|
+
const canMoveRight = computed(() => leftChecked.value.size > 0 && !props.disabled);
|
|
145
|
+
const canMoveLeft = computed(() => rightChecked.value.size > 0 && !props.disabled);
|
|
146
|
+
return (_ctx, _cache) => {
|
|
147
|
+
return _openBlock(), _createElementBlock(
|
|
148
|
+
"div",
|
|
149
|
+
{
|
|
150
|
+
class: _normalizeClass(["wd-transfer", { "is-disabled": __props.disabled }])
|
|
151
|
+
},
|
|
152
|
+
[
|
|
153
|
+
_createCommentVNode(" ---------------- \u5DE6\u4FA7\uFF1A\u5F85\u9009 ---------------- "),
|
|
154
|
+
_createElementVNode("div", _hoisted_1, [
|
|
155
|
+
_createElementVNode("div", _hoisted_2, [
|
|
156
|
+
_createElementVNode("label", _hoisted_3, [
|
|
157
|
+
_createElementVNode("input", {
|
|
158
|
+
type: "checkbox",
|
|
159
|
+
checked: isAllChecked(leftList.value, leftChecked.value),
|
|
160
|
+
".indeterminate": leftChecked.value.size > 0 && !isAllChecked(leftList.value, leftChecked.value),
|
|
161
|
+
onChange: _cache[0] || (_cache[0] = ($event) => checkAll("left", leftList.value))
|
|
162
|
+
}, null, 40, _hoisted_4),
|
|
163
|
+
_createElementVNode(
|
|
164
|
+
"span",
|
|
165
|
+
null,
|
|
166
|
+
_toDisplayString(__props.sourceTitle),
|
|
167
|
+
1
|
|
168
|
+
/* TEXT */
|
|
169
|
+
)
|
|
170
|
+
]),
|
|
171
|
+
_createCommentVNode('\n \u8BA1\u6570\u8BED\u4E49\uFF1A\u9ED8\u8BA4\u663E\u793A\u603B\u6570\uFF0C\u6709\u52FE\u9009\u65F6\u663E\u793A"\u5DF2\u52FE M / \u5171 N"\u3002\n \u26A0\uFE0F \u4E4B\u524D\u5DE6\u53F3\u90FD\u5199 `\u52FE\u9009\u6570 / \u5217\u8868\u957F\u5EA6`\uFF0C\n \u53F3\u4FA7\u5217\u8868\u957F\u5EA6\u5C31\u662F\u5DF2\u9009\u603B\u6570\uFF0C\u4E8E\u662F\u51FA\u73B0"0/2"\u8FD9\u79CD\n \u770B\u8D77\u6765\u50CF"\u4E00\u4E2A\u90FD\u6CA1\u9009"\u7684\u8BEF\u5BFC\u6587\u6848 \u2014\u2014 \u5B9E\u9645\u662F\u6709 2 \u9879\u5DF2\u9009\u3002\n '),
|
|
172
|
+
_createElementVNode("span", _hoisted_5, [
|
|
173
|
+
leftChecked.value.size ? (_openBlock(), _createElementBlock(
|
|
174
|
+
_Fragment,
|
|
175
|
+
{ key: 0 },
|
|
176
|
+
[
|
|
177
|
+
_createTextVNode(
|
|
178
|
+
_toDisplayString(leftChecked.value.size) + " / ",
|
|
179
|
+
1
|
|
180
|
+
/* TEXT */
|
|
181
|
+
)
|
|
182
|
+
],
|
|
183
|
+
64
|
|
184
|
+
/* STABLE_FRAGMENT */
|
|
185
|
+
)) : _createCommentVNode("v-if", true),
|
|
186
|
+
_createTextVNode(
|
|
187
|
+
_toDisplayString(leftList.value.length) + " \u9879 ",
|
|
188
|
+
1
|
|
189
|
+
/* TEXT */
|
|
190
|
+
)
|
|
191
|
+
])
|
|
192
|
+
]),
|
|
193
|
+
__props.filterable ? (_openBlock(), _createElementBlock("div", _hoisted_6, [
|
|
194
|
+
_createVNode(WdInput_default, {
|
|
195
|
+
modelValue: leftQuery.value,
|
|
196
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => leftQuery.value = $event),
|
|
197
|
+
placeholder: __props.searchPlaceholder,
|
|
198
|
+
size: "sm",
|
|
199
|
+
clearable: ""
|
|
200
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
201
|
+
])) : _createCommentVNode("v-if", true),
|
|
202
|
+
_createElementVNode(
|
|
203
|
+
"div",
|
|
204
|
+
{
|
|
205
|
+
class: "wd-transfer__list",
|
|
206
|
+
style: _normalizeStyle({ height: __props.height + "px" })
|
|
207
|
+
},
|
|
208
|
+
[
|
|
209
|
+
leftList.value.length === 0 ? (_openBlock(), _createElementBlock(
|
|
210
|
+
"p",
|
|
211
|
+
_hoisted_7,
|
|
212
|
+
_toDisplayString(__props.data.length === 0 ? "\u6682\u65E0\u6570\u636E" : "\u6CA1\u6709\u53EF\u79FB\u52A8\u9879"),
|
|
213
|
+
1
|
|
214
|
+
/* TEXT */
|
|
215
|
+
)) : _createCommentVNode("v-if", true),
|
|
216
|
+
_createCommentVNode('\n \u26A0\uFE0F \u5FC5\u987B\u663E\u5F0F\u7ED1 @click\u3002\n \u628A\u539F\u751F <input> \u6362\u6210 <span> \u540E\uFF0C<label> \u5931\u53BB\u4E86\u9ED8\u8BA4\u7684"\u70B9\u51FB\u8F6C\u53D1"\u884C\u4E3A\n \uFF08label \u53EA\u5BF9\u8868\u5355\u63A7\u4EF6\u751F\u6548\uFF09\uFF0C\u6240\u4EE5\u70B9\u51FB\u6574\u884C\u4E0D\u518D\u89E6\u53D1\u4EFB\u4F55\u903B\u8F91\u3002\n '),
|
|
217
|
+
(_openBlock(true), _createElementBlock(
|
|
218
|
+
_Fragment,
|
|
219
|
+
null,
|
|
220
|
+
_renderList(leftList.value, (d) => {
|
|
221
|
+
return _openBlock(), _createElementBlock("label", {
|
|
222
|
+
key: d.key,
|
|
223
|
+
class: _normalizeClass(["wd-transfer__item", { "is-checked": leftChecked.value.has(d.key), "is-disabled": d.disabled }]),
|
|
224
|
+
role: "checkbox",
|
|
225
|
+
"aria-checked": leftChecked.value.has(d.key),
|
|
226
|
+
tabindex: d.disabled || __props.disabled ? -1 : 0,
|
|
227
|
+
"aria-disabled": d.disabled || __props.disabled,
|
|
228
|
+
onClick: ($event) => !d.disabled && !__props.disabled && toggleCheck("left", d.key),
|
|
229
|
+
onKeydown: [
|
|
230
|
+
_withKeys(_withModifiers(($event) => !d.disabled && !__props.disabled && toggleCheck("left", d.key), ["prevent"]), ["space"]),
|
|
231
|
+
_withKeys(_withModifiers(($event) => !d.disabled && !__props.disabled && toggleCheck("left", d.key), ["prevent"]), ["enter"])
|
|
232
|
+
]
|
|
233
|
+
}, [
|
|
234
|
+
_createCommentVNode("\n \u81EA\u5B9A\u4E49\u5706\u5F62\u52FE\u9009\u6307\u793A\u5668\uFF0C\u4E0D\u7528\u539F\u751F checkbox\u3002\n \u539F\u751F\u6846\u5728\u5404\u5E73\u53F0\u5B57\u5F62/\u5C3A\u5BF8\u4E0D\u4E00\uFF0C\u4E14\u65B9\u5F62\u4E0E\u5168\u7AD9\u300C\u5706\u5F62\u4F18\u5148\u300D\u51B2\u7A81\u3002\n role=checkbox + aria-checked \u4FDD\u8BC1\u65E0\u969C\u788D\u8BED\u4E49\u4E0D\u4E22\u3002\n "),
|
|
235
|
+
_createElementVNode(
|
|
236
|
+
"span",
|
|
237
|
+
{
|
|
238
|
+
class: _normalizeClass(["wd-transfer__tick", { "is-on": leftChecked.value.has(d.key) }]),
|
|
239
|
+
"aria-hidden": "true"
|
|
240
|
+
},
|
|
241
|
+
[
|
|
242
|
+
leftChecked.value.has(d.key) ? (_openBlock(), _createBlock(_unref(WdIcon_default), {
|
|
243
|
+
key: 0,
|
|
244
|
+
name: "check",
|
|
245
|
+
size: 10
|
|
246
|
+
})) : _createCommentVNode("v-if", true)
|
|
247
|
+
],
|
|
248
|
+
2
|
|
249
|
+
/* CLASS */
|
|
250
|
+
),
|
|
251
|
+
_renderSlot(_ctx.$slots, "item", {
|
|
252
|
+
item: d,
|
|
253
|
+
side: "left",
|
|
254
|
+
checked: leftChecked.value.has(d.key)
|
|
255
|
+
}, () => [
|
|
256
|
+
_createElementVNode("span", _hoisted_9, [
|
|
257
|
+
_createTextVNode(
|
|
258
|
+
_toDisplayString(d.label) + " ",
|
|
259
|
+
1
|
|
260
|
+
/* TEXT */
|
|
261
|
+
),
|
|
262
|
+
d.desc ? (_openBlock(), _createElementBlock(
|
|
263
|
+
"span",
|
|
264
|
+
_hoisted_10,
|
|
265
|
+
_toDisplayString(d.desc),
|
|
266
|
+
1
|
|
267
|
+
/* TEXT */
|
|
268
|
+
)) : _createCommentVNode("v-if", true)
|
|
269
|
+
])
|
|
270
|
+
])
|
|
271
|
+
], 42, _hoisted_8);
|
|
272
|
+
}),
|
|
273
|
+
128
|
|
274
|
+
/* KEYED_FRAGMENT */
|
|
275
|
+
))
|
|
276
|
+
],
|
|
277
|
+
4
|
|
278
|
+
/* STYLE */
|
|
279
|
+
)
|
|
280
|
+
]),
|
|
281
|
+
_createCommentVNode(" ---------------- \u4E2D\u95F4\u6309\u94AE ---------------- "),
|
|
282
|
+
_createElementVNode("div", _hoisted_11, [
|
|
283
|
+
_createElementVNode("button", {
|
|
284
|
+
type: "button",
|
|
285
|
+
class: "wd-transfer__op",
|
|
286
|
+
disabled: !canMoveRight.value,
|
|
287
|
+
"aria-label": "\u79FB\u5165\u53F3\u4FA7",
|
|
288
|
+
onClick: _cache[2] || (_cache[2] = ($event) => move("right"))
|
|
289
|
+
}, [
|
|
290
|
+
_createVNode(_unref(WdIcon_default), {
|
|
291
|
+
name: "arrow-right",
|
|
292
|
+
size: 16
|
|
293
|
+
})
|
|
294
|
+
], 8, _hoisted_12),
|
|
295
|
+
_createElementVNode("button", {
|
|
296
|
+
type: "button",
|
|
297
|
+
class: "wd-transfer__op",
|
|
298
|
+
disabled: !canMoveLeft.value,
|
|
299
|
+
"aria-label": "\u79FB\u56DE\u5DE6\u4FA7",
|
|
300
|
+
onClick: _cache[3] || (_cache[3] = ($event) => move("left"))
|
|
301
|
+
}, [
|
|
302
|
+
_createVNode(_unref(WdIcon_default), {
|
|
303
|
+
name: "arrow-left",
|
|
304
|
+
size: 16
|
|
305
|
+
})
|
|
306
|
+
], 8, _hoisted_13)
|
|
307
|
+
]),
|
|
308
|
+
_createCommentVNode(" ---------------- \u53F3\u4FA7\uFF1A\u5DF2\u9009 ---------------- "),
|
|
309
|
+
_createElementVNode("div", _hoisted_14, [
|
|
310
|
+
_createElementVNode("div", _hoisted_15, [
|
|
311
|
+
_createElementVNode("label", _hoisted_16, [
|
|
312
|
+
_createElementVNode("input", {
|
|
313
|
+
type: "checkbox",
|
|
314
|
+
checked: isAllChecked(rightList.value, rightChecked.value),
|
|
315
|
+
".indeterminate": rightChecked.value.size > 0 && !isAllChecked(rightList.value, rightChecked.value),
|
|
316
|
+
onChange: _cache[4] || (_cache[4] = ($event) => checkAll("right", rightList.value))
|
|
317
|
+
}, null, 40, _hoisted_17),
|
|
318
|
+
_createElementVNode(
|
|
319
|
+
"span",
|
|
320
|
+
null,
|
|
321
|
+
_toDisplayString(__props.targetTitle),
|
|
322
|
+
1
|
|
323
|
+
/* TEXT */
|
|
324
|
+
)
|
|
325
|
+
]),
|
|
326
|
+
_createCommentVNode(' \u53F3\u4FA7\uFF1A\u5217\u8868\u957F\u5EA6\u672C\u8EAB\u5C31\u662F"\u5DF2\u9009\u603B\u6570"\uFF0C\u4E0D\u518D\u91CD\u590D\u8868\u8FBE '),
|
|
327
|
+
_createElementVNode("span", _hoisted_18, [
|
|
328
|
+
rightChecked.value.size ? (_openBlock(), _createElementBlock(
|
|
329
|
+
_Fragment,
|
|
330
|
+
{ key: 0 },
|
|
331
|
+
[
|
|
332
|
+
_createTextVNode(
|
|
333
|
+
"\u5DF2\u52FE " + _toDisplayString(rightChecked.value.size) + " \xB7 ",
|
|
334
|
+
1
|
|
335
|
+
/* TEXT */
|
|
336
|
+
)
|
|
337
|
+
],
|
|
338
|
+
64
|
|
339
|
+
/* STABLE_FRAGMENT */
|
|
340
|
+
)) : _createCommentVNode("v-if", true),
|
|
341
|
+
_createTextVNode(
|
|
342
|
+
"\u5171 " + _toDisplayString(rightList.value.length) + " \u9879 ",
|
|
343
|
+
1
|
|
344
|
+
/* TEXT */
|
|
345
|
+
)
|
|
346
|
+
])
|
|
347
|
+
]),
|
|
348
|
+
__props.filterable ? (_openBlock(), _createElementBlock("div", _hoisted_19, [
|
|
349
|
+
_createVNode(WdInput_default, {
|
|
350
|
+
modelValue: rightQuery.value,
|
|
351
|
+
"onUpdate:modelValue": _cache[5] || (_cache[5] = ($event) => rightQuery.value = $event),
|
|
352
|
+
placeholder: __props.searchPlaceholder,
|
|
353
|
+
size: "sm",
|
|
354
|
+
clearable: ""
|
|
355
|
+
}, null, 8, ["modelValue", "placeholder"])
|
|
356
|
+
])) : _createCommentVNode("v-if", true),
|
|
357
|
+
_createElementVNode(
|
|
358
|
+
"div",
|
|
359
|
+
{
|
|
360
|
+
class: "wd-transfer__list",
|
|
361
|
+
style: _normalizeStyle({ height: __props.height + "px" })
|
|
362
|
+
},
|
|
363
|
+
[
|
|
364
|
+
__props.loading ? (_openBlock(), _createElementBlock("div", _hoisted_20, [
|
|
365
|
+
_createVNode(WdSpinner_default, { size: "sm" }),
|
|
366
|
+
_cache[6] || (_cache[6] = _createElementVNode(
|
|
367
|
+
"span",
|
|
368
|
+
null,
|
|
369
|
+
"\u52A0\u8F7D\u4E2D\u2026",
|
|
370
|
+
-1
|
|
371
|
+
/* CACHED */
|
|
372
|
+
))
|
|
373
|
+
])) : rightList.value.length === 0 ? (_openBlock(), _createElementBlock("p", _hoisted_21, "\u8FD8\u6CA1\u6709\u9009\u4E2D\u9879")) : _createCommentVNode("v-if", true),
|
|
374
|
+
(_openBlock(true), _createElementBlock(
|
|
375
|
+
_Fragment,
|
|
376
|
+
null,
|
|
377
|
+
_renderList(rightList.value, (d) => {
|
|
378
|
+
return _openBlock(), _createElementBlock("label", {
|
|
379
|
+
key: d.key,
|
|
380
|
+
class: _normalizeClass(["wd-transfer__item", { "is-checked": rightChecked.value.has(d.key), "is-disabled": d.disabled }]),
|
|
381
|
+
role: "checkbox",
|
|
382
|
+
"aria-checked": rightChecked.value.has(d.key),
|
|
383
|
+
tabindex: d.disabled || __props.disabled ? -1 : 0,
|
|
384
|
+
"aria-disabled": d.disabled || __props.disabled,
|
|
385
|
+
onClick: ($event) => !d.disabled && !__props.disabled && toggleCheck("right", d.key),
|
|
386
|
+
onKeydown: [
|
|
387
|
+
_withKeys(_withModifiers(($event) => !d.disabled && !__props.disabled && toggleCheck("right", d.key), ["prevent"]), ["space"]),
|
|
388
|
+
_withKeys(_withModifiers(($event) => !d.disabled && !__props.disabled && toggleCheck("right", d.key), ["prevent"]), ["enter"])
|
|
389
|
+
]
|
|
390
|
+
}, [
|
|
391
|
+
_createElementVNode(
|
|
392
|
+
"span",
|
|
393
|
+
{
|
|
394
|
+
class: _normalizeClass(["wd-transfer__tick", { "is-on": rightChecked.value.has(d.key) }]),
|
|
395
|
+
"aria-hidden": "true"
|
|
396
|
+
},
|
|
397
|
+
[
|
|
398
|
+
rightChecked.value.has(d.key) ? (_openBlock(), _createBlock(_unref(WdIcon_default), {
|
|
399
|
+
key: 0,
|
|
400
|
+
name: "check",
|
|
401
|
+
size: 10
|
|
402
|
+
})) : _createCommentVNode("v-if", true)
|
|
403
|
+
],
|
|
404
|
+
2
|
|
405
|
+
/* CLASS */
|
|
406
|
+
),
|
|
407
|
+
_renderSlot(_ctx.$slots, "item", {
|
|
408
|
+
item: d,
|
|
409
|
+
side: "right",
|
|
410
|
+
checked: rightChecked.value.has(d.key)
|
|
411
|
+
}, () => [
|
|
412
|
+
_createElementVNode("span", _hoisted_23, [
|
|
413
|
+
_createTextVNode(
|
|
414
|
+
_toDisplayString(d.label) + " ",
|
|
415
|
+
1
|
|
416
|
+
/* TEXT */
|
|
417
|
+
),
|
|
418
|
+
d.desc ? (_openBlock(), _createElementBlock(
|
|
419
|
+
"span",
|
|
420
|
+
_hoisted_24,
|
|
421
|
+
_toDisplayString(d.desc),
|
|
422
|
+
1
|
|
423
|
+
/* TEXT */
|
|
424
|
+
)) : _createCommentVNode("v-if", true)
|
|
425
|
+
])
|
|
426
|
+
])
|
|
427
|
+
], 42, _hoisted_22);
|
|
428
|
+
}),
|
|
429
|
+
128
|
|
430
|
+
/* KEYED_FRAGMENT */
|
|
431
|
+
))
|
|
432
|
+
],
|
|
433
|
+
4
|
|
434
|
+
/* STYLE */
|
|
435
|
+
)
|
|
436
|
+
])
|
|
437
|
+
],
|
|
438
|
+
2
|
|
439
|
+
/* CLASS */
|
|
440
|
+
);
|
|
441
|
+
};
|
|
442
|
+
}
|
|
443
|
+
});
|
|
444
|
+
export {
|
|
445
|
+
WdTransfer_default as WdTransfer
|
|
446
|
+
};
|