@opendesign-plus-test/components 0.0.1-rc.21 → 0.0.1-rc.23
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 +428 -137
- package/dist/components/OBanner.vue.d.ts +10 -1
- package/dist/components/OFooter.vue.d.ts +1 -1
- package/dist/components/OHeaderSearch.vue.d.ts +4 -4
- package/dist/components/activity/OActivityApproval.vue.d.ts +277 -0
- package/dist/components/activity/OActivityForm.vue.d.ts +140 -0
- package/dist/components/activity/OMyActivityCalendar.vue.d.ts +578 -0
- package/dist/components/activity/config.d.ts +15 -0
- package/dist/components/activity/data.d.ts +51 -0
- package/dist/components/activity/index.d.ts +623 -0
- package/dist/components/activity/types.d.ts +76 -0
- package/dist/components/meeting/OMeetingCalendar.vue.d.ts +309 -0
- package/dist/components/meeting/OMeetingForm.vue.d.ts +156 -0
- package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +582 -0
- package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
- package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +27 -0
- package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
- package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +12 -0
- package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
- package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
- package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
- package/dist/components/meeting/config.d.ts +27 -0
- package/dist/components/meeting/types.d.ts +140 -0
- package/dist/components/meeting/utils.d.ts +21 -0
- package/dist/components.cjs.js +224 -3
- package/dist/components.css +1 -1
- package/dist/components.es.js +43544 -2307
- package/dist/index.d.ts +2 -0
- package/package.json +6 -3
- package/scripts/generate-components-index.js +4 -0
- package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
- package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
- package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
- package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
- package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
- package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
- package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
- package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
- package/src/assets/meeting/transparent.png +0 -0
- package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
- package/src/assets/svg-icons/icon-filter.svg +3 -0
- package/src/assets/svg-icons/icon-loading.svg +4 -0
- package/src/assets/svg-icons/icon-search.svg +3 -0
- package/src/assets/svg-icons/icon-tips.svg +3 -0
- package/src/components/OBanner.vue +11 -3
- package/src/components/OFooter.vue +1 -1
- package/src/components/activity/OActivityApproval.vue +775 -0
- package/src/components/activity/OActivityForm.vue +465 -0
- package/src/components/activity/OMyActivityCalendar.vue +1342 -0
- package/src/components/activity/config.ts +130 -0
- package/src/components/activity/data.ts +365 -0
- package/src/components/activity/index.ts +24 -0
- package/src/components/activity/types.ts +83 -0
- package/src/components/common/MoreText.vue +119 -0
- package/src/components/common/ThFilter.vue +326 -0
- package/src/components/events/OEventsApply.vue +2 -86
- package/src/components/events/OEventsCalendar.vue +0 -25
- package/src/components/events/OEventsList.vue +0 -51
- package/src/components/events/index.ts +1 -0
- package/src/components/meeting/OMeetingCalendar.vue +865 -0
- package/src/components/meeting/OMeetingForm.vue +1035 -0
- package/src/components/meeting/OMeetingPlayback.vue +439 -0
- package/src/components/meeting/OMyMeetingCalendar.vue +1501 -0
- package/src/components/meeting/OSigMeetingCalendar.vue +411 -0
- package/src/components/meeting/components/OMeetingCalendarList.vue +462 -0
- package/src/components/meeting/components/OMeetingCalendarSelector.vue +206 -0
- package/src/components/meeting/components/OMeetingDetail.vue +189 -0
- package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
- package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
- package/src/components/meeting/components/OMyCalendarWrapper.vue +160 -0
- package/src/components/meeting/components/OSigMeetingAside.vue +197 -0
- package/src/components/meeting/config.ts +110 -0
- package/src/components/meeting/index.ts +45 -0
- package/src/components/meeting/types.ts +167 -0
- package/src/components/meeting/utils.ts +106 -0
- package/src/draft/Footer.vue +4 -4
- package/src/env.d.ts +15 -0
- package/src/i18n/en.ts +140 -0
- package/src/i18n/index.ts +18 -4
- package/src/i18n/zh.ts +140 -0
- package/src/index.ts +2 -0
- package/tsconfig.json +6 -2
- package/vite.config.ts +25 -9
- package/npmcachae/_cacache/content-v2/sha512/05/f7/dd881de8b21208ea65cfce17c65f29964c3897505819f81151b9798a3a6ab1a1114324192354ead15cd2c8d93f76cc9929af168066ec9cc7878d0fd87578 +0 -1
- package/npmcachae/_cacache/content-v2/sha512/08/b7/879230f8c2f3765920a6fd6113f4687141f1f645f96af7d95a0dee9113d1095d000fb78a5dd55c1860bbfb9b698ef6281b3874b03b2384222f61fe055fc4 +0 -1
- package/npmcachae/_cacache/content-v2/sha512/10/a0/a6626613c03ee052925a762e8675878efdf83dac64fafea43beb2a875f7d7c3907bb0ee30761253cd16021fd58911449594e1d3358675cbb7c48e62f220a +0 -1
- package/npmcachae/_cacache/content-v2/sha512/2e/a6/7cbcf55a98bbe2ca881d10e982ebf59211a0ec051eaf46eb1914df66cc35ae502ed6888850e51d8f45cd92695bac16961a642bc41508f8d5160a9ab617ab +0 -1
- package/npmcachae/_cacache/content-v2/sha512/92/8d/e5259c5d5cc2a625247f3c4d809192ca9482467e23683d74924a11e91a7997ad890b3d26adaf34df66d5329cc7a5fbde6713110cad05107a0b504e4fd4e8 +0 -1
- package/npmcachae/_cacache/content-v2/sha512/e9/45/9597d870127c35681155cec5fe52fde4e1aa0f778b996ee371e856aca850ee4c13aba74b0c3d3a89ff0ea4c9e1d33e64e53c31dc9cede0b31012695ee659 +0 -1
- package/npmcachae/_cacache/index-v5/16/4a/7195fcc6857299c4ab7e26014a8ae6e3c396507a2c8db3da1b74b005d574 +0 -3
- package/npmcachae/_cacache/index-v5/58/f0/4fe556f104b09be642895a82afa463fe560d9a0dc8f507efeef825a6905e +0 -3
- package/npmcachae/_cacache/index-v5/67/7d/0b50dc4c09555fc922ccf43c46994f1a0a5ff47dc0a5d5cf41437ac2d3e6 +0 -3
- package/npmcachae/_cacache/index-v5/8f/28/353f8839e030ab11aab3e7d9f1b8c053403e9f593cf6d4aa6ec8fdd7610d +0 -3
- package/npmcachae/_cacache/index-v5/97/10/0fcf20eb29d0726bd820822f6729718464b591b0e6901217c956740e943c +0 -3
- package/npmcachae/_cacache/index-v5/db/89/a0a4f35f593105624ab39339962d9e9b5cc65ed0c346b0732fb8dd73721d +0 -3
- package/npmcachae/_logs/2026-03-26T14_10_35_885Z-debug-0.log +0 -171
- package/npmcachae/_logs/2026-03-26T14_10_38_617Z-debug-0.log +0 -4227
- package/npmcachae/_logs/2026-03-26T14_10_45_316Z-debug-0.log +0 -4228
- package/npmcachae/_logs/2026-03-26T14_10_48_169Z-debug-0.log +0 -4228
- package/npmcachae/_logs/2026-03-26T14_10_51_306Z-debug-0.log +0 -464
- package/npmcachae/_logs/2026-03-26T14_10_53_911Z-debug-0.log +0 -464
- package/npmcachae/_logs/2026-03-26T14_10_56_398Z-debug-0.log +0 -464
- package/npmcachae/_logs/2026-03-26T14_10_58_861Z-debug-0.log +0 -464
- package/npmcachae/_logs/2026-03-26T14_11_01_337Z-debug-0.log +0 -464
- package/npmcachae/_logs/2026-03-26T14_11_03_851Z-debug-0.log +0 -464
- package/npmcachae/_logs/2026-03-26T14_11_08_024Z-debug-0.log +0 -464
- package/npmcachae/_update-notifier-last-checked +0 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +0 -1
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +0 -1
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +0 -1
- package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +0 -3
- package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +0 -3
- package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +0 -2
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +0 -277
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +0 -433
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +0 -433
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +0 -212
- package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { OIcon, OIconChevronDown, OIconChevronUp } from '@opensig/opendesign';
|
|
3
|
+
import { nextTick, onMounted, ref, watch } from 'vue';
|
|
4
|
+
|
|
5
|
+
const props = withDefaults(
|
|
6
|
+
defineProps<{
|
|
7
|
+
text?: string;
|
|
8
|
+
link?: boolean;
|
|
9
|
+
lines?: number;
|
|
10
|
+
show: boolean;
|
|
11
|
+
}>(),
|
|
12
|
+
{
|
|
13
|
+
text: '',
|
|
14
|
+
link: false,
|
|
15
|
+
lines: 3,
|
|
16
|
+
show: false,
|
|
17
|
+
},
|
|
18
|
+
);
|
|
19
|
+
const expanded = ref(false); // 是否展开
|
|
20
|
+
const showBtn = ref(false); // 受否显示展开按钮
|
|
21
|
+
const offsetHeight = ref(0); // 内容高度
|
|
22
|
+
const contentRef = ref(null); // 内容节点
|
|
23
|
+
|
|
24
|
+
onMounted(() => {
|
|
25
|
+
determineHeight();
|
|
26
|
+
});
|
|
27
|
+
watch([() => props.text, () => props.show], () => {
|
|
28
|
+
determineHeight();
|
|
29
|
+
});
|
|
30
|
+
const determineHeight = () => {
|
|
31
|
+
nextTick(() => {
|
|
32
|
+
const ele = contentRef.value;
|
|
33
|
+
if (ele) {
|
|
34
|
+
const range = document.createRange();
|
|
35
|
+
range.setStart(ele, 0);
|
|
36
|
+
range.setEnd(ele, ele.childNodes.length);
|
|
37
|
+
showBtn.value = range.getBoundingClientRect().height > ele.offsetHeight + 10 || ele.scrollHeight > ele.offsetHeight + 10;
|
|
38
|
+
offsetHeight.value = range.getBoundingClientRect().height || ele.scrollHeight;
|
|
39
|
+
} else {
|
|
40
|
+
showBtn.value = false;
|
|
41
|
+
}
|
|
42
|
+
});
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
const clickText = () => {
|
|
46
|
+
console.log(props.link);
|
|
47
|
+
console.log('判断是否使用a标签');
|
|
48
|
+
};
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<div class="more-text-wrapper">
|
|
53
|
+
<div
|
|
54
|
+
:class="['more-text-content', link && 'is-link']"
|
|
55
|
+
ref="contentRef"
|
|
56
|
+
:style="{
|
|
57
|
+
'max-height': expanded ? offsetHeight + 'px' : '66px',
|
|
58
|
+
'-webkit-line-clamp': expanded ? 'initial' : lines,
|
|
59
|
+
}"
|
|
60
|
+
@click="clickText"
|
|
61
|
+
>
|
|
62
|
+
{{ text }}
|
|
63
|
+
</div>
|
|
64
|
+
<div class="more-text-btn" v-if="showBtn" @click="expanded = !expanded">
|
|
65
|
+
<div v-if="!expanded">
|
|
66
|
+
<span>{{ t('common.expand') }}</span>
|
|
67
|
+
<OIcon>
|
|
68
|
+
<OIconChevronDown />
|
|
69
|
+
</OIcon>
|
|
70
|
+
</div>
|
|
71
|
+
<div v-else>
|
|
72
|
+
<span>{{ t('common.collapse') }}</span>
|
|
73
|
+
<OIcon>
|
|
74
|
+
<OIconChevronUp />
|
|
75
|
+
</OIcon>
|
|
76
|
+
</div>
|
|
77
|
+
</div>
|
|
78
|
+
</div>
|
|
79
|
+
</template>
|
|
80
|
+
|
|
81
|
+
<style lang="scss" scoped>
|
|
82
|
+
.more-text-wrapper {
|
|
83
|
+
.more-text-content {
|
|
84
|
+
line-height: 22px;
|
|
85
|
+
overflow: hidden;
|
|
86
|
+
text-overflow: ellipsis;
|
|
87
|
+
display: -webkit-box;
|
|
88
|
+
-webkit-box-orient: vertical;
|
|
89
|
+
white-space: pre-wrap;
|
|
90
|
+
word-break: break-all;
|
|
91
|
+
transition: height 0.1s;
|
|
92
|
+
|
|
93
|
+
&.is-link {
|
|
94
|
+
color: var(--o-color-primary1);
|
|
95
|
+
cursor: pointer;
|
|
96
|
+
@include hover {
|
|
97
|
+
color: var(--o-color-primary2);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
.more-text-btn {
|
|
103
|
+
color: var(--o-color-primary1);
|
|
104
|
+
@include hover {
|
|
105
|
+
color: var(--o-color-primary2);
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
& > div {
|
|
109
|
+
height: 22px;
|
|
110
|
+
cursor: pointer;
|
|
111
|
+
display: flex;
|
|
112
|
+
align-items: center;
|
|
113
|
+
column-gap: 4px;
|
|
114
|
+
justify-content: flex-end;
|
|
115
|
+
@include tip1;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
</style>
|
|
@@ -0,0 +1,326 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { useLocale } from '@opendesign-plus/composables';
|
|
3
|
+
import {
|
|
4
|
+
OCheckbox,
|
|
5
|
+
OCheckboxGroup,
|
|
6
|
+
ODivider,
|
|
7
|
+
ODropdown,
|
|
8
|
+
ODropdownItem,
|
|
9
|
+
OIcon,
|
|
10
|
+
OLink,
|
|
11
|
+
OPopover,
|
|
12
|
+
OScroller,
|
|
13
|
+
} from '@opensig/opendesign';
|
|
14
|
+
import { computed, h, nextTick, ref, watch } from 'vue';
|
|
15
|
+
import IconFilter from '~icons/components/icon-filter.svg';
|
|
16
|
+
import AppEmpty from '../../../../../../.vitepress/src/components/AppEmpty.vue';
|
|
17
|
+
|
|
18
|
+
type TItem = { label: string; value: string | number; children?: TItem[] };
|
|
19
|
+
const { t } = useLocale();
|
|
20
|
+
const props = withDefaults(
|
|
21
|
+
defineProps<{
|
|
22
|
+
modelValue: string[] | number[] | string | number;
|
|
23
|
+
list: TItem[];
|
|
24
|
+
multiple?: boolean;
|
|
25
|
+
tableWidth?: number;
|
|
26
|
+
}>(),
|
|
27
|
+
{
|
|
28
|
+
list: () => [],
|
|
29
|
+
multiple: false,
|
|
30
|
+
},
|
|
31
|
+
);
|
|
32
|
+
const emits = defineEmits(['update:model-value', 'confirm']);
|
|
33
|
+
/**
|
|
34
|
+
* 根据options判断是否为级联选择器
|
|
35
|
+
* 如果是级联选择器,需要注意子级是否存在相同value
|
|
36
|
+
*/
|
|
37
|
+
const isCascader = computed(() => props.list.some((v: TItem) => v.children?.length));
|
|
38
|
+
// 格式化数据
|
|
39
|
+
const options = computed(() => {
|
|
40
|
+
return props.list.map((v: TItem) => {
|
|
41
|
+
const children = (v.children || []).map((t: TItem) => {
|
|
42
|
+
return {
|
|
43
|
+
label: t.label,
|
|
44
|
+
value: t.value,
|
|
45
|
+
};
|
|
46
|
+
});
|
|
47
|
+
return {
|
|
48
|
+
label: v.label,
|
|
49
|
+
value: v.value,
|
|
50
|
+
children: isCascader.value ? children : undefined,
|
|
51
|
+
};
|
|
52
|
+
});
|
|
53
|
+
});
|
|
54
|
+
const visible = ref(false); // 控制浮窗展示
|
|
55
|
+
|
|
56
|
+
watch(
|
|
57
|
+
() => props.modelValue,
|
|
58
|
+
(val: TItem) => {
|
|
59
|
+
if (!props.multiple) {
|
|
60
|
+
checked.value = val;
|
|
61
|
+
} else {
|
|
62
|
+
multiChecked.value = val;
|
|
63
|
+
}
|
|
64
|
+
},
|
|
65
|
+
);
|
|
66
|
+
// -------------------- 普通多选 --------------------
|
|
67
|
+
const multiChecked = ref([]); // 选中的值
|
|
68
|
+
|
|
69
|
+
const change = (val: string | number) => {
|
|
70
|
+
multiChecked.value = val;
|
|
71
|
+
};
|
|
72
|
+
|
|
73
|
+
// -------------------- 级联选择 --------------------
|
|
74
|
+
const cascaderValue = ref([]);
|
|
75
|
+
// -------------------- 单选 --------------------
|
|
76
|
+
const checked = ref(null); // 选中的值
|
|
77
|
+
// 单选没有按钮,点击即是确认
|
|
78
|
+
const handleCommand = (val: string | number) => {
|
|
79
|
+
if (checked.value === val) {
|
|
80
|
+
checked.value = null;
|
|
81
|
+
} else {
|
|
82
|
+
checked.value = val;
|
|
83
|
+
}
|
|
84
|
+
confirmFn();
|
|
85
|
+
};
|
|
86
|
+
// -------------------- 按钮操作 --------------------
|
|
87
|
+
const reset = () => {
|
|
88
|
+
multiChecked.value = [];
|
|
89
|
+
cascaderValue.value = [];
|
|
90
|
+
checked.value = null;
|
|
91
|
+
confirmFn();
|
|
92
|
+
};
|
|
93
|
+
const confirmFn = () => {
|
|
94
|
+
let finalValue = null;
|
|
95
|
+
if (!props.multiple) {
|
|
96
|
+
finalValue = checked.value;
|
|
97
|
+
} else if (isCascader.value) {
|
|
98
|
+
finalValue = cascaderValue.value;
|
|
99
|
+
} else {
|
|
100
|
+
finalValue = multiChecked.value;
|
|
101
|
+
}
|
|
102
|
+
emits('update:model-value', finalValue);
|
|
103
|
+
visible.value = true;
|
|
104
|
+
nextTick(() => {
|
|
105
|
+
emits('confirm');
|
|
106
|
+
visible.value = false;
|
|
107
|
+
});
|
|
108
|
+
};
|
|
109
|
+
|
|
110
|
+
// 是否有选中值,用于切换图标
|
|
111
|
+
const hasChecked = computed(() => {
|
|
112
|
+
return multiChecked.value.length || cascaderValue.value.length || checked.value || props.modelValue;
|
|
113
|
+
});
|
|
114
|
+
// -------------------- 自定义级联选择器label --------------------
|
|
115
|
+
const aref = ref(null);
|
|
116
|
+
const clickLabelSpan = async (e) => {
|
|
117
|
+
const ele = e.target.parentElement.parentElement;
|
|
118
|
+
await nextTick();
|
|
119
|
+
const input = ele.querySelector('input');
|
|
120
|
+
input.click();
|
|
121
|
+
await nextTick();
|
|
122
|
+
input.change?.(input);
|
|
123
|
+
await nextTick();
|
|
124
|
+
aref.value?.$forceUpdate();
|
|
125
|
+
cascaderValue.value = JSON.parse(JSON.stringify(cascaderValue.value));
|
|
126
|
+
};
|
|
127
|
+
const renderLabel = ({ data }) => {
|
|
128
|
+
return h('span', { onclick: clickLabelSpan }, data.label);
|
|
129
|
+
};
|
|
130
|
+
</script>
|
|
131
|
+
|
|
132
|
+
<template>
|
|
133
|
+
<div class="th-filter-wrapper" ref="filterRef">
|
|
134
|
+
<span>
|
|
135
|
+
<slot></slot>
|
|
136
|
+
</span>
|
|
137
|
+
<OPopover
|
|
138
|
+
v-if="multiple"
|
|
139
|
+
:visible="visible"
|
|
140
|
+
position="bottom"
|
|
141
|
+
wrapClass="th-filter-popover"
|
|
142
|
+
trigger="click"
|
|
143
|
+
:anchor="false">
|
|
144
|
+
<template #target>
|
|
145
|
+
<div class="filter-wrapper" :class="hasChecked && 'has-checked'">
|
|
146
|
+
<OIcon class="filter-icon">
|
|
147
|
+
<IconFilter />
|
|
148
|
+
</OIcon>
|
|
149
|
+
</div>
|
|
150
|
+
</template>
|
|
151
|
+
<OScroller class="content-wrapper" show-type="hover" disabled-x v-if="!isCascader">
|
|
152
|
+
<OCheckboxGroup direction="v" @change="change" v-model="multiChecked">
|
|
153
|
+
<OCheckbox v-for="item in options" :key="item.value" :value="item.value">
|
|
154
|
+
<span v-dompurify-html="item.label"></span>
|
|
155
|
+
</OCheckbox>
|
|
156
|
+
</OCheckboxGroup>
|
|
157
|
+
</OScroller>
|
|
158
|
+
<div class="list-content-wrapper" v-else>
|
|
159
|
+
<ElCascaderPanel
|
|
160
|
+
ref="aref"
|
|
161
|
+
expandTrigger="hover"
|
|
162
|
+
:renderLabel="renderLabel"
|
|
163
|
+
v-model="cascaderValue"
|
|
164
|
+
style="width: fit-content"
|
|
165
|
+
:options="options"
|
|
166
|
+
:props="{ multiple: true, expandTrigger: 'hover' }"
|
|
167
|
+
/>
|
|
168
|
+
</div>
|
|
169
|
+
<ODivider />
|
|
170
|
+
<div class="btn-wrapper">
|
|
171
|
+
<OLink @click="reset">{{ t('common.reset') }}</OLink>
|
|
172
|
+
<OLink @click="confirmFn">{{ t('common.confirm') }}</OLink>
|
|
173
|
+
</div>
|
|
174
|
+
</OPopover>
|
|
175
|
+
<ODropdown v-else optionPosition="bottom" optionWrapClass="th-filter-dropdown" v-model="checked">
|
|
176
|
+
<div class="filter-wrapper" :class="hasChecked && 'has-checked'">
|
|
177
|
+
<OIcon class="filter-icon">
|
|
178
|
+
<IconFilter />
|
|
179
|
+
</OIcon>
|
|
180
|
+
</div>
|
|
181
|
+
<template #dropdown>
|
|
182
|
+
<OScroller disabled-x style="max-height: 300px" show-type="always" v-if="options.length">
|
|
183
|
+
<ODropdownItem
|
|
184
|
+
:style="{
|
|
185
|
+
'--table-width': tableWidth,
|
|
186
|
+
}"
|
|
187
|
+
:class="[{ 'is-active': modelValue === '' }]"
|
|
188
|
+
value="''"
|
|
189
|
+
:label="t('common.all')"
|
|
190
|
+
@click="handleCommand('')"
|
|
191
|
+
/>
|
|
192
|
+
<ODropdownItem
|
|
193
|
+
:style="{
|
|
194
|
+
'--table-width': tableWidth,
|
|
195
|
+
}"
|
|
196
|
+
:class="[{ 'is-active': item.value === modelValue }]"
|
|
197
|
+
v-for="item in options"
|
|
198
|
+
:key="item.value"
|
|
199
|
+
:value="item.value"
|
|
200
|
+
@click="handleCommand(item.value)"
|
|
201
|
+
>
|
|
202
|
+
<span v-dompurify-html="item.label"></span>
|
|
203
|
+
</ODropdownItem>
|
|
204
|
+
</OScroller>
|
|
205
|
+
<slot name="empty" v-if="!options.length"></slot>
|
|
206
|
+
</template>
|
|
207
|
+
</ODropdown>
|
|
208
|
+
</div>
|
|
209
|
+
</template>
|
|
210
|
+
|
|
211
|
+
<style lang="scss">
|
|
212
|
+
.th-filter-wrapper {
|
|
213
|
+
display: flex;
|
|
214
|
+
column-gap: var(--o-gap-2);
|
|
215
|
+
flex-wrap: nowrap;
|
|
216
|
+
align-items: center;
|
|
217
|
+
|
|
218
|
+
& > span:first-child {
|
|
219
|
+
word-break: keep-all;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
.filter-wrapper {
|
|
224
|
+
display: flex;
|
|
225
|
+
align-items: center;
|
|
226
|
+
justify-content: center;
|
|
227
|
+
cursor: pointer;
|
|
228
|
+
|
|
229
|
+
& > * {
|
|
230
|
+
flex-shrink: 0;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
.filter-hover-icon {
|
|
234
|
+
display: none;
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
.filter-icon {
|
|
238
|
+
@include h2;
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
&:hover,
|
|
242
|
+
&.has-checked {
|
|
243
|
+
.filter-icon {
|
|
244
|
+
color: var(--o-color-primary1);
|
|
245
|
+
}
|
|
246
|
+
|
|
247
|
+
.o-icon {
|
|
248
|
+
path {
|
|
249
|
+
fill: currentColor;
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.th-filter-dropdown {
|
|
256
|
+
.o-dropdown-item {
|
|
257
|
+
min-width: 80px;
|
|
258
|
+
max-width: calc(var(--table-width, 300) * 0.8px);
|
|
259
|
+
--dropdown-item-justify: flex-start;
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
.o-dropdown-item.is-active {
|
|
263
|
+
font-weight: 500;
|
|
264
|
+
background-color: var(--dropdown-item-bg-color-hover);
|
|
265
|
+
color: var(--dropdown-item-color-hover);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
|
|
269
|
+
.th-filter-popover {
|
|
270
|
+
--popup-radius: var(--o-radius-xs);
|
|
271
|
+
|
|
272
|
+
.o-popup-body {
|
|
273
|
+
padding: var(--o-gap-2) 0 0 0;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.list-content-wrapper {
|
|
277
|
+
display: flex;
|
|
278
|
+
|
|
279
|
+
.o-scrollbar-wrapper:first-child {
|
|
280
|
+
border-right: 1px solid rgb(224, 226, 230);
|
|
281
|
+
}
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.content-wrapper {
|
|
285
|
+
padding: 0 var(--o-gap-4);
|
|
286
|
+
overflow: auto;
|
|
287
|
+
max-height: 300px;
|
|
288
|
+
|
|
289
|
+
.o-checkbox-group {
|
|
290
|
+
flex-shrink: 0;
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
.o-checkbox-label {
|
|
294
|
+
flex-grow: 1;
|
|
295
|
+
|
|
296
|
+
.label-wrapper {
|
|
297
|
+
cursor: pointer;
|
|
298
|
+
display: flex;
|
|
299
|
+
align-items: center;
|
|
300
|
+
justify-content: space-between;
|
|
301
|
+
|
|
302
|
+
.o-svg-icon {
|
|
303
|
+
font-size: 24px;
|
|
304
|
+
}
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
|
|
309
|
+
.btn-wrapper {
|
|
310
|
+
min-width: 158px;
|
|
311
|
+
box-sizing: border-box;
|
|
312
|
+
display: flex;
|
|
313
|
+
align-items: center;
|
|
314
|
+
justify-content: center;
|
|
315
|
+
padding-bottom: var(--o-gap-3);
|
|
316
|
+
@include text1;
|
|
317
|
+
|
|
318
|
+
.o-link {
|
|
319
|
+
width: 80px;
|
|
320
|
+
display: flex;
|
|
321
|
+
align-items: center;
|
|
322
|
+
justify-content: center;
|
|
323
|
+
}
|
|
324
|
+
}
|
|
325
|
+
}
|
|
326
|
+
</style>
|
|
@@ -102,18 +102,6 @@ defineProps<EventsApplyPropsT>();
|
|
|
102
102
|
--height: var(--o-gap-6);
|
|
103
103
|
height: calc(100% + var(--height) - 40px); // 延伸到下一个元素
|
|
104
104
|
background-color: var(--o-color-control4);
|
|
105
|
-
@include respond-to('laptop') {
|
|
106
|
-
--height: var(--o-gap-5);
|
|
107
|
-
}
|
|
108
|
-
@include respond-to('pad_h') {
|
|
109
|
-
--height: var(--o-gap-4);
|
|
110
|
-
}
|
|
111
|
-
@include respond-to('pad_v') {
|
|
112
|
-
--height: var(--o-gap-5);
|
|
113
|
-
}
|
|
114
|
-
@include respond-to('phone') {
|
|
115
|
-
--height: var(--o-gap-5);
|
|
116
|
-
}
|
|
117
105
|
}
|
|
118
106
|
|
|
119
107
|
// 最后一个序号不显示连接线(倒数第2个子元素,因为最后一个是step-item)
|
|
@@ -129,38 +117,12 @@ defineProps<EventsApplyPropsT>();
|
|
|
129
117
|
grid-template-rows: repeat(3, auto); // 桌面端:3行
|
|
130
118
|
gap: var(--o-gap-6);
|
|
131
119
|
|
|
132
|
-
@include respond-to('laptop') {
|
|
133
|
-
gap: var(--o-gap-5);
|
|
134
|
-
}
|
|
135
|
-
@include respond-to('pad_h') {
|
|
136
|
-
gap: var(--o-gap-4);
|
|
137
|
-
}
|
|
138
|
-
@include respond-to('pad_v') {
|
|
139
|
-
gap: var(--o-gap-5);
|
|
140
|
-
}
|
|
141
|
-
@include respond-to('phone') {
|
|
142
|
-
gap: var(--o-gap-5);
|
|
143
|
-
}
|
|
144
|
-
|
|
145
120
|
// 移动端:2列布局(序号列 + 内容列)
|
|
146
121
|
@include respond-to('<=pad_v') {
|
|
147
122
|
grid-template-columns: auto 1fr; // 第1列自适应,第2列占满
|
|
148
123
|
grid-template-rows: auto; // 行数自动
|
|
149
124
|
gap: 0 var(--o-gap-3); // 列间距12px,行间距0
|
|
150
125
|
row-gap: var(--o-gap-6); // 行间距
|
|
151
|
-
|
|
152
|
-
@include respond-to('laptop') {
|
|
153
|
-
row-gap: var(--o-gap-5);
|
|
154
|
-
}
|
|
155
|
-
@include respond-to('pad_h') {
|
|
156
|
-
row-gap: var(--o-gap-4);
|
|
157
|
-
}
|
|
158
|
-
@include respond-to('pad_v') {
|
|
159
|
-
row-gap: var(--o-gap-5);
|
|
160
|
-
}
|
|
161
|
-
@include respond-to('phone') {
|
|
162
|
-
row-gap: var(--o-gap-5);
|
|
163
|
-
}
|
|
164
126
|
}
|
|
165
127
|
|
|
166
128
|
.step-item {
|
|
@@ -170,12 +132,6 @@ defineProps<EventsApplyPropsT>();
|
|
|
170
132
|
flex-direction: column; // 垂直排列子元素
|
|
171
133
|
--idx-size: 20px;
|
|
172
134
|
--idx-gap: var(--o-gap-3);
|
|
173
|
-
@include respond-to('laptop') {
|
|
174
|
-
--idx-gap: var(--o-gap-2);
|
|
175
|
-
}
|
|
176
|
-
@include respond-to('pad_h') {
|
|
177
|
-
--idx-gap: var(--o-gap-2);
|
|
178
|
-
}
|
|
179
135
|
// 移动端:强制在第2列显示
|
|
180
136
|
@include respond-to('<=pad_v') {
|
|
181
137
|
grid-column: 2 !important;
|
|
@@ -190,14 +146,6 @@ defineProps<EventsApplyPropsT>();
|
|
|
190
146
|
display: flex;
|
|
191
147
|
align-items: center;
|
|
192
148
|
@include h2;
|
|
193
|
-
@include respond-to('laptop') {
|
|
194
|
-
margin-bottom: var(--o-gap-3);
|
|
195
|
-
padding: var(--o-gap-4) var(--o-gap-5) 0 var(--o-gap-5);
|
|
196
|
-
}
|
|
197
|
-
@include respond-to('pad_h') {
|
|
198
|
-
margin-bottom: var(--o-gap-2);
|
|
199
|
-
padding: var(--o-gap-3) var(--o-gap-4) 0 var(--o-gap-4);
|
|
200
|
-
}
|
|
201
149
|
@include respond-to('pad_v') {
|
|
202
150
|
margin-bottom: 0;
|
|
203
151
|
padding: var(--o-gap-3) var(--o-gap-4);
|
|
@@ -235,12 +183,6 @@ defineProps<EventsApplyPropsT>();
|
|
|
235
183
|
color: var(--o-color-info2);
|
|
236
184
|
padding: 0 var(--o-gap-6) var(--o-gap-4) var(--o-gap-6);
|
|
237
185
|
@include tip1;
|
|
238
|
-
@include respond-to('laptop') {
|
|
239
|
-
padding: 0 var(--o-gap-5) var(--o-gap-3) var(--o-gap-5);
|
|
240
|
-
}
|
|
241
|
-
@include respond-to('pad_h') {
|
|
242
|
-
padding: 0 var(--o-gap-4) var(--o-gap-3) var(--o-gap-4);
|
|
243
|
-
}
|
|
244
186
|
@include respond-to('pad_v') {
|
|
245
187
|
padding: var(--o-gap-3) var(--o-gap-4);
|
|
246
188
|
}
|
|
@@ -272,12 +214,6 @@ defineProps<EventsApplyPropsT>();
|
|
|
272
214
|
.o-icon {
|
|
273
215
|
font-size: 16px;
|
|
274
216
|
margin-right: var(--o-gap-4);
|
|
275
|
-
@include respond-to('laptop') {
|
|
276
|
-
margin-right: var(--o-gap-3);
|
|
277
|
-
}
|
|
278
|
-
@include respond-to('pad_h') {
|
|
279
|
-
margin-right: var(--o-gap-2);
|
|
280
|
-
}
|
|
281
217
|
@include respond-to('pad_v') {
|
|
282
218
|
margin-right: var(--o-gap-2);
|
|
283
219
|
}
|
|
@@ -294,14 +230,8 @@ defineProps<EventsApplyPropsT>();
|
|
|
294
230
|
.desc-list-item-desc {
|
|
295
231
|
font-weight: 400;
|
|
296
232
|
--padding-left: var(--o-gap-4);
|
|
297
|
-
padding-left: calc(var(--o-gap-4) + var(--
|
|
233
|
+
padding-left: calc(var(--o-gap-4) + var(--o-gap-4));
|
|
298
234
|
color: rgba(255, 255, 255, 0.8);
|
|
299
|
-
@include respond-to('laptop') {
|
|
300
|
-
--padding-left: var(--o-gap-3);
|
|
301
|
-
}
|
|
302
|
-
@include respond-to('pad_h') {
|
|
303
|
-
--padding-left: var(--o-gap-2);
|
|
304
|
-
}
|
|
305
235
|
@include respond-to('pad_v') {
|
|
306
236
|
padding-left: var(--o-gap-5);
|
|
307
237
|
color: var(--o-color-info2);
|
|
@@ -400,23 +330,9 @@ defineProps<EventsApplyPropsT>();
|
|
|
400
330
|
|
|
401
331
|
.img-wrapper {
|
|
402
332
|
height: 280px;
|
|
403
|
-
|
|
404
|
-
width: calc(100% - var(--width) * 2);
|
|
333
|
+
width: calc(100% - var(--o-gap-6) * 2);
|
|
405
334
|
margin-left: auto;
|
|
406
335
|
margin-right: auto;
|
|
407
|
-
@include respond-to('laptop') {
|
|
408
|
-
--width: var(--o-gap-5);
|
|
409
|
-
}
|
|
410
|
-
@include respond-to('pad_h') {
|
|
411
|
-
--width: var(--o-gap-4);
|
|
412
|
-
height: 220px;
|
|
413
|
-
}
|
|
414
|
-
@include respond-to('pad_v') {
|
|
415
|
-
--width: var(--o-gap-5);
|
|
416
|
-
}
|
|
417
|
-
@include respond-to('phone') {
|
|
418
|
-
--width: var(--o-gap-5);
|
|
419
|
-
}
|
|
420
336
|
}
|
|
421
337
|
|
|
422
338
|
.img-wrapper-phone {
|
|
@@ -271,18 +271,6 @@ const getIcon = (item: CalendarItemT) => {
|
|
|
271
271
|
.o-collapse-item-header {
|
|
272
272
|
padding: var(--o-gap-4) var(--o-gap-6);
|
|
273
273
|
align-items: center;
|
|
274
|
-
@include respond-to('laptop') {
|
|
275
|
-
padding: var(--o-gap-3) var(--o-gap-5);
|
|
276
|
-
}
|
|
277
|
-
@include respond-to('pad_h') {
|
|
278
|
-
padding: var(--o-gap-2) var(--o-gap-4);
|
|
279
|
-
}
|
|
280
|
-
@include respond-to('pad_v') {
|
|
281
|
-
padding: var(--o-gap-2) var(--o-gap-3);
|
|
282
|
-
}
|
|
283
|
-
@include respond-to('phone') {
|
|
284
|
-
padding: var(--o-gap-2) var(--o-gap-3);
|
|
285
|
-
}
|
|
286
274
|
|
|
287
275
|
.o-collapse-item-title {
|
|
288
276
|
flex: 1;
|
|
@@ -325,19 +313,6 @@ const getIcon = (item: CalendarItemT) => {
|
|
|
325
313
|
justify-content: center;
|
|
326
314
|
margin-right: var(--o-gap-4);
|
|
327
315
|
background-color: rgb(var(--bg-color));
|
|
328
|
-
|
|
329
|
-
@include respond-to('laptop') {
|
|
330
|
-
margin-right: var(--o-gap-3);
|
|
331
|
-
}
|
|
332
|
-
@include respond-to('pad_h') {
|
|
333
|
-
margin-right: var(--o-gap-2);
|
|
334
|
-
}
|
|
335
|
-
@include respond-to('pad_v') {
|
|
336
|
-
margin-right: var(--o-gap-2);
|
|
337
|
-
}
|
|
338
|
-
@include respond-to('phone') {
|
|
339
|
-
margin-right: var(--o-gap-2);
|
|
340
|
-
}
|
|
341
316
|
}
|
|
342
317
|
|
|
343
318
|
.o-icon {
|