@opendesign-plus-test/components 0.0.1-rc.145 → 0.0.1-rc.147
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/chunk-OElCookieNotice.cjs.js +1 -1
- package/dist/chunk-OElCookieNotice.es.js +55 -37
- package/dist/components/activity/OActivityApproval.vue.d.ts +1 -144
- package/dist/components/activity/index.d.ts +1 -6
- package/dist/components/logo-swiper/OLogoSwiper.vue.d.ts +1 -0
- package/dist/components/logo-swiper/OLogoSwiperItems.vue.d.ts +1 -0
- package/dist/components/logo-swiper/index.d.ts +4 -0
- package/dist/components/logo-swiper/types.d.ts +1 -0
- package/dist/components/video/OVideoDetail.vue.d.ts +7 -0
- package/dist/components/video/index.d.ts +27 -0
- package/dist/components/video/types.d.ts +24 -0
- package/dist/components.cjs.js +37 -37
- package/dist/components.css +1 -1
- package/dist/components.es.js +10968 -10882
- package/dist/index.d.ts +1 -0
- package/dist/treeshaking/_virtual/icon-chevron-right.mjs +2 -2
- package/dist/treeshaking/_virtual/icon-material.mjs +21 -0
- package/dist/treeshaking/_virtual/icon-video.mjs +28 -0
- package/dist/treeshaking/components/activity/OActivityApproval.css +114 -407
- package/dist/treeshaking/components/activity/OActivityApproval.vue.d.ts +1 -144
- package/dist/treeshaking/components/activity/OActivityApproval.vue.mjs +198 -244
- package/dist/treeshaking/components/activity/OActivityApproval2.css +0 -288
- package/dist/treeshaking/components/activity/OActivityMyCalendar.css +441 -297
- package/dist/treeshaking/components/activity/OActivityMyCalendar.vue.mjs +110 -107
- package/dist/treeshaking/components/activity/OActivityMyCalendar2.css +10 -3
- package/dist/treeshaking/components/activity/index.d.ts +1 -6
- package/dist/treeshaking/components/common/WordAvatar.css +3 -2
- package/dist/treeshaking/components/common/WordAvatar.vue.mjs +19 -3
- package/dist/treeshaking/components/float-poster/OFloatPoster.css +25 -11
- package/dist/treeshaking/components/float-poster/OFloatPoster.vue.mjs +1 -1
- package/dist/treeshaking/components/footer/components/FooterList.css +109 -96
- package/dist/treeshaking/components/footer/components/FooterList.vue.mjs +1 -1
- package/dist/treeshaking/components/header/components/HeaderContent.css +185 -185
- package/dist/treeshaking/components/header/components/HeaderContent.vue.mjs +1 -1
- package/dist/treeshaking/components/logo-swiper/OLogoSwiper.css +22 -8
- package/dist/treeshaking/components/logo-swiper/OLogoSwiper.vue.d.ts +1 -0
- package/dist/treeshaking/components/logo-swiper/OLogoSwiper.vue.mjs +2 -9
- package/dist/treeshaking/components/logo-swiper/OLogoSwiper.vue2.mjs +21 -0
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.css +39 -26
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.vue.d.ts +1 -0
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.vue.mjs +1 -1
- package/dist/treeshaking/components/logo-swiper/OLogoSwiperItems.vue2.mjs +12 -8
- package/dist/treeshaking/components/logo-swiper/index.d.ts +4 -0
- package/dist/treeshaking/components/logo-swiper/types.d.ts +1 -0
- package/dist/treeshaking/components/meeting/OMeetingSigCalendar.css +3 -0
- package/dist/treeshaking/components/meeting/OMeetingSigCalendar.vue.mjs +3 -2
- package/dist/treeshaking/components/meeting/components/OMeetingCalendarList.vue.mjs +5 -5
- package/dist/treeshaking/components/section/OSection.vue2.mjs +2 -2
- package/dist/treeshaking/components/video/OVideoDetail.css +754 -0
- package/dist/treeshaking/components/video/OVideoDetail.vue.d.ts +7 -0
- package/dist/treeshaking/components/video/OVideoDetail.vue.mjs +318 -0
- package/dist/treeshaking/components/video/OVideoDetail.vue3.mjs +5 -0
- package/dist/treeshaking/components/video/index.d.ts +27 -0
- package/dist/treeshaking/components/video/index.mjs +10 -0
- package/dist/treeshaking/components/video/types.d.ts +24 -0
- package/dist/treeshaking/i18n/en.mjs +10 -1
- package/dist/treeshaking/i18n/zh.mjs +10 -1
- package/dist/treeshaking/index.d.ts +1 -0
- package/dist/treeshaking/index.mjs +2 -0
- package/package.json +1 -1
- package/dist/treeshaking/_virtual/icon-filter.mjs +0 -21
- package/dist/treeshaking/components/common/ThFilter.css +0 -146
- package/dist/treeshaking/components/common/ThFilter.vue.mjs +0 -270
- package/dist/treeshaking/components/common/ThFilter.vue3.mjs +0 -5
|
@@ -1,270 +0,0 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createElementBlock, createElementVNode, renderSlot, createBlock, unref, withCtx, createVNode, Fragment, renderList, withDirectives, createTextVNode, toDisplayString, normalizeClass, normalizeStyle, createCommentVNode, nextTick, h } from "vue";
|
|
2
|
-
import { OPopover, OScroller, OCheckboxGroup, OCheckbox, ODivider, OLink, OIcon, ODropdown, ODropdownItem } from "@opensig/opendesign";
|
|
3
|
-
import IconFilter from "../../_virtual/icon-filter.mjs";
|
|
4
|
-
import { useI18n } from "../../i18n/index.mjs";
|
|
5
|
-
import { buildVueDompurifyHTMLDirective } from "vue-dompurify-html";
|
|
6
|
-
const _hoisted_1 = {
|
|
7
|
-
class: "th-filter-wrapper",
|
|
8
|
-
ref: "filterRef"
|
|
9
|
-
};
|
|
10
|
-
const _hoisted_2 = {
|
|
11
|
-
key: 1,
|
|
12
|
-
class: "list-content-wrapper"
|
|
13
|
-
};
|
|
14
|
-
const _hoisted_3 = { class: "btn-wrapper" };
|
|
15
|
-
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
16
|
-
__name: "ThFilter",
|
|
17
|
-
props: {
|
|
18
|
-
modelValue: {},
|
|
19
|
-
list: { default: () => [] },
|
|
20
|
-
multiple: { type: Boolean, default: false },
|
|
21
|
-
tableWidth: {}
|
|
22
|
-
},
|
|
23
|
-
emits: ["update:model-value", "confirm"],
|
|
24
|
-
setup(__props, { emit: __emit }) {
|
|
25
|
-
const vDompurifyHtml = buildVueDompurifyHTMLDirective();
|
|
26
|
-
const { t } = useI18n();
|
|
27
|
-
const props = __props;
|
|
28
|
-
const emits = __emit;
|
|
29
|
-
const isCascader = computed(() => props.list.some((v) => {
|
|
30
|
-
var _a;
|
|
31
|
-
return (_a = v.children) == null ? void 0 : _a.length;
|
|
32
|
-
}));
|
|
33
|
-
const options = computed(() => {
|
|
34
|
-
return props.list.map((v) => {
|
|
35
|
-
const children = (v.children || []).map((t2) => {
|
|
36
|
-
return {
|
|
37
|
-
label: t2.label,
|
|
38
|
-
value: t2.value
|
|
39
|
-
};
|
|
40
|
-
});
|
|
41
|
-
return {
|
|
42
|
-
label: v.label,
|
|
43
|
-
value: v.value,
|
|
44
|
-
children: isCascader.value ? children : void 0
|
|
45
|
-
};
|
|
46
|
-
});
|
|
47
|
-
});
|
|
48
|
-
const visible = ref(false);
|
|
49
|
-
watch(
|
|
50
|
-
() => props.modelValue,
|
|
51
|
-
(val) => {
|
|
52
|
-
if (!props.multiple) {
|
|
53
|
-
checked.value = val;
|
|
54
|
-
} else {
|
|
55
|
-
multiChecked.value = val;
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
);
|
|
59
|
-
const multiChecked = ref([]);
|
|
60
|
-
const change = (val) => {
|
|
61
|
-
multiChecked.value = val;
|
|
62
|
-
};
|
|
63
|
-
const cascaderValue = ref([]);
|
|
64
|
-
const checked = ref(null);
|
|
65
|
-
const handleCommand = (val) => {
|
|
66
|
-
if (checked.value === val) {
|
|
67
|
-
checked.value = null;
|
|
68
|
-
} else {
|
|
69
|
-
checked.value = val;
|
|
70
|
-
}
|
|
71
|
-
confirmFn();
|
|
72
|
-
};
|
|
73
|
-
const reset = () => {
|
|
74
|
-
multiChecked.value = [];
|
|
75
|
-
cascaderValue.value = [];
|
|
76
|
-
checked.value = null;
|
|
77
|
-
confirmFn();
|
|
78
|
-
};
|
|
79
|
-
const confirmFn = () => {
|
|
80
|
-
let finalValue = null;
|
|
81
|
-
if (!props.multiple) {
|
|
82
|
-
finalValue = checked.value;
|
|
83
|
-
} else if (isCascader.value) {
|
|
84
|
-
finalValue = cascaderValue.value;
|
|
85
|
-
} else {
|
|
86
|
-
finalValue = multiChecked.value;
|
|
87
|
-
}
|
|
88
|
-
emits("update:model-value", finalValue);
|
|
89
|
-
visible.value = true;
|
|
90
|
-
nextTick(() => {
|
|
91
|
-
emits("confirm");
|
|
92
|
-
visible.value = false;
|
|
93
|
-
});
|
|
94
|
-
};
|
|
95
|
-
const hasChecked = computed(() => {
|
|
96
|
-
return multiChecked.value.length || cascaderValue.value.length || checked.value || props.modelValue;
|
|
97
|
-
});
|
|
98
|
-
const aref = ref(null);
|
|
99
|
-
const clickLabelSpan = async (e) => {
|
|
100
|
-
var _a, _b;
|
|
101
|
-
const ele = e.target.parentElement.parentElement;
|
|
102
|
-
await nextTick();
|
|
103
|
-
const input = ele.querySelector("input");
|
|
104
|
-
input.click();
|
|
105
|
-
await nextTick();
|
|
106
|
-
(_a = input.change) == null ? void 0 : _a.call(input, input);
|
|
107
|
-
await nextTick();
|
|
108
|
-
(_b = aref.value) == null ? void 0 : _b.$forceUpdate();
|
|
109
|
-
cascaderValue.value = JSON.parse(JSON.stringify(cascaderValue.value));
|
|
110
|
-
};
|
|
111
|
-
const renderLabel = ({ data }) => {
|
|
112
|
-
return h("span", { onclick: clickLabelSpan }, data.label);
|
|
113
|
-
};
|
|
114
|
-
return (_ctx, _cache) => {
|
|
115
|
-
const _component_ElCascaderPanel = resolveComponent("ElCascaderPanel");
|
|
116
|
-
return openBlock(), createElementBlock("div", _hoisted_1, [
|
|
117
|
-
createElementVNode("span", null, [
|
|
118
|
-
renderSlot(_ctx.$slots, "default")
|
|
119
|
-
]),
|
|
120
|
-
__props.multiple ? (openBlock(), createBlock(unref(OPopover), {
|
|
121
|
-
key: 0,
|
|
122
|
-
visible: visible.value,
|
|
123
|
-
position: "bottom",
|
|
124
|
-
wrapClass: "th-filter-popover",
|
|
125
|
-
trigger: "click",
|
|
126
|
-
anchor: false
|
|
127
|
-
}, {
|
|
128
|
-
target: withCtx(() => [
|
|
129
|
-
createElementVNode("div", {
|
|
130
|
-
class: normalizeClass(["filter-wrapper", hasChecked.value && "has-checked"])
|
|
131
|
-
}, [
|
|
132
|
-
createVNode(unref(OIcon), { class: "filter-icon" }, {
|
|
133
|
-
default: withCtx(() => [
|
|
134
|
-
createVNode(unref(IconFilter))
|
|
135
|
-
]),
|
|
136
|
-
_: 1
|
|
137
|
-
})
|
|
138
|
-
], 2)
|
|
139
|
-
]),
|
|
140
|
-
default: withCtx(() => [
|
|
141
|
-
!isCascader.value ? (openBlock(), createBlock(unref(OScroller), {
|
|
142
|
-
key: 0,
|
|
143
|
-
class: "content-wrapper",
|
|
144
|
-
"show-type": "hover",
|
|
145
|
-
"disabled-x": ""
|
|
146
|
-
}, {
|
|
147
|
-
default: withCtx(() => [
|
|
148
|
-
createVNode(unref(OCheckboxGroup), {
|
|
149
|
-
direction: "v",
|
|
150
|
-
onChange: change,
|
|
151
|
-
modelValue: multiChecked.value,
|
|
152
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => multiChecked.value = $event)
|
|
153
|
-
}, {
|
|
154
|
-
default: withCtx(() => [
|
|
155
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item) => {
|
|
156
|
-
return openBlock(), createBlock(unref(OCheckbox), {
|
|
157
|
-
key: item.value,
|
|
158
|
-
value: item.value
|
|
159
|
-
}, {
|
|
160
|
-
default: withCtx(() => [
|
|
161
|
-
withDirectives(createElementVNode("span", null, null, 512), [
|
|
162
|
-
[unref(vDompurifyHtml), item.label]
|
|
163
|
-
])
|
|
164
|
-
]),
|
|
165
|
-
_: 2
|
|
166
|
-
}, 1032, ["value"]);
|
|
167
|
-
}), 128))
|
|
168
|
-
]),
|
|
169
|
-
_: 1
|
|
170
|
-
}, 8, ["modelValue"])
|
|
171
|
-
]),
|
|
172
|
-
_: 1
|
|
173
|
-
})) : (openBlock(), createElementBlock("div", _hoisted_2, [
|
|
174
|
-
createVNode(_component_ElCascaderPanel, {
|
|
175
|
-
ref_key: "aref",
|
|
176
|
-
ref: aref,
|
|
177
|
-
expandTrigger: "hover",
|
|
178
|
-
renderLabel,
|
|
179
|
-
modelValue: cascaderValue.value,
|
|
180
|
-
"onUpdate:modelValue": _cache[1] || (_cache[1] = ($event) => cascaderValue.value = $event),
|
|
181
|
-
style: { "width": "fit-content" },
|
|
182
|
-
options: options.value,
|
|
183
|
-
props: { multiple: true, expandTrigger: "hover" }
|
|
184
|
-
}, null, 8, ["modelValue", "options"])
|
|
185
|
-
])),
|
|
186
|
-
createVNode(unref(ODivider)),
|
|
187
|
-
createElementVNode("div", _hoisted_3, [
|
|
188
|
-
createVNode(unref(OLink), { onClick: reset }, {
|
|
189
|
-
default: withCtx(() => [
|
|
190
|
-
createTextVNode(toDisplayString(unref(t)("common.reset")), 1)
|
|
191
|
-
]),
|
|
192
|
-
_: 1
|
|
193
|
-
}),
|
|
194
|
-
createVNode(unref(OLink), { onClick: confirmFn }, {
|
|
195
|
-
default: withCtx(() => [
|
|
196
|
-
createTextVNode(toDisplayString(unref(t)("common.confirm")), 1)
|
|
197
|
-
]),
|
|
198
|
-
_: 1
|
|
199
|
-
})
|
|
200
|
-
])
|
|
201
|
-
]),
|
|
202
|
-
_: 1
|
|
203
|
-
}, 8, ["visible"])) : (openBlock(), createBlock(unref(ODropdown), {
|
|
204
|
-
key: 1,
|
|
205
|
-
optionPosition: "bottom",
|
|
206
|
-
optionWrapClass: "th-filter-dropdown",
|
|
207
|
-
modelValue: checked.value,
|
|
208
|
-
"onUpdate:modelValue": _cache[3] || (_cache[3] = ($event) => checked.value = $event)
|
|
209
|
-
}, {
|
|
210
|
-
dropdown: withCtx(() => [
|
|
211
|
-
options.value.length ? (openBlock(), createBlock(unref(OScroller), {
|
|
212
|
-
key: 0,
|
|
213
|
-
"disabled-x": "",
|
|
214
|
-
style: { "max-height": "300px" },
|
|
215
|
-
"show-type": "always"
|
|
216
|
-
}, {
|
|
217
|
-
default: withCtx(() => [
|
|
218
|
-
createVNode(unref(ODropdownItem), {
|
|
219
|
-
style: normalizeStyle({
|
|
220
|
-
"--table-width": __props.tableWidth
|
|
221
|
-
}),
|
|
222
|
-
class: normalizeClass([{ "is-active": __props.modelValue === "" }]),
|
|
223
|
-
value: "''",
|
|
224
|
-
label: unref(t)("common.all"),
|
|
225
|
-
onClick: _cache[2] || (_cache[2] = ($event) => handleCommand(""))
|
|
226
|
-
}, null, 8, ["style", "class", "label"]),
|
|
227
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(options.value, (item) => {
|
|
228
|
-
return openBlock(), createBlock(unref(ODropdownItem), {
|
|
229
|
-
style: normalizeStyle({
|
|
230
|
-
"--table-width": __props.tableWidth
|
|
231
|
-
}),
|
|
232
|
-
class: normalizeClass([{ "is-active": item.value === __props.modelValue }]),
|
|
233
|
-
key: item.value,
|
|
234
|
-
value: item.value,
|
|
235
|
-
onClick: ($event) => handleCommand(item.value)
|
|
236
|
-
}, {
|
|
237
|
-
default: withCtx(() => [
|
|
238
|
-
withDirectives(createElementVNode("span", null, null, 512), [
|
|
239
|
-
[unref(vDompurifyHtml), item.label]
|
|
240
|
-
])
|
|
241
|
-
]),
|
|
242
|
-
_: 2
|
|
243
|
-
}, 1032, ["style", "class", "value", "onClick"]);
|
|
244
|
-
}), 128))
|
|
245
|
-
]),
|
|
246
|
-
_: 1
|
|
247
|
-
})) : createCommentVNode("", true),
|
|
248
|
-
!options.value.length ? renderSlot(_ctx.$slots, "empty", { key: 1 }) : createCommentVNode("", true)
|
|
249
|
-
]),
|
|
250
|
-
default: withCtx(() => [
|
|
251
|
-
createElementVNode("div", {
|
|
252
|
-
class: normalizeClass(["filter-wrapper", hasChecked.value && "has-checked"])
|
|
253
|
-
}, [
|
|
254
|
-
createVNode(unref(OIcon), { class: "filter-icon" }, {
|
|
255
|
-
default: withCtx(() => [
|
|
256
|
-
createVNode(unref(IconFilter))
|
|
257
|
-
]),
|
|
258
|
-
_: 1
|
|
259
|
-
})
|
|
260
|
-
], 2)
|
|
261
|
-
]),
|
|
262
|
-
_: 3
|
|
263
|
-
}, 8, ["modelValue"]))
|
|
264
|
-
], 512);
|
|
265
|
-
};
|
|
266
|
-
}
|
|
267
|
-
});
|
|
268
|
-
export {
|
|
269
|
-
_sfc_main as default
|
|
270
|
-
};
|