officialblock 1.0.7 → 1.0.9

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 (103) hide show
  1. package/dist/index-Ch_ldWmA.js +1 -0
  2. package/dist/index-DXm2cqxo.mjs +485 -0
  3. package/dist/official-block.cjs.js +74 -74
  4. package/dist/official-block.es.js +13608 -10831
  5. package/dist/official-block.umd.js +78 -78
  6. package/dist/style.css +1 -1
  7. package/dist/swiper-JiLDDxAF.js +1 -0
  8. package/dist/swiper-acbnDJoL.mjs +2035 -0
  9. package/dist/utils-DD-vVZej.mjs +316 -0
  10. package/dist/utils-DOLLD0-F.js +1 -0
  11. package/package.json +2 -1
  12. package/src/assets/icon-email.svg +3 -0
  13. package/src/components/ArticleList/article.vue +3 -3
  14. package/src/components/ArticleList/contact.vue +9 -9
  15. package/src/components/ArticleList/index.ts +1 -1
  16. package/src/components/ArticleList/index.vue +22 -80
  17. package/src/components/ArticleList/setting.vue +339 -175
  18. package/src/components/ArticleList/type.ts +12 -18
  19. package/src/components/BannerImage/index.ts +11 -0
  20. package/src/components/BannerImage/index.vue +153 -0
  21. package/src/components/BannerImage/setting.vue +55 -0
  22. package/src/components/BannerImage/type.ts +10 -0
  23. package/src/components/BannerImageWithLink/index.ts +11 -0
  24. package/src/components/BannerImageWithLink/index.vue +323 -0
  25. package/src/components/BannerImageWithLink/setting.vue +344 -0
  26. package/src/components/BannerImageWithLink/type.ts +17 -0
  27. package/src/components/BannerPage/index.ts +11 -0
  28. package/src/components/BannerPage/index.vue +283 -0
  29. package/src/components/BannerPage/setting.vue +55 -0
  30. package/src/components/BannerPage/type.ts +10 -0
  31. package/src/components/BtnList/index.ts +11 -0
  32. package/src/components/BtnList/index.vue +588 -0
  33. package/src/components/BtnList/setting.vue +255 -0
  34. package/src/components/BtnList/type.ts +10 -0
  35. package/src/components/Button/index.vue +45 -33
  36. package/src/components/ContactUsList/index.ts +11 -0
  37. package/src/components/ContactUsList/index.vue +369 -0
  38. package/src/components/ContactUsList/setting.vue +497 -0
  39. package/src/components/ContactUsList/type.ts +17 -0
  40. package/src/components/CountDown/index.ts +11 -0
  41. package/src/components/CountDown/index.vue +315 -0
  42. package/src/components/CountDown/setting.vue +302 -0
  43. package/src/components/CountDown/type.ts +17 -0
  44. package/src/components/CustomIframe/index.ts +11 -0
  45. package/src/components/CustomIframe/index.vue +118 -0
  46. package/src/components/CustomIframe/setting.vue +323 -0
  47. package/src/components/CustomIframe/type.ts +17 -0
  48. package/src/components/CustomSpace/index.ts +11 -0
  49. package/src/components/CustomSpace/index.vue +82 -0
  50. package/src/components/CustomSpace/setting.vue +89 -0
  51. package/src/components/CustomSpace/type.ts +10 -0
  52. package/src/components/GalleryList/index.ts +12 -0
  53. package/src/components/GalleryList/index.vue +311 -0
  54. package/src/components/GalleryList/setting.vue +268 -0
  55. package/src/components/GalleryList/type.ts +10 -0
  56. package/src/components/HeroSlide/index.ts +1 -1
  57. package/src/components/HeroSlide/index.vue +85 -133
  58. package/src/components/HeroSlide/setting.vue +435 -0
  59. package/src/components/HeroSlide/type.ts +5 -14
  60. package/src/components/LinkLIst/index.ts +11 -0
  61. package/src/components/LinkLIst/index.vue +317 -0
  62. package/src/components/LinkLIst/setting.vue +264 -0
  63. package/src/components/LinkLIst/type.ts +10 -0
  64. package/src/components/Media/index.vue +18 -18
  65. package/src/components/Operate/index.vue +17 -8
  66. package/src/components/Profile/index.vue +999 -0
  67. package/src/components/Profile/modal.vue +56 -0
  68. package/src/components/Profile/setting.vue +330 -0
  69. package/src/components/QuickLinks/index.vue +166 -0
  70. package/src/components/QuoteText/index.ts +11 -0
  71. package/src/components/QuoteText/index.vue +133 -0
  72. package/src/components/QuoteText/setting.vue +81 -0
  73. package/src/components/QuoteText/type.ts +10 -0
  74. package/src/components/ScrollKeyInfo/index.ts +11 -0
  75. package/src/components/ScrollKeyInfo/index.vue +1345 -0
  76. package/src/components/ScrollKeyInfo/setting.vue +302 -0
  77. package/src/components/ScrollKeyInfo/type.ts +17 -0
  78. package/src/components/Swiper/index.vue +538 -0
  79. package/src/components/TabDefault/components/ComponentSelector/compsData.js +143 -0
  80. package/src/components/TabDefault/components/ComponentSelector/index.vue +188 -0
  81. package/src/components/TabDefault/components/PageContent.vue +207 -0
  82. package/src/components/TabDefault/index.vue +475 -0
  83. package/src/components/TabDefault/setting.vue +581 -0
  84. package/src/components/TabDefault/type.ts +17 -0
  85. package/src/components/TableTwo/index.ts +11 -0
  86. package/src/components/TableTwo/index.vue +232 -0
  87. package/src/components/TableTwo/setting.vue +558 -0
  88. package/src/components/TableTwo/type.ts +17 -0
  89. package/src/components/index.ts +40 -5
  90. package/src/index.ts +56 -12
  91. package/src/main.ts +6 -3
  92. package/src/router/index.ts +6 -0
  93. package/src/style.css +17 -0
  94. package/src/styles/component-isolation.scss +257 -0
  95. package/src/styles/editor.scss +1 -1
  96. package/src/styles/layers.scss +256 -0
  97. package/src/styles/main.scss +21687 -0
  98. package/src/styles/mixins/style-isolation.scss +262 -0
  99. package/src/styles/smart-reset.scss +287 -0
  100. package/src/styles/test.scss +1 -1
  101. package/src/types/button.ts +10 -0
  102. package/src/views/StyleIsolationTest.vue +292 -0
  103. package/src/views/components/ArticleListDemo.vue +59 -19
@@ -0,0 +1,369 @@
1
+ <template>
2
+ <div
3
+ style="margin-top: 30px; margin-bottom: 30px"
4
+ class="count-down-container"
5
+ :style="{ backgroundColor: modelValue?.bgColor }"
6
+ @mouseenter="isHover = true"
7
+ @mouseleave="isHover = false"
8
+ >
9
+ <!-- <a-row
10
+ class="count_down"
11
+ :class="[
12
+ modelValue?.width
13
+ ? `container-content-${modelValue?.width}`
14
+ : 'container-content',
15
+ ]"
16
+ > -->
17
+ <div class="count-down">
18
+ <div class="contact-us-list">
19
+ <div>
20
+ <ul class="contact-us-list__list">
21
+ <a-row style="display: flex">
22
+ <a-col
23
+ :sm="{ span: modelValue?.columns === 2 ? 12 : 24 }"
24
+ :md="{ span: modelValue?.columns === 2 ? 12 : 24 }"
25
+ :lg="{ span: modelValue?.columns === 2 ? 12 : 24 }"
26
+ :xl="{ span: modelValue?.columns === 2 ? 12 : 24 }"
27
+ v-for="item in modelValue?.data"
28
+ style="margin-top: 16px"
29
+ >
30
+ <li class="contact-us-list__item">
31
+ <h6 class="contact-us-list__item__name">{{ item.name }}</h6>
32
+ <p class="contact-us-list__item__title">{{ item.title }}</p>
33
+ <div class="contact-us-list__item__region">
34
+ {{ item.region }}
35
+ </div>
36
+ <div class="contact-us-list__item__link">
37
+ <div class="icon-link icon-link--md">
38
+ <a
39
+ href="mailto:111"
40
+ target="_blank"
41
+ class="icon-link__wrapper"
42
+ ><span
43
+ class="icon-link__icon"
44
+ :style="{ '--icon-url': `url(${iconEmailUrl})` }"
45
+ ></span>
46
+ <div class="icon-link__text">
47
+ <span>{{ item.link }}</span>
48
+ </div></a
49
+ >
50
+ </div>
51
+ </div>
52
+ </li>
53
+ </a-col>
54
+ </a-row>
55
+ </ul>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ <!-- 左侧文本 后侧媒体 -->
60
+ <!-- 左侧一直是一半,但只有左侧时是100% -->
61
+ <!-- <a-col :sm="{ span: 24 }" :md="{ span: hasMedia ? 12 : 24 }"> </a-col>
62
+ <a-col v-if="hasMedia" :sm="{ span: 24 }" :md="{ span: 12 }"> </a-col> -->
63
+ <!-- -->
64
+ <Operate
65
+ v-if="!modelValue?.readOnly"
66
+ v-model:show="isHover"
67
+ @handle-edit="showSetting = true"
68
+ @handle-delete="handleDelete"
69
+ @handle-copy="handleCopy"
70
+ ></Operate>
71
+ <!-- </a-row> -->
72
+ </div>
73
+
74
+ <Setting v-model:show="showSetting" :data="modelValue"></Setting>
75
+ </template>
76
+
77
+ <script lang="ts" setup>
78
+ import { computed, nextTick, ref } from "vue";
79
+ import { randomString } from "@/utils/common";
80
+ import Setting from "./setting.vue";
81
+ import Operate from "@/components/Operate/index.vue";
82
+ import iconEmailUrl from "@/assets/icon-email.svg";
83
+
84
+ // 定义组件名称
85
+ defineOptions({
86
+ name: "CountDown",
87
+ });
88
+
89
+ const props = defineProps({
90
+ modelValue: {
91
+ type: Object,
92
+ default: () => {},
93
+ },
94
+
95
+ // 是否预览
96
+ isPreview: {
97
+ type: Boolean,
98
+ default: false,
99
+ },
100
+ });
101
+ console.log("!!!!", props.modelValue);
102
+ const emit = defineEmits(["update:modelValue", "handleDelete", "handleCopy"]);
103
+
104
+ const isHover = ref<boolean>(false);
105
+ const showSetting = ref<boolean>(false);
106
+
107
+ const handleDelete = () => {
108
+ emit("handleDelete", props.modelValue.id);
109
+ };
110
+
111
+ const handleCopy = () => {
112
+ emit("handleCopy", props.modelValue);
113
+ };
114
+
115
+ const handleInit = () => {
116
+ if (props.modelValue && props.modelValue.data) return; // 有数据不用初始化
117
+ const data = {
118
+ id: props.modelValue?.id || randomString(),
119
+ type: "CountDown",
120
+ readOnly: props.modelValue?.readOnly || false,
121
+ columns: 2,
122
+ data: [
123
+ {
124
+ name: "New Contact111",
125
+ title: "title1111",
126
+ region: "region111",
127
+ link: "111@qq.com",
128
+ id: randomString(),
129
+ },
130
+ {
131
+ name: "New Contact111222",
132
+ title: "title12222",
133
+ region: "region111",
134
+ link: "111@qq.com",
135
+ id: randomString(),
136
+ },
137
+ {
138
+ name: "New Contac33333",
139
+ title: "title3333",
140
+ region: "region33333",
141
+ link: "111@qq.com",
142
+ id: randomString(),
143
+ },
144
+ ],
145
+ };
146
+ emit("update:modelValue", data);
147
+ };
148
+
149
+ handleInit();
150
+ </script>
151
+
152
+ <style lang="scss" scoped>
153
+ .count-down {
154
+ position: relative;
155
+ }
156
+ .count-down-container {
157
+ text-align: center;
158
+ display: block;
159
+ position: relative;
160
+ }
161
+
162
+ .contact-us-list__list {
163
+ --bs-gutter-y: 36px;
164
+ }
165
+
166
+ @media (max-width: 1023.98px) {
167
+ .contact-us-list__list {
168
+ --bs-gutter-y: 24px;
169
+ }
170
+ }
171
+
172
+ @media (max-width: 767.98px) {
173
+ .contact-us-list__list {
174
+ --bs-gutter-y: 16px;
175
+ }
176
+ }
177
+ .contact-us-list__item {
178
+ text-align: left;
179
+ }
180
+
181
+ .contact-us-list__item__name {
182
+ color: #0032a0;
183
+ }
184
+
185
+ .contact-us-list__item__title {
186
+ font-size: 14px;
187
+ font-weight: 400;
188
+ line-height: 1.428;
189
+ color: #2a3b4d;
190
+ margin-top: 4px;
191
+ }
192
+
193
+ @media (max-width: 1023.98px) {
194
+ .contact-us-list__item__title {
195
+ line-height: 1.285;
196
+ letter-spacing: 0.03em;
197
+ font-weight: 400;
198
+ }
199
+ }
200
+
201
+ @media (max-width: 767.98px) {
202
+ .contact-us-list__item__title {
203
+ font-size: 13px;
204
+ line-height: 1.33;
205
+ letter-spacing: 0.02em;
206
+ }
207
+ }
208
+
209
+ @media (min-width: 768px) {
210
+ .contact-us-list__item__title {
211
+ max-width: 240px;
212
+ }
213
+ }
214
+
215
+ @media (max-width: 767.98px) {
216
+ .contact-us-list__item__title {
217
+ margin-top: 2px;
218
+ }
219
+ }
220
+
221
+ .contact-us-list__item__region {
222
+ margin-top: 4px;
223
+ font-size: 14px;
224
+ font-weight: 300;
225
+ line-height: 1.214;
226
+ color: #2a3b4d;
227
+ }
228
+
229
+ @media (max-width: 1023.98px) {
230
+ .contact-us-list__item__region {
231
+ font-size: 13px;
232
+ line-height: 1;
233
+ letter-spacing: 0.04em;
234
+ }
235
+ }
236
+
237
+ @media (max-width: 767.98px) {
238
+ .contact-us-list__item__region {
239
+ line-height: 1.33;
240
+ }
241
+ }
242
+
243
+ .contact-us-list__item__link {
244
+ margin-top: 4px;
245
+ }
246
+
247
+ .icon-link {
248
+ display: flex;
249
+ }
250
+
251
+ .icon-link__wrapper {
252
+ border: none;
253
+ background: none;
254
+ color: #0032a0;
255
+ color: var(--text-color--primary, #0032a0);
256
+ text-decoration: none;
257
+ display: flex;
258
+ align-items: center;
259
+ padding: 0;
260
+ }
261
+
262
+ .icon-link__wrapper:hover .icon-link__text span {
263
+ background-size: 100% 1px, 0 1px;
264
+ }
265
+
266
+ .icon-link__icon {
267
+ width: 24px;
268
+ height: 24px;
269
+ background-image: var(--icon-url);
270
+ background-size: contain;
271
+ background-repeat: no-repeat;
272
+ flex-shrink: 0;
273
+ }
274
+
275
+ @media (max-width: 767.98px) {
276
+ .icon-link__icon {
277
+ width: 16px;
278
+ height: 16px;
279
+ }
280
+ }
281
+
282
+ .icon-link__icon--jump {
283
+ transition: all 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55);
284
+ }
285
+
286
+ .icon-link__icon--jump:hover {
287
+ transform: translateY(-8px);
288
+ }
289
+
290
+ .icon-link__text {
291
+ margin-left: 8px;
292
+ }
293
+
294
+ @media (max-width: 767.98px) {
295
+ .icon-link__text {
296
+ margin-left: 4px;
297
+ }
298
+ }
299
+
300
+ .icon-link__text span {
301
+ text-decoration: none;
302
+ background-image: linear-gradient(90deg, #0032a0, #0032a0);
303
+ background-image: linear-gradient(
304
+ 90deg,
305
+ var(--text-color--primary, #0032a0),
306
+ var(--text-color--primary, #0032a0)
307
+ );
308
+ background-size: 0 1px, 100% 1px;
309
+ background-position: 0 100%, 100% 100%;
310
+ background-repeat: no-repeat;
311
+ transition: background-size 0.3s;
312
+ padding-bottom: 2px;
313
+ }
314
+
315
+ .icon-link__text--pure-text {
316
+ margin-left: 0;
317
+ }
318
+
319
+ @media (max-width: 767.98px) {
320
+ .icon-link__text--pure-text {
321
+ margin-left: 0;
322
+ }
323
+ }
324
+
325
+ .icon-link__text.disable-effect span {
326
+ background: none;
327
+ }
328
+
329
+ .icon-link--sm .icon-link__wrapper .icon-link__text {
330
+ font-size: 14px;
331
+ font-weight: 500;
332
+ line-height: 1.285;
333
+ letter-spacing: 0.04em;
334
+ }
335
+
336
+ @media (max-width: 1023.98px) {
337
+ .icon-link--sm .icon-link__wrapper .icon-link__text {
338
+ line-height: 1.428;
339
+ }
340
+ }
341
+
342
+ @media (max-width: 767.98px) {
343
+ .icon-link--sm .icon-link__wrapper .icon-link__text {
344
+ line-height: 1.285;
345
+ }
346
+ }
347
+
348
+ .icon-link--md .icon-link__wrapper .icon-link__text {
349
+ font-size: 16px;
350
+ font-weight: 400;
351
+ line-height: 1.75;
352
+ }
353
+
354
+ @media (max-width: 1023.98px) {
355
+ .icon-link--md .icon-link__wrapper .icon-link__text {
356
+ font-size: 14px;
357
+ line-height: 1.714;
358
+ letter-spacing: 0.01em;
359
+ }
360
+ }
361
+
362
+ .icon-link--light .icon-link__wrapper .icon-link__text {
363
+ color: #fff;
364
+ }
365
+
366
+ .icon-link--light .icon-link__wrapper .icon-link__text span {
367
+ background-image: linear-gradient(90deg, #fff, #fff);
368
+ }
369
+ </style>