@opendesign-plus/components 0.0.1-rc.16
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 -0
- package/dist/chunk-OElCookieNotice.es.js +281 -0
- package/dist/components/OBanner.vue.d.ts +2 -0
- package/dist/components/OCookieNotice.vue.d.ts +16 -0
- package/dist/components/OFooter.vue.d.ts +25 -0
- package/dist/components/OHeader.vue.d.ts +23 -0
- package/dist/components/OHeaderMoblie.vue.d.ts +33 -0
- package/dist/components/OHeaderSearch.vue.d.ts +692 -0
- package/dist/components/OHeaderUser.vue.d.ts +40 -0
- package/dist/components/OPlusConfigProvider.vue.d.ts +23 -0
- package/dist/components/OSection.vue.d.ts +37 -0
- package/dist/components/OSourceCode.vue.d.ts +20 -0
- package/dist/components/OThemeSwitcher.vue.d.ts +28 -0
- package/dist/components/element-plus/OElCookieNotice.vue.d.ts +31 -0
- package/dist/components/element-plus/index.d.ts +2 -0
- package/dist/components/events/OEventsApply.vue.d.ts +16 -0
- package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
- package/dist/components/events/OEventsList.vue.d.ts +26 -0
- package/dist/components/events/config.d.ts +26 -0
- package/dist/components/events/index.d.ts +78 -0
- package/dist/components/events/types.d.ts +66 -0
- package/dist/components/events/utils.d.ts +7 -0
- package/dist/components.cjs.js +3 -0
- package/dist/components.css +1 -0
- package/dist/components.element.cjs.js +1 -0
- package/dist/components.element.es.js +4 -0
- package/dist/components.es.js +3509 -0
- package/dist/index.d.ts +18 -0
- package/docs/design.md +27 -0
- package/docs/design_banner.md +41 -0
- package/docs/design_section.md +27 -0
- package/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
- package/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
- package/npmcachae/_logs/2026-03-17T09_38_12_009Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_14_370Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_16_516Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_18_616Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_20_859Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_23_182Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_25_452Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_27_865Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_30_082Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_32_219Z-debug-0.log +157 -0
- package/npmcachae/_logs/2026-03-17T09_38_34_308Z-debug-0.log +157 -0
- package/npmcachae/_update-notifier-last-checked +0 -0
- package/package.json +53 -0
- package/scripts/generate-components-index.js +100 -0
- package/src/assets/events/city/default-cover.png +0 -0
- package/src/assets/events/city//344/270/212/346/265/267.png +0 -0
- package/src/assets/events/city//345/214/227/344/272/254.png +0 -0
- package/src/assets/events/city//345/215/227/344/272/254.png +0 -0
- package/src/assets/events/city//345/244/251/346/264/245.png +0 -0
- package/src/assets/events/city//345/271/277/345/267/236.png +0 -0
- package/src/assets/events/city//346/210/220/351/203/275.png +0 -0
- package/src/assets/events/city//346/227/240/351/224/241.png +0 -0
- package/src/assets/events/city//346/235/255/345/267/236.png +0 -0
- package/src/assets/events/city//346/255/246/346/261/211.png +0 -0
- package/src/assets/events/city//346/267/261/345/234/2631.png +0 -0
- package/src/assets/events/city//346/267/261/345/234/2632.png +0 -0
- package/src/assets/events/city//350/213/217/345/267/236.png +0 -0
- package/src/assets/events/city//350/245/277/345/256/211.png +0 -0
- package/src/assets/events/city//351/203/221/345/267/236.png +0 -0
- package/src/assets/events/svg-icons/icon-checked.svg +3 -0
- package/src/assets/events/svg-icons/icon-competition.svg +7 -0
- package/src/assets/events/svg-icons/icon-events.svg +4 -0
- package/src/assets/events/svg-icons/icon-release.svg +4 -0
- package/src/assets/events/svg-icons/icon-summit.svg +4 -0
- package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
- package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
- package/src/assets/svg-icons/icon-caret-left.svg +3 -0
- package/src/assets/svg-icons/icon-caret-right.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
- package/src/assets/svg-icons/icon-chevron-right.svg +3 -0
- package/src/assets/svg-icons/icon-close.svg +3 -0
- package/src/assets/svg-icons/icon-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-back.svg +3 -0
- package/src/assets/svg-icons/icon-header-delete.svg +3 -0
- package/src/assets/svg-icons/icon-header-menu.svg +3 -0
- package/src/assets/svg-icons/icon-header-person.svg +3 -0
- package/src/assets/svg-icons/icon-header-search.svg +4 -0
- package/src/assets/svg-icons/icon-locale.svg +3 -0
- package/src/assets/svg-icons/icon-log-off.svg +3 -0
- package/src/assets/svg-icons/icon-message.svg +3 -0
- package/src/assets/svg-icons/icon-moon.svg +3 -0
- package/src/assets/svg-icons/icon-outlink.svg +3 -0
- package/src/assets/svg-icons/icon-overview.svg +3 -0
- package/src/assets/svg-icons/icon-setting.svg +3 -0
- package/src/assets/svg-icons/icon-sun.svg +3 -0
- package/src/components/OBanner.vue +390 -0
- package/src/components/OCookieNotice.vue +423 -0
- package/src/components/OFooter.vue +566 -0
- package/src/components/OHeader.vue +97 -0
- package/src/components/OHeaderMoblie.vue +149 -0
- package/src/components/OHeaderSearch.vue +601 -0
- package/src/components/OHeaderUser.vue +304 -0
- package/src/components/OPlusConfigProvider.vue +32 -0
- package/src/components/OSection.vue +178 -0
- package/src/components/OSourceCode.vue +153 -0
- package/src/components/OThemeSwitcher.vue +108 -0
- package/src/components/common/AppAvatar.vue +83 -0
- package/src/components/common/ClientOnlyWrapper.ts +21 -0
- package/src/components/common/ContentWrapper.vue +85 -0
- package/src/components/common/HeaderEulerNav.vue +1118 -0
- package/src/components/common/HeaderNavMoblie.vue +344 -0
- package/src/components/common/HeaderUbmcNav.vue +597 -0
- package/src/components/element-plus/OElCookieNotice.vue +412 -0
- package/src/components/element-plus/index.ts +3 -0
- package/src/components/events/OEventsApply.vue +487 -0
- package/src/components/events/OEventsCalendar.vue +611 -0
- package/src/components/events/OEventsList.vue +402 -0
- package/src/components/events/config.ts +47 -0
- package/src/components/events/index.ts +23 -0
- package/src/components/events/npmcachae/_cacache/content-v2/sha512/2c/4f/a4140bfbf374a43f7dfe71880c051f79149cd259fb1a154fb692802c7489ef2317b737e7e690a627714ba19317971f29051b3798c246297b425a626a5b7a +1 -0
- package/src/components/events/npmcachae/_cacache/index-v5/8e/86/70dc69f1b1592fe14da10d2516ddfaa609af0cd9054a6ebde664acc6ab12 +2 -0
- package/src/components/events/npmcachae/_logs/2026-03-25T09_58_33_134Z-debug-0.log +105 -0
- package/src/components/events/npmcachae/_update-notifier-last-checked +0 -0
- package/src/components/events/types.ts +80 -0
- package/src/components/events/utils.ts +9 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/3e/17/1865217b9acb9f4921c53a09b5c76587cd2ab748beb2699ff6cfb1341d73b1aa56ed91ffc5ab2c9c9b3fbe626103b35d9a79ff29ff6b8cbb8d89755fe1a2 +1 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/a6/15/47bb7552ec9248079e839a5feecc1742d4de19524fdf041cf581701cf4760a5025106036145e279ba193b07c8fa5b07ae3d75f1b6032f0cb2219115b6167 +1 -0
- package/src/components/meeting/npmcachae/_cacache/content-v2/sha512/d1/4c/133b32e09c97101a27a07cc4432f94e470cff02d120d21babcea77c3f5cd436793516dc1a8e282ee1a568f923c148b1a48f4a43233462a530d35e8b41c67 +1 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/54/0d/a4909047714a0a7198bb9bd37020992464e47c79a791889919b84d90aab0 +3 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/8e/2b/21a79778e2ac08cf5663baf83cb35f951995a496007eb2e2f7fba54021a4 +3 -0
- package/src/components/meeting/npmcachae/_cacache/index-v5/eb/a0/b70c8132e5b57a0f1e129b8cc941796420a9c147c0baa680710083740898 +2 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_54_955Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_03_57_842Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_00_016Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_02_191Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_04_425Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_06_642Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_04_08_826Z-debug-0.log +277 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_36_140Z-debug-0.log +433 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_39_573Z-debug-0.log +433 -0
- package/src/components/meeting/npmcachae/_logs/2026-03-20T07_25_42_134Z-debug-0.log +212 -0
- package/src/components/meeting/npmcachae/_update-notifier-last-checked +0 -0
- package/src/draft/Banner.vue +265 -0
- package/src/draft/ButtonCards.vue +106 -0
- package/src/draft/Feature.vue +134 -0
- package/src/draft/Footer.vue +512 -0
- package/src/draft/HorizontalAnchor.vue +165 -0
- package/src/draft/ItemSwiper.vue +133 -0
- package/src/draft/Logo.vue +141 -0
- package/src/draft/LogoCard.vue +75 -0
- package/src/draft/LogoV2.vue +19 -0
- package/src/draft/MainCard.vue +38 -0
- package/src/draft/MultiCard.vue +95 -0
- package/src/draft/MultiIconCard.vue +74 -0
- package/src/draft/OInfoCard.vue +176 -0
- package/src/draft/Process.vue +81 -0
- package/src/draft/Section.vue +167 -0
- package/src/draft/SingleTabCard.vue +85 -0
- package/src/draft/SliderCard.vue +110 -0
- package/src/env.d.ts +1 -0
- package/src/i18n/en.ts +20 -0
- package/src/i18n/index.ts +42 -0
- package/src/i18n/zh.ts +14 -0
- package/src/index.ts +46 -0
- package/src/npmcachae/_cacache/content-v2/sha512/bd/56/25079ffb18446953f88fc063c3d6eaf7191772851b8477c118f113b920a7f357b67b9006181af58c9f68b0059b899ad0f2c86fe0a6490958d138cb063afd +1 -0
- package/src/npmcachae/_cacache/index-v5/d8/49/af4c6bb8f580edbd7b6e18db381844403e5f689a9849c5ffcdd2dd95d735 +3 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_33_398Z-debug-0.log +156 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_35_464Z-debug-0.log +156 -0
- package/src/npmcachae/_logs/2026-03-17T10_53_37_852Z-debug-0.log +156 -0
- package/src/npmcachae/_update-notifier-last-checked +0 -0
- package/src/shared/provide.ts +6 -0
- package/src/shims-vue-dompurify-html.d.ts +17 -0
- package/src/vue.d.ts +10 -0
- package/tsconfig.json +33 -0
- package/vite.config.ts +102 -0
|
@@ -0,0 +1,304 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { OIcon, OBadge, ODivider, ODropdown, ODropdownItem } from '@opensig/opendesign';
|
|
3
|
+
|
|
4
|
+
import AppAvatar from './common/AppAvatar.vue';
|
|
5
|
+
|
|
6
|
+
import IconAvatar from '~icons/components/icon-avatar-line.svg';
|
|
7
|
+
import IconChevronDown from '~icons/components/icon-chevron-down.svg';
|
|
8
|
+
|
|
9
|
+
import { useScreen } from '@opendesign-plus/composables';
|
|
10
|
+
|
|
11
|
+
const { lePadV } = useScreen();
|
|
12
|
+
|
|
13
|
+
interface UserInfoT {
|
|
14
|
+
photo: string;
|
|
15
|
+
username: string;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
interface OptionsItemT {
|
|
19
|
+
id: string; // id
|
|
20
|
+
label: string; // 标题
|
|
21
|
+
icon?: string; // icon
|
|
22
|
+
url: string; // 跳转链接
|
|
23
|
+
target: string; // 跳转方式
|
|
24
|
+
total: number; // 消息数量
|
|
25
|
+
logout: boolean; // 是否是退出登录 item
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface UserPropsT {
|
|
29
|
+
token?: string;
|
|
30
|
+
lang?: string;
|
|
31
|
+
noticeTotal?: number;
|
|
32
|
+
userInfo?: UserInfoT;
|
|
33
|
+
userInfoVisible?: boolean;
|
|
34
|
+
options?: OptionsItemT[];
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
withDefaults(defineProps<UserPropsT>(), {
|
|
38
|
+
token: undefined,
|
|
39
|
+
lang: undefined,
|
|
40
|
+
noticeTotal: undefined,
|
|
41
|
+
userInfo: undefined,
|
|
42
|
+
userInfoVisible: undefined,
|
|
43
|
+
options: undefined,
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
export interface OHeaderUserEmitsT {
|
|
47
|
+
(e: 'login'): void;
|
|
48
|
+
(e: 'logout'): void;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
const emit = defineEmits<OHeaderUserEmitsT>();
|
|
52
|
+
|
|
53
|
+
const login = () => {
|
|
54
|
+
emit('login');
|
|
55
|
+
};
|
|
56
|
+
|
|
57
|
+
const jumpToPage = (val: any) => {
|
|
58
|
+
if (val?.logout) {
|
|
59
|
+
emit('logout');
|
|
60
|
+
} else {
|
|
61
|
+
window.open(val.url, val.target);
|
|
62
|
+
}
|
|
63
|
+
};
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<template>
|
|
67
|
+
<div class="header-user">
|
|
68
|
+
<!-- 未登录或登录失败 -->
|
|
69
|
+
<template v-if="!token">
|
|
70
|
+
<OIcon @click="login" class="avatar-icon">
|
|
71
|
+
<IconAvatar />
|
|
72
|
+
</OIcon>
|
|
73
|
+
</template>
|
|
74
|
+
<!-- 已登录 -->
|
|
75
|
+
<Transition name="header-user-zoom-in">
|
|
76
|
+
<div class="user-info" v-if="token">
|
|
77
|
+
<ODropdown
|
|
78
|
+
:trigger="lePadV ? 'click' : 'hover'"
|
|
79
|
+
:optionPosition="lePadV ? 'br' : 'bottom'"
|
|
80
|
+
:option-wrap-class="`user-dropdown ${lang === 'en' ? 'is-en' : ''} user-dropdown${userInfoVisible ? '-info' : ''}`"
|
|
81
|
+
>
|
|
82
|
+
<div class="info-wrap hover-icon-rotate">
|
|
83
|
+
<OBadge :value="noticeTotal" color="danger" class="header-message user-avatar" :class="{ 'notice-not': !noticeTotal }">
|
|
84
|
+
<AppAvatar :avatar="userInfo.photo" :name="userInfo.username" :custom-size="lePadV ? 24 : 32" />
|
|
85
|
+
</OBadge>
|
|
86
|
+
<p class="user-account">{{ userInfo.username }}</p>
|
|
87
|
+
<OIcon class="icon">
|
|
88
|
+
<IconChevronDown />
|
|
89
|
+
</OIcon>
|
|
90
|
+
</div>
|
|
91
|
+
<template #dropdown>
|
|
92
|
+
<!-- 账号信息 -->
|
|
93
|
+
<div v-if="userInfoVisible" class="user-info-dropdown">
|
|
94
|
+
<AppAvatar :avatar="userInfo.photo" :name="userInfo.username" :custom-size="32" />
|
|
95
|
+
<div class="right-info">
|
|
96
|
+
<p class="user-fullname">用户名</p>
|
|
97
|
+
<p class="user-account">{{ userInfo.username }}</p>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<ODivider v-if="userInfoVisible" :style="{ '--o-divider-gap': '6px' }" />
|
|
101
|
+
<template v-for="item in options" :key="item.label">
|
|
102
|
+
<ODropdownItem :style="{ '--dropdown-item-justify': userInfoVisible ? 'flex-start' : 'center' }" @click="jumpToPage(item)">
|
|
103
|
+
<template v-if="item?.icon">
|
|
104
|
+
<OBadge :value="item.total" color="danger" class="header-message icon-message" :class="{ 'notice-not': !item.total }">
|
|
105
|
+
<OIcon>
|
|
106
|
+
<component :is="item.icon" class="icon" />
|
|
107
|
+
</OIcon>
|
|
108
|
+
</OBadge>
|
|
109
|
+
<span>{{ item.label }}</span>
|
|
110
|
+
</template>
|
|
111
|
+
<template v-else>
|
|
112
|
+
<OBadge v-if="item?.total" :value="item.total" color="danger" class="header-message message" :class="{ 'notice-not': !item.total }">
|
|
113
|
+
{{ item.label }}
|
|
114
|
+
</OBadge>
|
|
115
|
+
<span v-else>{{ item.label }}</span>
|
|
116
|
+
</template>
|
|
117
|
+
</ODropdownItem>
|
|
118
|
+
</template>
|
|
119
|
+
</template>
|
|
120
|
+
</ODropdown>
|
|
121
|
+
</div>
|
|
122
|
+
</Transition>
|
|
123
|
+
</div>
|
|
124
|
+
</template>
|
|
125
|
+
|
|
126
|
+
<style lang="scss" scoped>
|
|
127
|
+
.header-user {
|
|
128
|
+
display: flex;
|
|
129
|
+
align-items: center;
|
|
130
|
+
height: 100%;
|
|
131
|
+
visibility: visible;
|
|
132
|
+
opacity: 1;
|
|
133
|
+
transition: opacity 0.15s;
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
.user-info {
|
|
137
|
+
height: 100%;
|
|
138
|
+
min-width: 32px;
|
|
139
|
+
display: flex;
|
|
140
|
+
cursor: pointer;
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
.info-wrap {
|
|
144
|
+
height: calc(100% - 10px);
|
|
145
|
+
margin: 5px 0;
|
|
146
|
+
display: flex;
|
|
147
|
+
align-items: center;
|
|
148
|
+
|
|
149
|
+
.icon {
|
|
150
|
+
margin-left: 4px;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
.user-avatar {
|
|
155
|
+
width: 32px;
|
|
156
|
+
height: 32px;
|
|
157
|
+
margin-right: 12px;
|
|
158
|
+
|
|
159
|
+
:deep(.o-badge-content) {
|
|
160
|
+
right: 8px;
|
|
161
|
+
top: 2px;
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
.o-dropdown-item {
|
|
166
|
+
width: 142px;
|
|
167
|
+
white-space: nowrap;
|
|
168
|
+
--dropdown-item-color: var(--o-color-info1);
|
|
169
|
+
--dropdown-item-padding: 6px 8px;
|
|
170
|
+
@include tip1;
|
|
171
|
+
|
|
172
|
+
@include hover {
|
|
173
|
+
color: var(--o-color-primary1);
|
|
174
|
+
background: var(--o-color-control2-light);
|
|
175
|
+
}
|
|
176
|
+
|
|
177
|
+
.o-icon {
|
|
178
|
+
color: var(--o-color-info3);
|
|
179
|
+
--icon-size: 24px;
|
|
180
|
+
margin-right: 8px;
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
.icon-message {
|
|
184
|
+
height: 24px;
|
|
185
|
+
display: flex;
|
|
186
|
+
|
|
187
|
+
@include respond-to('laptop') {
|
|
188
|
+
height: 16px;
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
:deep(.o-badge-content) {
|
|
192
|
+
right: 14px;
|
|
193
|
+
}
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
|
|
197
|
+
.notice-not {
|
|
198
|
+
:deep(.o-badge-content) {
|
|
199
|
+
display: none;
|
|
200
|
+
}
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
.user-info-dropdown {
|
|
204
|
+
display: flex;
|
|
205
|
+
align-items: center;
|
|
206
|
+
}
|
|
207
|
+
|
|
208
|
+
.right-info {
|
|
209
|
+
margin-left: 10px;
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
.user-fullname {
|
|
213
|
+
color: var(--o-color-info3);
|
|
214
|
+
@include tip2;
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
.user-account {
|
|
218
|
+
color: var(--o-color-info1);
|
|
219
|
+
max-width: 90px;
|
|
220
|
+
font-weight: 500;
|
|
221
|
+
@include tip1;
|
|
222
|
+
@include text-truncate(1);
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
@include respond-to('<=pad_v') {
|
|
226
|
+
.header-user {
|
|
227
|
+
min-width: auto;
|
|
228
|
+
|
|
229
|
+
.user-info {
|
|
230
|
+
min-width: 24px;
|
|
231
|
+
|
|
232
|
+
.info-wrap {
|
|
233
|
+
.user-avatar {
|
|
234
|
+
margin-right: 0;
|
|
235
|
+
width: 24px;
|
|
236
|
+
height: 24px;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
.user-account {
|
|
240
|
+
display: none;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
.icon {
|
|
244
|
+
display: none;
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
</style>
|
|
251
|
+
|
|
252
|
+
<style lang="scss">
|
|
253
|
+
.user-dropdown {
|
|
254
|
+
--dropdown-list-radius: var(--o-radius-m);
|
|
255
|
+
}
|
|
256
|
+
.user-dropdown-info {
|
|
257
|
+
--dropdown-list-padding: 11px 11px 6px !important;
|
|
258
|
+
}
|
|
259
|
+
.avatar-icon {
|
|
260
|
+
font-size: 24px;
|
|
261
|
+
color: var(--o-color-info1);
|
|
262
|
+
cursor: pointer;
|
|
263
|
+
|
|
264
|
+
@include hover {
|
|
265
|
+
color: var(--o-color-primary1);
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
@include respond-to('<=pad_v') {
|
|
269
|
+
.user-dropdown {
|
|
270
|
+
--dropdown-list-radius: 8px;
|
|
271
|
+
|
|
272
|
+
.user-info-dropdown {
|
|
273
|
+
display: none;
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.o-divider {
|
|
277
|
+
display: none;
|
|
278
|
+
}
|
|
279
|
+
|
|
280
|
+
.o-icon {
|
|
281
|
+
display: none;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.o-badge-content {
|
|
285
|
+
right: 0 !important;
|
|
286
|
+
transform: translate(0, 0) scale(0.5);
|
|
287
|
+
transform-origin: top right;
|
|
288
|
+
min-width: 18px;
|
|
289
|
+
width: fit-content;
|
|
290
|
+
height: 18px;
|
|
291
|
+
font-size: 12px;
|
|
292
|
+
line-height: 18px;
|
|
293
|
+
.o-badge-label {
|
|
294
|
+
transform: scale(1);
|
|
295
|
+
font-size: 12px;
|
|
296
|
+
line-height: 18px;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
.user-dropdown-info {
|
|
301
|
+
--dropdown-list-padding: 9px 4px !important;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
</style>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
<script lang="ts" setup>
|
|
2
|
+
import { computed, provide, reactive } from 'vue';
|
|
3
|
+
|
|
4
|
+
import { OConfigProvider } from '@opensig/opendesign';
|
|
5
|
+
import zhCN from '@opensig/opendesign/es/locale/lang/zh-cn';
|
|
6
|
+
import enUS from '@opensig/opendesign/es/locale/lang/en-us';
|
|
7
|
+
|
|
8
|
+
import { configProviderInjectKey } from '@/shared/provide';
|
|
9
|
+
|
|
10
|
+
export interface OPlusConfigProviderPropsT {
|
|
11
|
+
locale: 'zh' | 'en';
|
|
12
|
+
theme: 'light' | 'dark';
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
const props = withDefaults(defineProps<OPlusConfigProviderPropsT>(), {
|
|
16
|
+
lang: 'zh',
|
|
17
|
+
theme: 'light',
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const globalConfig = reactive({
|
|
21
|
+
locale: computed(() => props.locale),
|
|
22
|
+
theme: computed(() => props.theme),
|
|
23
|
+
});
|
|
24
|
+
|
|
25
|
+
provide(configProviderInjectKey, globalConfig);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<OConfigProvider :locale="locale === 'zh' ? zhCN : enUS">
|
|
30
|
+
<slot />
|
|
31
|
+
</OConfigProvider>
|
|
32
|
+
</template>
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { isArray, OLink, OIcon } from '@opensig/opendesign';
|
|
3
|
+
import IconChevronRight from '~icons/components/icon-chevron-right.svg';
|
|
4
|
+
|
|
5
|
+
interface SectionPropsT {
|
|
6
|
+
title?: string | Array<string>;
|
|
7
|
+
subtitle?: string;
|
|
8
|
+
full?: boolean;
|
|
9
|
+
headerJustifyCenter?: boolean;
|
|
10
|
+
footer?: string;
|
|
11
|
+
footerHref?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
const props = withDefaults(defineProps<SectionPropsT>(), {
|
|
15
|
+
title: undefined,
|
|
16
|
+
subtitle: undefined,
|
|
17
|
+
full: false,
|
|
18
|
+
headerJustifyCenter: true,
|
|
19
|
+
footer: undefined,
|
|
20
|
+
footerHref: undefined,
|
|
21
|
+
});
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<template>
|
|
25
|
+
<div class="app-section" :class="{ 'is-full': props.full }">
|
|
26
|
+
<div class="section-wrapper">
|
|
27
|
+
<slot name="main">
|
|
28
|
+
<!-- header -->
|
|
29
|
+
<div v-if="$slots.header || props.title || props.subtitle" class="section-header" :class="{ 'is-left': !props.headerJustifyCenter }">
|
|
30
|
+
<slot name="header">
|
|
31
|
+
<template v-if="isArray(props.title)">
|
|
32
|
+
<h2 v-for="item in props.title" :key="item" class="section-title">
|
|
33
|
+
{{ item }}
|
|
34
|
+
</h2>
|
|
35
|
+
</template>
|
|
36
|
+
<h2 v-else-if="$slots.title || props.title" class="section-title">
|
|
37
|
+
<slot name="title">
|
|
38
|
+
{{ props.title }}
|
|
39
|
+
</slot>
|
|
40
|
+
</h2>
|
|
41
|
+
<p v-if="$slots.subtitle || props.subtitle" class="section-subtitle">
|
|
42
|
+
<slot name="subtitle">
|
|
43
|
+
{{ props.subtitle }}
|
|
44
|
+
</slot>
|
|
45
|
+
</p>
|
|
46
|
+
</slot>
|
|
47
|
+
</div>
|
|
48
|
+
|
|
49
|
+
<!-- body -->
|
|
50
|
+
<div v-if="$slots.default" class="section-body">
|
|
51
|
+
<slot></slot>
|
|
52
|
+
</div>
|
|
53
|
+
|
|
54
|
+
<!-- footer -->
|
|
55
|
+
<div v-if="$slots.footer || props.footer" class="section-footer">
|
|
56
|
+
<slot name="footer">
|
|
57
|
+
<OLink :href="props.footerHref" target="_blank">
|
|
58
|
+
{{ props.footer }}
|
|
59
|
+
<template #suffix>
|
|
60
|
+
<OIcon class="footer-icon"><IconChevronRight /> </OIcon>
|
|
61
|
+
</template>
|
|
62
|
+
</OLink>
|
|
63
|
+
</slot>
|
|
64
|
+
</div>
|
|
65
|
+
</slot>
|
|
66
|
+
</div>
|
|
67
|
+
</div>
|
|
68
|
+
</template>
|
|
69
|
+
|
|
70
|
+
<style lang="scss" scoped>
|
|
71
|
+
.app-section {
|
|
72
|
+
--o-gap-section: var(--o-gap-7);
|
|
73
|
+
.section-wrapper {
|
|
74
|
+
margin: var(--o-gap-section) auto 0;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
&.is-full {
|
|
78
|
+
.section-body {
|
|
79
|
+
max-width: 100%;
|
|
80
|
+
width: 100%;
|
|
81
|
+
padding: 0;
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
&:last-child {
|
|
86
|
+
.section-wrapper {
|
|
87
|
+
padding-bottom: var(--o-gap-section);
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
.section-header {
|
|
92
|
+
&.is-left {
|
|
93
|
+
.section-title,
|
|
94
|
+
.section-subtitle {
|
|
95
|
+
justify-content: start;
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.section-title {
|
|
101
|
+
max-width: var(--layout-content-max-width);
|
|
102
|
+
padding: 0 var(--layout-content-padding);
|
|
103
|
+
margin: 0 auto;
|
|
104
|
+
|
|
105
|
+
display: flex;
|
|
106
|
+
justify-content: center;
|
|
107
|
+
color: var(--o-color-info1);
|
|
108
|
+
text-align: center;
|
|
109
|
+
@include display3;
|
|
110
|
+
font-weight: 500;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
.section-subtitle {
|
|
114
|
+
max-width: var(--layout-content-max-width);
|
|
115
|
+
padding: 0 var(--layout-content-padding);
|
|
116
|
+
margin: 0 auto;
|
|
117
|
+
|
|
118
|
+
display: flex;
|
|
119
|
+
justify-content: center;
|
|
120
|
+
margin-top: 12px;
|
|
121
|
+
color: var(--o-color-info2);
|
|
122
|
+
@include text1;
|
|
123
|
+
|
|
124
|
+
@include respond-to('pad-laptop') {
|
|
125
|
+
margin-top: 8px;
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
@include respond-to('phone') {
|
|
129
|
+
margin-top: 12px;
|
|
130
|
+
text-align: center;
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
.section-body {
|
|
135
|
+
max-width: var(--layout-content-max-width);
|
|
136
|
+
padding: 0 var(--layout-content-padding);
|
|
137
|
+
margin: 0 auto;
|
|
138
|
+
|
|
139
|
+
margin-top: var(--o-gap-7);
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
.section-footer {
|
|
143
|
+
max-width: var(--layout-content-max-width);
|
|
144
|
+
padding: 0 var(--layout-content-padding);
|
|
145
|
+
margin: 0 auto;
|
|
146
|
+
color: var(--o-color-info1);
|
|
147
|
+
|
|
148
|
+
display: flex;
|
|
149
|
+
justify-content: center;
|
|
150
|
+
@include text1;
|
|
151
|
+
|
|
152
|
+
margin-top: 32px;
|
|
153
|
+
|
|
154
|
+
:deep(.o-btn) {
|
|
155
|
+
border-radius: var(--btn-height);
|
|
156
|
+
}
|
|
157
|
+
|
|
158
|
+
@include respond-to('<=laptop') {
|
|
159
|
+
margin-top: 16px;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
@include respond-to('phone') {
|
|
163
|
+
margin-top: 12px;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
&:hover {
|
|
167
|
+
.footer-icon {
|
|
168
|
+
fill: var(--link-color-active);
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.footer-icon {
|
|
174
|
+
font-size: 16px;
|
|
175
|
+
height: 24px;
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
</style>
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import { ref } from 'vue';
|
|
3
|
+
import { OIcon, ODropdown, ODropdownItem } from '@opensig/opendesign';
|
|
4
|
+
|
|
5
|
+
import IconChevronDown from '~icons/components/icon-chevron-down.svg';
|
|
6
|
+
|
|
7
|
+
interface CodeItemT {
|
|
8
|
+
label: string;
|
|
9
|
+
url: string;
|
|
10
|
+
icon?: string;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
interface CodePropsT {
|
|
14
|
+
title?: string;
|
|
15
|
+
options?: CodeItemT[];
|
|
16
|
+
url?: string;
|
|
17
|
+
icon?: string;
|
|
18
|
+
justify?: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
withDefaults(defineProps<CodePropsT>(), {
|
|
22
|
+
title: undefined,
|
|
23
|
+
options: undefined,
|
|
24
|
+
url: undefined,
|
|
25
|
+
icon: undefined,
|
|
26
|
+
justify: 'center',
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
const itemChange = (data: any) => {
|
|
30
|
+
window.open(data.url, '_blank');
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const dropdownVisible = ref(false);
|
|
34
|
+
const visibleChange = (val: boolean) => {
|
|
35
|
+
dropdownVisible.value = val;
|
|
36
|
+
};
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<template>
|
|
40
|
+
<div class="source-code">
|
|
41
|
+
<div v-if="url" class="info-wrap">
|
|
42
|
+
<span class="title">{{ title }}</span>
|
|
43
|
+
<OIcon v-if="icon">
|
|
44
|
+
<component :is="icon" class="icon" />
|
|
45
|
+
</OIcon>
|
|
46
|
+
</div>
|
|
47
|
+
<ODropdown
|
|
48
|
+
v-else
|
|
49
|
+
trigger="hover"
|
|
50
|
+
optionPosition="bottom"
|
|
51
|
+
option-wrap-class="dropdown"
|
|
52
|
+
:class="{ 'dropdown-active': dropdownVisible }"
|
|
53
|
+
@visible-change="visibleChange"
|
|
54
|
+
>
|
|
55
|
+
<div class="info-wrap hover-icon-rotate">
|
|
56
|
+
<span class="title">{{ title }}</span>
|
|
57
|
+
<OIcon class="icon"><IconChevronDown /></OIcon>
|
|
58
|
+
</div>
|
|
59
|
+
<template #dropdown>
|
|
60
|
+
<ODropdownItem v-for="item in options" @click="itemChange(item)" :key="item.url" class="list" :style="{ '--dropdown-item-justify': justify }">
|
|
61
|
+
{{ item.label }}
|
|
62
|
+
<OIcon v-if="item.icon">
|
|
63
|
+
<component :is="item.icon" class="icon" />
|
|
64
|
+
</OIcon>
|
|
65
|
+
</ODropdownItem>
|
|
66
|
+
</template>
|
|
67
|
+
</ODropdown>
|
|
68
|
+
</div>
|
|
69
|
+
</template>
|
|
70
|
+
|
|
71
|
+
<style lang="scss" scoped>
|
|
72
|
+
.source-code {
|
|
73
|
+
height: calc(100% + 10px);
|
|
74
|
+
display: flex;
|
|
75
|
+
align-items: center;
|
|
76
|
+
.info-wrap {
|
|
77
|
+
height: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
align-items: center;
|
|
80
|
+
color: var(--o-color-info1);
|
|
81
|
+
cursor: pointer;
|
|
82
|
+
|
|
83
|
+
@include hover {
|
|
84
|
+
color: var(--o-color-primary1);
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
.title {
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
cursor: pointer;
|
|
91
|
+
height: 100%;
|
|
92
|
+
@include tip1;
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
.list {
|
|
96
|
+
background: var(--o-color-fill2);
|
|
97
|
+
cursor: pointer;
|
|
98
|
+
box-shadow: var(--o-shadow-1);
|
|
99
|
+
border-radius: var(--o-radius_control-xs);
|
|
100
|
+
padding: var(--o-gap-1);
|
|
101
|
+
width: 144px;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.hover-icon-rotate {
|
|
106
|
+
.o-icon {
|
|
107
|
+
transition: all var(--o-duration-m1) var(--o-easing-standard-in);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
@include hover {
|
|
111
|
+
.o-icon {
|
|
112
|
+
transform: rotate(-180deg);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
}
|
|
116
|
+
.icon {
|
|
117
|
+
font-size: var(--o-icon_size_control-xs);
|
|
118
|
+
margin-left: var(--o-gap-1);
|
|
119
|
+
}
|
|
120
|
+
.o-dropdown {
|
|
121
|
+
height: 100%;
|
|
122
|
+
}
|
|
123
|
+
.dropdown-active {
|
|
124
|
+
.info-wrap {
|
|
125
|
+
color: var(--o-color-primary1);
|
|
126
|
+
}
|
|
127
|
+
.o-icon {
|
|
128
|
+
transform: rotate(-180deg);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
.o-dropdown-item {
|
|
132
|
+
background: var(--o-color-fill2);
|
|
133
|
+
cursor: pointer;
|
|
134
|
+
border-radius: var(--o-radius_control-xs);
|
|
135
|
+
padding: var(--o-gap-1) 12px;
|
|
136
|
+
min-width: 144px;
|
|
137
|
+
height: 32px;
|
|
138
|
+
@include tip1;
|
|
139
|
+
|
|
140
|
+
@include hover {
|
|
141
|
+
background: var(--o-color-control2-light);
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
&:active {
|
|
145
|
+
color: var(--o-color-primary1);
|
|
146
|
+
background: var(--o-color-control3-light);
|
|
147
|
+
font-weight: 600;
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
.dropdown {
|
|
151
|
+
--dropdown-list-radius: var(--o-radius-xs);
|
|
152
|
+
}
|
|
153
|
+
</style>
|