@opendesign-plus/components 0.0.1-rc.2 → 0.0.1-rc.21

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.
Files changed (205) hide show
  1. package/dist/chunk-OElCookieNotice.cjs.js +1 -0
  2. package/dist/chunk-OElCookieNotice.es.js +839 -0
  3. package/dist/components/OBanner.vue.d.ts +10 -1
  4. package/dist/components/OCookieNotice.vue.d.ts +6 -5
  5. package/dist/components/OFooter.vue.d.ts +46 -0
  6. package/dist/components/OHeaderSearch.vue.d.ts +10 -14
  7. package/dist/components/OHeaderUser.vue.d.ts +40 -0
  8. package/dist/components/OSourceCode.vue.d.ts +18 -0
  9. package/dist/components/activity/OActivityApproval.vue.d.ts +273 -0
  10. package/dist/components/activity/OActivityForm.vue.d.ts +138 -0
  11. package/dist/components/activity/OMyActivityCalendar.vue.d.ts +570 -0
  12. package/dist/components/activity/composables/useActivityConfig.d.ts +17 -0
  13. package/dist/components/activity/config.d.ts +1 -0
  14. package/dist/components/activity/index.d.ts +615 -0
  15. package/dist/components/activity/types.d.ts +88 -0
  16. package/dist/components/element-plus/OElCookieNotice.vue.d.ts +34 -0
  17. package/dist/components/element-plus/index.d.ts +2 -0
  18. package/dist/components/events/OEventsApply.vue.d.ts +16 -0
  19. package/dist/components/events/OEventsCalendar.vue.d.ts +5 -0
  20. package/dist/components/events/OEventsList.vue.d.ts +26 -0
  21. package/dist/components/events/config.d.ts +14 -0
  22. package/dist/components/events/index.d.ts +78 -0
  23. package/dist/components/events/types.d.ts +69 -0
  24. package/dist/components/events/utils.d.ts +7 -0
  25. package/dist/components/header/OHeader.vue.d.ts +30 -0
  26. package/dist/components/header/OHeaderMobile.vue.d.ts +178 -0
  27. package/dist/components/header/components/HeaderContent.vue.d.ts +13 -0
  28. package/dist/components/header/components/HeaderNav.vue.d.ts +19 -0
  29. package/dist/components/header/components/HeaderNavMobile.vue.d.ts +36 -0
  30. package/dist/components/header/index.d.ts +152 -0
  31. package/dist/components/header/types.d.ts +84 -0
  32. package/dist/components/meeting/OMeetingCalendar.vue.d.ts +295 -0
  33. package/dist/components/meeting/OMeetingForm.vue.d.ts +143 -0
  34. package/dist/components/meeting/OMeetingPlayback.vue.d.ts +45 -0
  35. package/dist/components/meeting/OMyMeetingCalendar.vue.d.ts +578 -0
  36. package/dist/components/meeting/OSigMeetingCalendar.vue.d.ts +24 -0
  37. package/dist/components/meeting/components/OMeetingCalendarList.vue.d.ts +28 -0
  38. package/dist/components/meeting/components/OMeetingCalendarSelector.vue.d.ts +664 -0
  39. package/dist/components/meeting/components/OMeetingDetail.vue.d.ts +13 -0
  40. package/dist/components/meeting/components/OMeetingPlaybackSubtitles.vue.d.ts +5 -0
  41. package/dist/components/meeting/components/OMeetingPlaybackVideo.vue.d.ts +17 -0
  42. package/dist/components/meeting/components/OSigMeetingAside.vue.d.ts +16 -0
  43. package/dist/components/meeting/composables/useMeetingConfig.d.ts +14 -0
  44. package/dist/components/meeting/config.d.ts +12 -0
  45. package/dist/components/meeting/index.d.ts +786 -0
  46. package/dist/components/meeting/types.d.ts +233 -0
  47. package/dist/components/meeting/utils.d.ts +8 -0
  48. package/dist/components.cjs.js +224 -1
  49. package/dist/components.css +1 -1
  50. package/dist/components.element.cjs.js +1 -0
  51. package/dist/components.element.es.js +4 -0
  52. package/dist/components.es.js +44417 -784
  53. package/dist/index.d.ts +9 -2
  54. package/docs/design.md +27 -27
  55. package/docs/design_banner.md +41 -41
  56. package/docs/design_section.md +27 -27
  57. package/package.json +13 -4
  58. package/scripts/generate-components-index.js +103 -80
  59. package/src/assets/events/svg-icons/icon-checked.svg +3 -0
  60. package/src/assets/events/svg-icons/icon-competition.svg +7 -0
  61. package/src/assets/events/svg-icons/icon-events.svg +4 -0
  62. package/src/assets/events/svg-icons/icon-release.svg +4 -0
  63. package/src/assets/events/svg-icons/icon-summit.svg +4 -0
  64. package/src/assets/meeting/svg-icons/icon-all.svg +3 -0
  65. package/src/assets/meeting/svg-icons/icon-backward.svg +4 -0
  66. package/src/assets/meeting/svg-icons/icon-calendar.svg +3 -0
  67. package/src/assets/meeting/svg-icons/icon-cancel.svg +4 -0
  68. package/src/assets/meeting/svg-icons/icon-captions.svg +4 -0
  69. package/src/assets/meeting/svg-icons/icon-close-captions.svg +6 -0
  70. package/src/assets/meeting/svg-icons/icon-close-fullscreen.svg +6 -0
  71. package/src/assets/meeting/svg-icons/icon-copy.svg +3 -0
  72. package/src/assets/meeting/svg-icons/icon-create.svg +5 -0
  73. package/src/assets/meeting/svg-icons/icon-delete.svg +7 -0
  74. package/src/assets/meeting/svg-icons/icon-empty.svg +31 -0
  75. package/src/assets/meeting/svg-icons/icon-empty_dark.svg +49 -0
  76. package/src/assets/meeting/svg-icons/icon-event.svg +3 -0
  77. package/src/assets/meeting/svg-icons/icon-export.svg +3 -0
  78. package/src/assets/meeting/svg-icons/icon-forward.svg +4 -0
  79. package/src/assets/meeting/svg-icons/icon-fullscreen.svg +6 -0
  80. package/src/assets/meeting/svg-icons/icon-help.svg +3 -0
  81. package/src/assets/meeting/svg-icons/icon-important.svg +4 -0
  82. package/src/assets/meeting/svg-icons/icon-info.svg +3 -0
  83. package/src/assets/meeting/svg-icons/icon-meet.svg +3 -0
  84. package/src/assets/meeting/svg-icons/icon-meeting-message.svg +5 -0
  85. package/src/assets/meeting/svg-icons/icon-meeting.svg +4 -0
  86. package/src/assets/meeting/svg-icons/icon-play.svg +5 -0
  87. package/src/assets/meeting/svg-icons/icon-playing-tip.svg +7 -0
  88. package/src/assets/meeting/svg-icons/icon-playing.svg +5 -0
  89. package/src/assets/meeting/svg-icons/icon-question.svg +4 -0
  90. package/src/assets/meeting/svg-icons/icon-sound.svg +5 -0
  91. package/src/assets/meeting/svg-icons/icon-speaker.svg +3 -0
  92. package/src/assets/meeting/svg-icons/icon-summit.svg +3 -0
  93. package/src/assets/meeting/svg-icons/icon-telligent.svg +3 -0
  94. package/src/assets/meeting/svg-icons/icon-tip.svg +3 -0
  95. package/src/assets/meeting/svg-icons/icon-todo.svg +4 -0
  96. package/src/assets/meeting/transparent.png +0 -0
  97. package/src/assets/svg-icons/icon-arrow-left.svg +3 -0
  98. package/src/assets/svg-icons/icon-avatar-line.svg +3 -0
  99. package/src/assets/svg-icons/icon-caret-left.svg +3 -0
  100. package/src/assets/svg-icons/icon-caret-right.svg +3 -0
  101. package/src/assets/svg-icons/icon-chevron-down.svg +3 -0
  102. package/src/assets/svg-icons/icon-chevron-right.svg +3 -3
  103. package/src/assets/svg-icons/icon-chevron-up.svg +3 -0
  104. package/src/assets/svg-icons/icon-close.svg +3 -3
  105. package/src/assets/svg-icons/icon-delete.svg +3 -3
  106. package/src/assets/svg-icons/icon-filter.svg +3 -0
  107. package/src/assets/svg-icons/icon-header-back.svg +3 -3
  108. package/src/assets/svg-icons/icon-header-delete.svg +3 -3
  109. package/src/assets/svg-icons/icon-header-menu.svg +3 -0
  110. package/src/assets/svg-icons/icon-header-person.svg +3 -0
  111. package/src/assets/svg-icons/icon-header-search.svg +4 -4
  112. package/src/assets/svg-icons/icon-loading.svg +4 -0
  113. package/src/assets/svg-icons/icon-locale.svg +3 -0
  114. package/src/assets/svg-icons/icon-log-off.svg +3 -0
  115. package/src/assets/svg-icons/icon-message.svg +3 -0
  116. package/src/assets/svg-icons/icon-moon.svg +3 -3
  117. package/src/assets/svg-icons/icon-outlink.svg +3 -0
  118. package/src/assets/svg-icons/icon-overview.svg +3 -0
  119. package/src/assets/svg-icons/icon-search.svg +3 -0
  120. package/src/assets/svg-icons/icon-setting.svg +3 -0
  121. package/src/assets/svg-icons/icon-sun.svg +3 -3
  122. package/src/assets/svg-icons/icon-tips.svg +3 -0
  123. package/src/components/OBanner.vue +398 -390
  124. package/src/components/OCookieNotice.vue +575 -424
  125. package/src/components/OFooter.vue +576 -0
  126. package/src/components/OHeaderSearch.vue +601 -601
  127. package/src/components/OHeaderUser.vue +237 -0
  128. package/src/components/OPlusConfigProvider.vue +32 -32
  129. package/src/components/OSection.vue +178 -178
  130. package/src/components/OSourceCode.vue +151 -0
  131. package/src/components/OThemeSwitcher.vue +108 -108
  132. package/src/components/activity/OActivityApproval.vue +864 -0
  133. package/src/components/activity/OActivityForm.vue +542 -0
  134. package/src/components/activity/OMyActivityCalendar.vue +1502 -0
  135. package/src/components/activity/composables/useActivityConfig.ts +141 -0
  136. package/src/components/activity/config.ts +1 -0
  137. package/src/components/activity/index.ts +24 -0
  138. package/src/components/activity/types.ts +95 -0
  139. package/src/components/common/AppAvatar.vue +83 -0
  140. package/src/components/common/ClientOnlyWrapper.ts +21 -21
  141. package/src/components/common/ContentWrapper.vue +85 -85
  142. package/src/components/common/MoreText.vue +124 -0
  143. package/src/components/common/ThFilter.vue +330 -0
  144. package/src/components/element-plus/OElCookieNotice.vue +603 -0
  145. package/src/components/element-plus/index.ts +3 -0
  146. package/src/components/events/OEventsApply.vue +418 -0
  147. package/src/components/events/OEventsCalendar.vue +598 -0
  148. package/src/components/events/OEventsList.vue +389 -0
  149. package/src/components/events/config.ts +35 -0
  150. package/src/components/events/index.ts +24 -0
  151. package/src/components/events/types.ts +83 -0
  152. package/src/components/events/utils.ts +9 -0
  153. package/src/components/header/OHeader.vue +157 -0
  154. package/src/components/header/OHeaderMobile.vue +184 -0
  155. package/src/components/header/components/HeaderContent.vue +1125 -0
  156. package/src/components/header/components/HeaderNav.vue +278 -0
  157. package/src/components/header/components/HeaderNavMobile.vue +380 -0
  158. package/src/components/header/index.ts +16 -0
  159. package/src/components/header/types.ts +95 -0
  160. package/src/components/meeting/OMeetingCalendar.vue +890 -0
  161. package/src/components/meeting/OMeetingForm.vue +1072 -0
  162. package/src/components/meeting/OMeetingPlayback.vue +439 -0
  163. package/src/components/meeting/OMyMeetingCalendar.vue +1508 -0
  164. package/src/components/meeting/OSigMeetingCalendar.vue +413 -0
  165. package/src/components/meeting/components/OMeetingCalendarList.vue +515 -0
  166. package/src/components/meeting/components/OMeetingCalendarSelector.vue +210 -0
  167. package/src/components/meeting/components/OMeetingDetail.vue +244 -0
  168. package/src/components/meeting/components/OMeetingPlaybackSubtitles.vue +611 -0
  169. package/src/components/meeting/components/OMeetingPlaybackVideo.vue +741 -0
  170. package/src/components/meeting/components/OSigMeetingAside.vue +199 -0
  171. package/src/components/meeting/composables/useMeetingConfig.ts +108 -0
  172. package/src/components/meeting/config.ts +48 -0
  173. package/src/components/meeting/index.ts +45 -0
  174. package/src/components/meeting/types.ts +266 -0
  175. package/src/components/meeting/utils.ts +70 -0
  176. package/src/draft/Banner.vue +265 -265
  177. package/src/draft/ButtonCards.vue +105 -105
  178. package/src/draft/Feature.vue +133 -133
  179. package/src/draft/Footer.vue +512 -512
  180. package/src/draft/HorizontalAnchor.vue +165 -165
  181. package/src/draft/ItemSwiper.vue +133 -133
  182. package/src/draft/Logo.vue +141 -141
  183. package/src/draft/LogoCard.vue +74 -74
  184. package/src/draft/LogoV2.vue +19 -19
  185. package/src/draft/MainCard.vue +38 -38
  186. package/src/draft/MultiCard.vue +94 -94
  187. package/src/draft/MultiIconCard.vue +73 -73
  188. package/src/draft/OInfoCard.vue +176 -176
  189. package/src/draft/Process.vue +81 -81
  190. package/src/draft/Section.vue +167 -167
  191. package/src/draft/SingleTabCard.vue +84 -84
  192. package/src/draft/SliderCard.vue +110 -110
  193. package/src/env.d.ts +16 -1
  194. package/src/i18n/en.ts +264 -20
  195. package/src/i18n/index.ts +56 -42
  196. package/src/i18n/zh.ts +253 -9
  197. package/src/index.ts +14 -3
  198. package/src/shared/provide.ts +6 -6
  199. package/src/shims-vue-dompurify-html.d.ts +17 -0
  200. package/src/vue.d.ts +9 -9
  201. package/tsconfig.json +37 -33
  202. package/vite.config.ts +119 -94
  203. package/dist/components/OCookieNoticeEl.vue.d.ts +0 -29
  204. package/dist/components.umd.js +0 -1
  205. package/src/components/OCookieNoticeEl.vue +0 -404
@@ -1,424 +1,575 @@
1
- <script lang="ts" setup>
2
- import { ref, onMounted, computed, nextTick, watch } from 'vue';
3
- import ClientOnly from './common/ClientOnlyWrapper';
4
- import { useScreen } from '@opendesign-plus/composables';
5
- import { useI18n } from '@/i18n';
6
- import { DialogActionT, OButton, ODialog, OIcon, OIconClose, OSwitch } from '@opensig/opendesign';
7
- import { useVModel } from '@vueuse/core';
8
-
9
- const NOT_SIGNED = '0';
10
- const ALL_AGREED = '1';
11
- const NECCESSARY_AGREED = '2';
12
- const NOT_SHOW_BUT_AGREED = '3';
13
- const COOKIE_DOMAIN = import.meta.env.VITE_COOKIE_DOMAIN as string;
14
- const COOKIE_KEY_ZH = 'agreed-cookiepolicy-zh';
15
- const COOKIE_KEY_EN = 'agreed-cookiepolicy-en';
16
-
17
- const props = defineProps<{
18
- visible?: boolean;
19
- enableGrid?: boolean;
20
- community: string;
21
- aboutPathZh: string;
22
- aboutPathEn: string;
23
- teleportTarget?: string | HTMLElement;
24
- }>();
25
-
26
- const emit = defineEmits<{
27
- (e: 'update:visible', value: boolean): void;
28
- }>();
29
-
30
- const { lePadV, leLaptop } = useScreen();
31
- const { locale, t } = useI18n();
32
- const isZh = computed(() => locale.value === 'zh');
33
-
34
- const cookieKey = computed(() => (isZh.value ? COOKIE_KEY_ZH : COOKIE_KEY_EN));
35
-
36
- // 是否允许分析cookie
37
- const analysisAllowed = ref(false);
38
- const visibleVmodel = useVModel(props, 'visible', emit, { defaultValue: false });
39
-
40
- const getCookie = (key: string) => {
41
- const cookie = document.cookie.split(';').find((row) => row.split('=')[0].trim() === encodeURIComponent(key));
42
- if (!cookie) {
43
- return null;
44
- }
45
- return decodeURIComponent(cookie.split('=')[1]);
46
- };
47
-
48
- const setCookie = (key: string, value: string, days: number, domain: string) => {
49
- const maxAge = days ? `; max-age=${days * 24 * 60 * 60}` : '';
50
- document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}${maxAge}; path=/; domain=${domain}`;
51
- };
52
-
53
- const removeCookie = (key: string, domain: string) => {
54
- document.cookie = `${encodeURIComponent(key)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${domain}`;
55
- };
56
-
57
- // 显示/隐藏cookie提示
58
- const toggleNoticeVisible = (val?: boolean) => {
59
- if (typeof val === 'boolean') {
60
- visibleVmodel.value = val;
61
- } else {
62
- visibleVmodel.value = !visibleVmodel.value;
63
- }
64
- nextTick(() => {
65
- if (!visibleVmodel.value && isZh.value && getCookie(cookieKey.value) !== NOT_SHOW_BUT_AGREED) {
66
- setCookie(cookieKey.value, NOT_SHOW_BUT_AGREED, 180, COOKIE_DOMAIN ?? location.hostname);
67
- }
68
- });
69
- };
70
-
71
- // 弹出框是否显示
72
- const isDlgVisible = ref(false);
73
-
74
- // 显示/隐藏弹出框
75
- const toggleDlgVisible = (val?: boolean) => {
76
- if (typeof val === 'boolean') {
77
- isDlgVisible.value = val;
78
- } else {
79
- isDlgVisible.value = !isDlgVisible.value;
80
- }
81
- };
82
-
83
- // 是否未签署
84
- const isNotSigned = () => {
85
- if (isZh.value) {
86
- return getCookie(cookieKey.value) !== NOT_SHOW_BUT_AGREED;
87
- }
88
- return (getCookie(cookieKey.value) ?? '0') === NOT_SIGNED;
89
- };
90
-
91
- // 是否全部同意
92
- const isAllAgreed = () => {
93
- if (isZh.value) {
94
- return getCookie(cookieKey.value) === NOT_SHOW_BUT_AGREED;
95
- }
96
- return getCookie(cookieKey.value) === ALL_AGREED;
97
- };
98
-
99
- onMounted(() => {
100
- // 未签署,展示cookie notice
101
- if (isNotSigned()) {
102
- toggleNoticeVisible(true);
103
- }
104
- });
105
-
106
- watch(locale, () => {
107
- toggleNoticeVisible(isNotSigned());
108
- });
109
-
110
- // 用户同意所有cookie
111
- const acceptAll = () => {
112
- analysisAllowed.value = true;
113
- removeCookie(cookieKey.value, COOKIE_DOMAIN ?? location.hostname);
114
- setCookie(cookieKey.value, ALL_AGREED, 180, COOKIE_DOMAIN ?? location.hostname);
115
- toggleNoticeVisible(false);
116
- };
117
-
118
- // 用户拒绝所有cookie,即仅同意必要cookie
119
- const rejectAll = () => {
120
- analysisAllowed.value = false;
121
- removeCookie(cookieKey.value, COOKIE_DOMAIN ?? location.hostname);
122
- setCookie(cookieKey.value, NECCESSARY_AGREED, 180, COOKIE_DOMAIN ?? location.hostname);
123
- toggleNoticeVisible(false);
124
- };
125
-
126
- // 弹出框设置
127
- const dlgActions = computed<Array<DialogActionT>>(() => [
128
- {
129
- id: 'save',
130
- color: 'primary',
131
- label: t('cookie.saveSetting'),
132
- variant: 'outline',
133
- size: 'large',
134
- round: 'pill',
135
- onClick: () => {
136
- if (analysisAllowed.value) {
137
- acceptAll();
138
- } else {
139
- rejectAll();
140
- }
141
-
142
- toggleDlgVisible(false);
143
- },
144
- },
145
- {
146
- id: 'allowAll',
147
- color: 'primary',
148
- label: t('cookie.acceptAll'),
149
- variant: 'outline',
150
- size: 'large',
151
- round: 'pill',
152
- onClick: () => {
153
- analysisAllowed.value = true;
154
- acceptAll();
155
- toggleDlgVisible(false);
156
- },
157
- },
158
- ]);
159
-
160
- const onDlgChange = (val: boolean) => {
161
- if (val) {
162
- analysisAllowed.value = isAllAgreed();
163
- }
164
- };
165
-
166
- defineExpose({
167
- check() {
168
- const agreed = isAllAgreed();
169
- if (agreed === visibleVmodel.value) {
170
- toggleNoticeVisible();
171
- }
172
- },
173
- });
174
- </script>
175
-
176
- <template>
177
- <ClientOnly>
178
- <Teleport :to="teleportTarget || '#app'">
179
- <div v-if="visibleVmodel" class="cookie-notice">
180
- <div class="cookie-notice-content">
181
- <div :type="locale" :class="{ 'cookie-notice-wrap-grid': enableGrid, 'cookie-notice-wrap': !enableGrid }">
182
- <div class="cookie-notice-left">
183
- <p v-if="isZh" class="cookie-desc" style="margin-top: 0">
184
- {{ t('cookie.desc') }}
185
- <a :href="aboutPathZh" target="_blank" rel="noopener noreferrer">
186
- {{ t('cookie.about') }}
187
- </a>
188
- </p>
189
- <template v-else>
190
- <p class="cookie-title">{{ t('cookie.title', [community]) }}</p>
191
- <p class="cookie-desc">
192
- {{ t('cookie.desc') }}
193
- <a :href="aboutPathEn" target="_blank" rel="noopener noreferrer">{{ t('cookie.about') }} </a>.
194
- </p>
195
- </template>
196
- </div>
197
- <div v-if="!isZh" class="cookie-notice-right">
198
- <OButton round="pill" variant="outline" color="primary" @click="acceptAll">{{ t('cookie.acceptAll') }}</OButton>
199
- <OButton round="pill" variant="outline" color="primary" @click="rejectAll">{{ t('cookie.rejectAll') }}</OButton>
200
- <OButton round="pill" variant="outline" color="primary" @click="toggleDlgVisible(true)">
201
- {{ t('cookie.manage') }}
202
- </OButton>
203
- </div>
204
- <OIcon class="cookie-notice-close" :type="locale" @click="toggleNoticeVisible(false)">
205
- <OIconClose />
206
- </OIcon>
207
- </div>
208
- </div>
209
- <ODialog
210
- v-model:visible="isDlgVisible"
211
- :size="leLaptop ? 'medium' : 'large'"
212
- :phone-half-full="lePadV"
213
- class="cookie-dlg"
214
- :actions="dlgActions"
215
- @change="onDlgChange"
216
- >
217
- <template #header>
218
- <span class="cookie-dlg-title">{{ t('cookie.manage') }}</span>
219
- </template>
220
- <div class="cookie-dlg-content">
221
- <div class="content-item">
222
- <div class="item-header">
223
- <span class="item-title">{{ t('cookie.necessaryCookie') }}</span>
224
- <span class="item-extra">{{ t('cookie.alwaysOn') }}</span>
225
- </div>
226
- <div class="item-detail">
227
- {{ t('cookie.necessaryCookieDetail') }}
228
- </div>
229
- </div>
230
- <div class="content-item">
231
- <div class="item-header">
232
- <span class="item-title">{{ t('cookie.analyticalCookie') }}</span>
233
- <span class="item-extra">
234
- <OSwitch v-model="analysisAllowed" />
235
- </span>
236
- </div>
237
- <div class="item-detail">
238
- {{ t('cookie.analyticalCookieDetail') }}
239
- </div>
240
- </div>
241
- </div>
242
- </ODialog>
243
- </div>
244
- </Teleport>
245
- </ClientOnly>
246
- </template>
247
-
248
- <style lang="scss" scoped>
249
- .cookie-notice {
250
- position: fixed;
251
- bottom: 0;
252
- z-index: 999;
253
- width: 100%;
254
- .o-button {
255
- --o-button-font-size-mini: 14px;
256
- }
257
- .o-button + .o-button {
258
- margin-left: 16px;
259
-
260
- @media (max-width: 840px) {
261
- margin-left: 0;
262
- margin-top: 12px;
263
- }
264
- }
265
- }
266
-
267
- .cookie-notice-content {
268
- background-color: rgba(var(--o-mixedgray-1), 0.9);
269
- backdrop-filter: blur(5px);
270
- box-shadow: var(--o-shadow-1);
271
- }
272
-
273
- .cookie-notice-wrap {
274
- position: relative;
275
- display: flex;
276
- justify-content: space-between;
277
- margin: 0 auto;
278
- padding: 24px var(--layout-content-padding);
279
- max-width: var(--layout-content-max-width);
280
- &:not([type='zh']) {
281
- @media (max-width: 840px) {
282
- flex-direction: column;
283
- align-items: center;
284
- }
285
- }
286
- }
287
-
288
- .cookie-notice-wrap-grid {
289
- position: relative;
290
- display: flex;
291
- justify-content: space-between;
292
- width: var(--grid-content-width);
293
- padding: 24px 0;
294
- margin: 0 auto;
295
- &:not([type='zh']) {
296
- @media (max-width: 840px) {
297
- padding: 16px 0;
298
- flex-direction: column;
299
- align-items: center;
300
- }
301
- }
302
- }
303
-
304
- .cookie-notice-left {
305
- width: 60%;
306
-
307
- @media (max-width: 1100px) {
308
- width: 58%;
309
- }
310
-
311
- @media (max-width: 840px) {
312
- width: 100%;
313
- }
314
-
315
- .cookie-title {
316
- font-size: 16px;
317
- line-height: 28px;
318
- color: var(--o-color-info1);
319
- font-weight: 500;
320
- @media (max-width: 840px) {
321
- font-size: 16px;
322
- line-height: 24px;
323
- text-align: center;
324
- }
325
- }
326
-
327
- .cookie-desc {
328
- font-size: 12px;
329
- line-height: 18px;
330
- color: var(--o-color-info2);
331
- margin-top: 8px;
332
- }
333
- }
334
-
335
- .cookie-notice-right {
336
- display: flex;
337
- align-items: center;
338
- margin-top: 12px;
339
-
340
- @media (max-width: 840px) {
341
- width: 100%;
342
- }
343
-
344
- @media (max-width: 840px) {
345
- flex-direction: column;
346
- align-items: center;
347
- }
348
-
349
- .o-btn:not(:first-child) {
350
- margin-left: 16px;
351
- }
352
-
353
- @media (max-width: 840px) {
354
- .o-btn {
355
- align-self: stretch;
356
- &:not(:first-child) {
357
- margin-top: 12px;
358
- margin-left: 0;
359
- }
360
- }
361
- }
362
- }
363
-
364
- .cookie-notice-close {
365
- &[type='en'] {
366
- position: absolute;
367
- top: 16px;
368
- right: var(--layout-content-padding);
369
- transform-origin: center;
370
- }
371
- cursor: pointer;
372
- color: var(--o-color-info1);
373
- font-size: 20px;
374
- &:hover {
375
- color: var(--o-color-primary2);
376
- }
377
- @media (max-width: 840px) {
378
- font-size: 14px;
379
- }
380
- @include x-svg-hover;
381
- }
382
-
383
- .cookie-notice-wrap-grid .cookie-notice-close {
384
- right: 0;
385
- }
386
-
387
- .cookie-dlg-content {
388
- .content-item + .content-item {
389
- margin-top: 24px;
390
- }
391
-
392
- .content-item {
393
- .item-header {
394
- display: flex;
395
- align-items: center;
396
- .item-title {
397
- font-size: 18px;
398
- line-height: 32px;
399
- color: var(--o-color-info1);
400
- font-weight: 500;
401
- }
402
-
403
- .item-extra {
404
- font-size: 14px;
405
- line-height: 22px;
406
- color: var(--o-color-info3);
407
- margin-left: 24px;
408
- }
409
- }
410
-
411
- .item-detail {
412
- font-size: 16px;
413
- line-height: 28px;
414
- color: var(--o-color-info2);
415
- margin-top: 12px;
416
- @media (max-width: 840px) {
417
- font-size: 14px;
418
- line-height: 21px;
419
- margin-top: 8px;
420
- }
421
- }
422
- }
423
- }
424
- </style>
1
+ <script lang="ts" setup>
2
+ import { ref, onMounted, computed, nextTick, watch } from 'vue';
3
+ import ClientOnly from './common/ClientOnlyWrapper';
4
+ import { useScreen } from '@opendesign-plus/composables';
5
+ import { useI18n } from '@/i18n';
6
+ import { DialogActionT, OButton, ODialog, OIcon, OIconClose, OSwitch } from '@opensig/opendesign';
7
+ import { useVModel } from '@vueuse/core';
8
+
9
+ const NOT_SIGNED = '0';
10
+ const ALL_AGREED = '1';
11
+ const NECCESSARY_AGREED = '2';
12
+ const NOT_SHOW_BUT_AGREED = '3';
13
+ const COOKIE_KEY_ZH = 'agreed-cookiepolicy-zh';
14
+ const COOKIE_KEY_EN = 'agreed-cookiepolicy-en';
15
+
16
+ const props = defineProps<{
17
+ visible?: boolean;
18
+ community: string;
19
+ detailUrl: string;
20
+ wrapper?: string | HTMLElement;
21
+ cookieDomain: string;
22
+ }>();
23
+
24
+ const emit = defineEmits<{
25
+ (e: 'update:visible', value: boolean): void;
26
+ }>();
27
+
28
+ const { lePadV, leLaptop, isPhone } = useScreen();
29
+ const { locale, t } = useI18n();
30
+ const isZh = computed(() => locale.value === 'zh');
31
+
32
+ const cookieNoticeRef = ref<HTMLDivElement>();
33
+ const enableGrid = computed(() => {
34
+ if (cookieNoticeRef.value) {
35
+ return !!getComputedStyle(cookieNoticeRef.value!).getPropertyValue('--grid-content-width');
36
+ }
37
+ return false;
38
+ });
39
+
40
+ const cookieKey = computed(() => (isZh.value ? COOKIE_KEY_ZH : COOKIE_KEY_EN));
41
+
42
+ // 是否允许分析cookie
43
+ const analysisAllowed = ref(false);
44
+ const visibleVmodel = useVModel(props, 'visible', emit, { defaultValue: false });
45
+
46
+ const getCookie = (key: string) => {
47
+ const cookie = document.cookie.split(';').find((row) => row.split('=')[0].trim() === encodeURIComponent(key));
48
+ if (!cookie) {
49
+ return null;
50
+ }
51
+ return decodeURIComponent(cookie.split('=')[1]);
52
+ };
53
+
54
+ const setCookie = (key: string, value: string, days: number, domain: string) => {
55
+ const maxAge = days ? `; max-age=${days * 24 * 60 * 60}` : '';
56
+ document.cookie = `${encodeURIComponent(key)}=${encodeURIComponent(value)}${maxAge}; path=/; domain=${domain}`;
57
+ };
58
+
59
+ const removeCookie = (key: string, domain: string) => {
60
+ document.cookie = `${encodeURIComponent(key)}=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=/; domain=${domain}`;
61
+ };
62
+
63
+ // 显示/隐藏cookie提示
64
+ const toggleNoticeVisible = (val?: boolean) => {
65
+ if (typeof val === 'boolean') {
66
+ visibleVmodel.value = val;
67
+ } else {
68
+ visibleVmodel.value = !visibleVmodel.value;
69
+ }
70
+ nextTick(() => {
71
+ if (!visibleVmodel.value && isZh.value && getCookie(cookieKey.value) !== NOT_SHOW_BUT_AGREED) {
72
+ setCookie(cookieKey.value, NOT_SHOW_BUT_AGREED, 180, props.cookieDomain ?? location.hostname);
73
+ }
74
+ });
75
+ };
76
+
77
+ // 弹出框是否显示
78
+ const isDlgVisible = ref(false);
79
+
80
+ // 显示/隐藏弹出框
81
+ const toggleDlgVisible = (val?: boolean) => {
82
+ if (typeof val === 'boolean') {
83
+ isDlgVisible.value = val;
84
+ } else {
85
+ isDlgVisible.value = !isDlgVisible.value;
86
+ }
87
+ };
88
+
89
+ // 是否未签署
90
+ const isNotSigned = () => {
91
+ if (isZh.value) {
92
+ return getCookie(cookieKey.value) !== NOT_SHOW_BUT_AGREED;
93
+ }
94
+ return (getCookie(cookieKey.value) ?? '0') === NOT_SIGNED;
95
+ };
96
+
97
+ // 是否全部同意
98
+ const isAllAgreed = () => {
99
+ if (isZh.value) {
100
+ return getCookie(cookieKey.value) === NOT_SHOW_BUT_AGREED;
101
+ }
102
+ return getCookie(cookieKey.value) === ALL_AGREED;
103
+ };
104
+
105
+ onMounted(() => {
106
+ // 未签署,展示cookie notice
107
+ if (isNotSigned()) {
108
+ toggleNoticeVisible(true);
109
+ }
110
+ });
111
+
112
+ watch(locale, () => {
113
+ toggleNoticeVisible(isNotSigned());
114
+ });
115
+
116
+ // 用户同意所有cookie
117
+ const acceptAll = () => {
118
+ analysisAllowed.value = true;
119
+ removeCookie(cookieKey.value, props.cookieDomain ?? location.hostname);
120
+ setCookie(cookieKey.value, ALL_AGREED, 180, props.cookieDomain ?? location.hostname);
121
+ toggleNoticeVisible(false);
122
+ };
123
+
124
+ // 用户拒绝所有cookie,即仅同意必要cookie
125
+ const rejectAll = () => {
126
+ analysisAllowed.value = false;
127
+ removeCookie(cookieKey.value, props.cookieDomain ?? location.hostname);
128
+ setCookie(cookieKey.value, NECCESSARY_AGREED, 180, props.cookieDomain ?? location.hostname);
129
+ toggleNoticeVisible(false);
130
+ };
131
+
132
+ // 弹出框设置
133
+ const dlgActions = computed<Array<DialogActionT>>(() => {
134
+ if (isPhone.value) {
135
+ return [
136
+ {
137
+ id: 'save',
138
+ label: t('cookie.saveSetting'),
139
+ variant: 'text',
140
+ onClick: () => {
141
+ if (analysisAllowed.value) {
142
+ acceptAll();
143
+ } else {
144
+ rejectAll();
145
+ }
146
+ toggleDlgVisible(false);
147
+ },
148
+ },
149
+ {
150
+ id: 'allowAll',
151
+ label: t('cookie.acceptAll'),
152
+ variant: 'text',
153
+ onClick: () => {
154
+ analysisAllowed.value = true;
155
+ acceptAll();
156
+ toggleDlgVisible(false);
157
+ },
158
+ },
159
+ ]
160
+ }
161
+ return [
162
+ {
163
+ id: 'save',
164
+ color: 'primary',
165
+ label: t('cookie.saveSetting'),
166
+ variant: 'outline',
167
+ size: 'medium',
168
+ round: 'pill',
169
+ onClick: () => {
170
+ if (analysisAllowed.value) {
171
+ acceptAll();
172
+ } else {
173
+ rejectAll();
174
+ }
175
+
176
+ toggleDlgVisible(false);
177
+ },
178
+ },
179
+ {
180
+ id: 'allowAll',
181
+ color: 'primary',
182
+ label: t('cookie.acceptAll'),
183
+ variant: 'outline',
184
+ size: 'medium',
185
+ round: 'pill',
186
+ onClick: () => {
187
+ analysisAllowed.value = true;
188
+ acceptAll();
189
+ toggleDlgVisible(false);
190
+ },
191
+ },
192
+ ]
193
+ });
194
+
195
+ const onDlgChange = (val: boolean) => {
196
+ if (val) {
197
+ analysisAllowed.value = isAllAgreed();
198
+ }
199
+ };
200
+
201
+ defineExpose({
202
+ check() {
203
+ const agreed = isAllAgreed();
204
+ if (agreed === visibleVmodel.value) {
205
+ toggleNoticeVisible();
206
+ }
207
+ },
208
+ });
209
+ </script>
210
+
211
+ <template>
212
+ <ClientOnly>
213
+ <Teleport :to="wrapper || '#app'">
214
+ <div ref="cookieNoticeRef" v-if="visibleVmodel" class="cookie-notice">
215
+ <div class="cookie-notice-content">
216
+ <div :type="locale" :class="{ 'cookie-notice-wrap-grid': enableGrid, 'cookie-notice-wrap': !enableGrid }">
217
+ <div class="cookie-title">
218
+ <template v-if="isZh">
219
+ <OIcon style="display: inline-block; font-size: 24px; margin-right: 4px">
220
+ <svg style="transform: rotate(180deg);" xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" viewBox="0 0 24 24">
221
+ <path fill="#002fa7" d="M21 12c0 4.971-4.029 9-9 9s-9-4.029-9-9c0-4.971 4.029-9 9-9s9 4.029 9 9z" />
222
+ <path
223
+ fill="#fff"
224
+ d="M12 9.4c0.552 0 1-0.448 1-1s-0.448-1-1-1c-0.552 0-1 0.448-1 1s0.448 1 1 1zM12.492 10.943c-0.042-0.233-0.246-0.41-0.492-0.41-0.276 0-0.5 0.224-0.5 0.5v5.5l0.008 0.090c0.042 0.233 0.246 0.41 0.492 0.41 0.276 0 0.5-0.224 0.5-0.5v-5.5l-0.008-0.090z"
225
+ />
226
+ </svg>
227
+ </OIcon>
228
+ <p class="cookie-zh-title" style="margin-top: 0">
229
+ {{ t('cookie.desc') }}
230
+ <a :href="detailUrl" target="_blank" rel="noopener noreferrer">
231
+ {{ t('cookie.about') }}
232
+ </a>
233
+ </p>
234
+ </template>
235
+ <p v-else class="cookie-en-title">{{ t('cookie.title', [community]) }}</p>
236
+ <OIcon class="cookie-notice-close" @click="toggleNoticeVisible(false)">
237
+ <OIconClose />
238
+ </OIcon>
239
+ </div>
240
+ <div v-if="!isZh" class="cookie-en-content">
241
+ <p class="cookie-en-desc">
242
+ {{ t('cookie.desc') }}
243
+ <a :href="detailUrl" target="_blank" rel="noopener noreferrer">{{ t('cookie.about') }} </a>.
244
+ </p>
245
+ <div class="cookie-notice-right">
246
+ <OButton round="pill" variant="outline" color="primary" @click="acceptAll">{{ t('cookie.acceptAll') }}</OButton>
247
+ <OButton round="pill" variant="outline" color="primary" @click="rejectAll">{{ t('cookie.rejectAll') }}</OButton>
248
+ <OButton round="pill" variant="outline" color="primary" @click="toggleDlgVisible(true)">{{ t('cookie.manage') }}</OButton>
249
+ </div>
250
+ </div>
251
+ </div>
252
+ </div>
253
+ <ODialog
254
+ v-model:visible="isDlgVisible"
255
+ :size="leLaptop ? 'medium' : 'large'"
256
+ :phone-half-full="lePadV"
257
+ :main-class="enableGrid ? 'o-cookie-notice-dlg-main' : ''"
258
+ class="cookie-dlg"
259
+ :actions="dlgActions"
260
+ @change="onDlgChange"
261
+ style="--dlg-radius: 4px"
262
+ >
263
+ <template #header>
264
+ <span class="cookie-dlg-title">{{ t('cookie.manage') }}</span>
265
+ </template>
266
+ <div class="cookie-dlg-content">
267
+ <div class="content-item">
268
+ <div class="item-header">
269
+ <span class="item-title">{{ t('cookie.necessaryCookie') }}</span>
270
+ <span class="item-extra">{{ t('cookie.alwaysOn') }}</span>
271
+ </div>
272
+ <div class="item-detail">
273
+ {{ t('cookie.necessaryCookieDetail') }}
274
+ </div>
275
+ </div>
276
+ <div class="content-item">
277
+ <div class="item-header">
278
+ <span class="item-title">{{ t('cookie.analyticalCookie') }}</span>
279
+ <span class="item-extra">
280
+ <OSwitch v-model="analysisAllowed" />
281
+ </span>
282
+ </div>
283
+ <div class="item-detail">
284
+ {{ t('cookie.analyticalCookieDetail') }}
285
+ </div>
286
+ </div>
287
+ </div>
288
+ </ODialog>
289
+ </div>
290
+ </Teleport>
291
+ </ClientOnly>
292
+ </template>
293
+
294
+ <style lang="scss">
295
+ .o-cookie-notice-dlg-main {
296
+ --dlg-edge-gap: 32px;
297
+ @include respond-to('laptop') {
298
+ --dlg-edge-gap: 24px;
299
+ }
300
+ @include respond-to('phone') {
301
+ --dlg-edge-gap: 16px 24px;
302
+ }
303
+
304
+ --dlg-width: var(--grid-14);
305
+ @include respond-to('pad_h') {
306
+ --dlg-edge-gap: 16px;
307
+ --dlg-width: var(--grid-8);
308
+ }
309
+ @include respond-to('<=pad_v') {
310
+ --dlg-width: 100vw;
311
+ }
312
+ }
313
+ </style>
314
+ <style lang="scss" scoped>
315
+ .o-btn {
316
+ --btn-bd-color-hover: var(--o-color-primary2);
317
+ --btn-bd-color-active: var(--o-color-primary3);
318
+
319
+ --btn-color-hover: var(--o-color-primary2);
320
+ --btn-color-active: var(--o-color-primary3);
321
+
322
+ --btn-bg-color-hover: transparent;
323
+ --btn-bg-color-active: transparent;
324
+ }
325
+ .cookie-notice {
326
+ position: fixed;
327
+ bottom: 0;
328
+ z-index: 999;
329
+ width: 100%;
330
+ .o-button {
331
+ --o-button-font-size-mini: 14px;
332
+ }
333
+ .o-button + .o-button {
334
+ margin-left: 16px;
335
+
336
+ @media (max-width: 840px) {
337
+ margin-left: 0;
338
+ margin-top: 12px;
339
+ }
340
+ }
341
+ }
342
+
343
+ .cookie-notice-content {
344
+ background-color: rgba(var(--o-mixedgray-1), 0.9);
345
+ backdrop-filter: blur(5px);
346
+ box-shadow: var(--o-shadow-1);
347
+ }
348
+
349
+ .cookie-notice-wrap {
350
+ position: relative;
351
+ margin: 0 auto;
352
+ padding: 16px var(--layout-content-padding);
353
+ max-width: var(--layout-content-max-width);
354
+ @media (1680px >= width >= 1201px) {
355
+ padding: 12px var(--layout-content-padding);
356
+ }
357
+ @include respond-to('pad_h') {
358
+ padding: 8px var(--layout-content-padding);
359
+ }
360
+ @media (max-width: 840px) {
361
+ padding: 16px var(--layout-content-padding);
362
+ }
363
+ @include respond-to('phone') {
364
+ padding: 16px var(--layout-content-padding);
365
+ }
366
+ &:not([type='zh']) {
367
+ @media (max-width: 840px) {
368
+ flex-direction: column;
369
+ }
370
+ }
371
+ }
372
+
373
+ .cookie-notice-wrap-grid {
374
+ width: var(--grid-content-width);
375
+ padding: 16px 0;
376
+ margin: 0 auto;
377
+ @media (1680px >= width >= 1201px) {
378
+ padding: 12px 0;
379
+ }
380
+ @include respond-to('pad_h') {
381
+ padding: 8px 0;
382
+ }
383
+ @media (max-width: 840px) {
384
+ padding: 16px 0;
385
+ }
386
+ @include respond-to('phone') {
387
+ padding: 16px 0;
388
+ }
389
+ &:not([type='zh']) {
390
+ @media (max-width: 840px) {
391
+ padding: 16px 0;
392
+ flex-direction: column;
393
+ }
394
+ }
395
+ }
396
+
397
+ .cookie-title {
398
+ display: flex;
399
+ font-size: 16px;
400
+ line-height: calc(1em + 8px);
401
+ color: var(--o-color-info1);
402
+ font-weight: 500;
403
+ @media (max-width: 1680px) {
404
+ font-size: 14px;
405
+ }
406
+ @include respond-to('<=pad_v') {
407
+ text-align: center;
408
+ }
409
+ }
410
+
411
+ .cookie-en-title {
412
+ @include respond-to('<=pad_v') {
413
+ margin-left: auto;
414
+ }
415
+ }
416
+
417
+ .cookie-zh-title {
418
+ font-size: 14px;
419
+ line-height: 22px;
420
+ margin-right: 8px;
421
+ text-align: start;
422
+ @include respond-to('<=pad_v') {
423
+ font-size: 12px;
424
+ line-height: 18px;
425
+ }
426
+ }
427
+
428
+ .cookie-en-content {
429
+ display: flex;
430
+ width: 100%;
431
+ margin-top: 8px;
432
+ @include respond-to('<=pad_v') {
433
+ flex-direction: column;
434
+ }
435
+ }
436
+
437
+ .cookie-en-desc {
438
+ font-size: 12px;
439
+ line-height: 18px;
440
+ color: var(--o-color-info2);
441
+ @media (min-width: 1681px) {
442
+ margin-right: 48px;
443
+ }
444
+ @media (1680px >= width >= 1201px) {
445
+ margin-right: 40px;
446
+ }
447
+ @include respond-to('pad') {
448
+ margin-right: 24px;
449
+ }
450
+ @include respond-to('<=pad_v') {
451
+ margin: 0;
452
+ }
453
+ }
454
+
455
+ .cookie-notice-right {
456
+ display: flex;
457
+ margin-left: auto;
458
+
459
+ .o-btn:not(:first-child) {
460
+ margin-left: 16px;
461
+ @media (1680px >= width >= 1201px) {
462
+ margin-left: 12px;
463
+ }
464
+ @include respond-to('pad_h') {
465
+ margin-left: 8px;
466
+ }
467
+ @media (min-width: 841px) {
468
+ margin-left: 12px;
469
+ }
470
+ }
471
+
472
+ @include respond-to('<=pad_v') {
473
+ margin-top: 16px;
474
+ width: 100%;
475
+ display: grid;
476
+ grid-template-columns: 1fr 1fr;
477
+ grid-template-rows: auto auto;
478
+ gap: 12px;
479
+
480
+ .o-btn {
481
+ margin: 0;
482
+ &:nth-child(1) {
483
+ grid-column: 1;
484
+ grid-row: 1;
485
+ }
486
+ &:nth-child(2) {
487
+ grid-column: 2;
488
+ grid-row: 1;
489
+ }
490
+ &:nth-child(3) {
491
+ grid-column: 1 / span 2;
492
+ grid-row: 2;
493
+ }
494
+ }
495
+ }
496
+ }
497
+
498
+ .cookie-notice-close {
499
+ display: block;
500
+ overflow: visible !important;
501
+ margin-left: auto;
502
+ cursor: pointer;
503
+ color: var(--o-color-info1);
504
+ font-size: 24px;
505
+ &:hover {
506
+ color: var(--o-color-primary2);
507
+ }
508
+ @include x-svg-hover;
509
+ }
510
+
511
+ .cookie-dlg-content {
512
+ .content-item + .content-item {
513
+ margin-top: 24px;
514
+ @media (1680px >= width >= 1201px) {
515
+ margin-top: 16px;
516
+ }
517
+ @include respond-to('<=pad') {
518
+ margin-top: 12px;
519
+ }
520
+ }
521
+
522
+ .content-item {
523
+ .item-header {
524
+ display: flex;
525
+ align-items: center;
526
+ justify-content: space-between;
527
+ .item-title {
528
+ font-size: 20px;
529
+ line-height: calc(1em + 8px);
530
+ color: var(--o-color-info1);
531
+ font-weight: 500;
532
+ @media (1680px >= width >= 1201px) {
533
+ font-size: 18px;
534
+ }
535
+ @include respond-to('<=pad') {
536
+ font-size: 16px;
537
+ }
538
+ }
539
+
540
+ .item-extra {
541
+ font-size: 14px;
542
+ color: var(--o-color-info3);
543
+ margin-left: 24px;
544
+ @include respond-to('<=pad') {
545
+ font-size: 12px;
546
+ }
547
+ }
548
+ }
549
+
550
+ .item-detail {
551
+ font-size: 16px;
552
+ line-height: calc(1em + 8px);
553
+ color: var(--o-color-info2);
554
+ margin-top: 16px;
555
+ @media (max-width: 1680px) {
556
+ margin-top: 12px;
557
+ font-size: 14px;
558
+ }
559
+ @include respond-to('<=pad') {
560
+ margin-top: 8px;
561
+ }
562
+ @media (max-width: 840px) {
563
+ margin-top: 8px;
564
+ }
565
+ }
566
+ }
567
+
568
+ .content-item:nth-child(2) {
569
+ .item-detail {
570
+ font-size: 16px !important;
571
+ line-height: calc(1em + 8px);
572
+ }
573
+ }
574
+ }
575
+ </style>