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,232 @@
1
+ <template>
2
+ <div
3
+ style="margin-top: 30px; margin-bottom: 30px"
4
+ class="table-two-container"
5
+ :style="{ backgroundColor: modelValue?.bgColor }"
6
+ @mouseenter="isHover = true"
7
+ @mouseleave="isHover = false"
8
+ >
9
+ <div class="count-down">
10
+ <div class="table-two">
11
+ <div class="table-two__wrapper container-content">
12
+ <table class="tableTwo">
13
+ <thead>
14
+ <tr
15
+ class="tableTwo__th"
16
+ v-if="
17
+ modelValue && modelValue.headers && modelValue.headers.length
18
+ "
19
+ >
20
+ <th v-for="item in modelValue.headers">
21
+ <p>{{ item.title }}</p>
22
+ </th>
23
+ </tr>
24
+ </thead>
25
+ <tbody
26
+ v-if="modelValue && modelValue.rows && modelValue.rows.length"
27
+ >
28
+ <tr class="tableTwo__row" v-for="itemRow in modelValue.rows">
29
+ <td>{{ itemRow.title }}</td>
30
+ <td>{{ itemRow.first }}</td>
31
+ <td>{{ itemRow.second }}</td>
32
+ <td>{{ itemRow.third }}</td>
33
+ <td>{{ itemRow.forth }}</td>
34
+ </tr>
35
+ </tbody>
36
+ </table>
37
+ </div>
38
+ </div>
39
+ </div>
40
+ <Operate
41
+ v-if="!modelValue?.readOnly"
42
+ v-model:show="isHover"
43
+ @handle-edit="showSetting = true"
44
+ @handle-delete="handleDelete"
45
+ @handle-copy="handleCopy"
46
+ ></Operate>
47
+ </div>
48
+
49
+ <Setting v-model:show="showSetting" :data="modelValue"></Setting>
50
+ </template>
51
+
52
+ <script lang="ts" setup>
53
+ import { computed, nextTick, ref } from "vue";
54
+ import { randomString } from "@/utils/common";
55
+ import Setting from "./setting.vue";
56
+ import Operate from "@/components/Operate/index.vue";
57
+
58
+ // 定义组件名称
59
+ defineOptions({
60
+ name: "TableTwo",
61
+ });
62
+
63
+ const props = defineProps({
64
+ modelValue: {
65
+ type: Object,
66
+ default: () => {},
67
+ },
68
+
69
+ // 是否预览
70
+ isPreview: {
71
+ type: Boolean,
72
+ default: false,
73
+ },
74
+ });
75
+ console.log("!!!!", props.modelValue);
76
+ const emit = defineEmits(["update:modelValue", "handleDelete", "handleCopy"]);
77
+
78
+ const isHover = ref<boolean>(false);
79
+ const showSetting = ref<boolean>(false);
80
+
81
+ const handleDelete = () => {
82
+ emit("handleDelete", props.modelValue.id);
83
+ };
84
+
85
+ const handleCopy = () => {
86
+ emit("handleCopy", props.modelValue);
87
+ };
88
+
89
+ const handleInit = () => {
90
+ if (props.modelValue && props.modelValue.data) return; // 有数据不用初始化
91
+ const data = {
92
+ id: props.modelValue?.id || randomString(),
93
+ type: "TableTwo",
94
+ readOnly: props.modelValue?.readOnly || false,
95
+ headers: [
96
+ { title: 1 },
97
+ { title: 2 },
98
+ { title: 3 },
99
+ { title: 4 },
100
+ { title: 5 },
101
+ ],
102
+
103
+ rows: [
104
+ {
105
+ title: "1",
106
+ first: "1",
107
+ second: "1",
108
+ third: "1",
109
+ forth: "1",
110
+ },
111
+ {
112
+ title: "2",
113
+ first: "2",
114
+ second: "2",
115
+ third: "2",
116
+ forth: "2",
117
+ },
118
+ ],
119
+ };
120
+ emit("update:modelValue", data);
121
+ };
122
+
123
+ handleInit();
124
+ </script>
125
+
126
+ <style lang="scss" scoped>
127
+ .table-two-container {
128
+ position: relative;
129
+ }
130
+ .tableTwo__row td {
131
+ vertical-align: middle;
132
+ font-size: 16px;
133
+ font-weight: 400;
134
+ line-height: 1.25;
135
+ }
136
+ .tableTwo__row td:first-child {
137
+ background-color: #f2f8ff;
138
+ padding: 10px 16px;
139
+ }
140
+ .tableTwo {
141
+ width: 100%;
142
+ }
143
+
144
+ .tableTwo__th th p {
145
+ font-size: 18px;
146
+ font-weight: 500;
147
+ line-height: 1.33;
148
+ }
149
+
150
+ @media (max-width: 1023.98px) {
151
+ .tableTwo__th th p {
152
+ font-size: 16px;
153
+ line-height: 1.25;
154
+ letter-spacing: 0.01em;
155
+ }
156
+ }
157
+
158
+ @media (max-width: 767.98px) {
159
+ .tableTwo__th th p {
160
+ line-height: 1.5;
161
+ font-size: 16px;
162
+ font-weight: 400;
163
+ line-height: 1.25;
164
+ letter-spacing: 0.01em;
165
+ }
166
+ }
167
+
168
+ @media (max-width: 767.98px) and (max-width: 1023.98px) {
169
+ .tableTwo__th th p {
170
+ font-size: 14px;
171
+ line-height: 1.285;
172
+ letter-spacing: 0.01em;
173
+ }
174
+ }
175
+
176
+ @media (max-width: 767.98px) {
177
+ .tableTwo__th th:first-child p {
178
+ display: none;
179
+ }
180
+ }
181
+
182
+ .tableTwo th {
183
+ background-color: #0032a0;
184
+ color: #fff;
185
+ padding: 8px 16px;
186
+ vertical-align: middle;
187
+ }
188
+
189
+ @media (max-width: 575.98px) {
190
+ .tableTwo th {
191
+ padding: 8px 10px 8px 12px;
192
+ }
193
+ }
194
+
195
+ .tableTwo tr {
196
+ background-color: #fff;
197
+ }
198
+
199
+ .tableTwo__row td {
200
+ vertical-align: middle;
201
+ font-size: 16px;
202
+ font-weight: 400;
203
+ line-height: 1.25;
204
+ letter-spacing: 0.01em;
205
+ padding: 10px 16px;
206
+ }
207
+
208
+ @media (max-width: 1023.98px) {
209
+ .tableTwo__row td {
210
+ font-size: 14px;
211
+ line-height: 1.285;
212
+ letter-spacing: 0.01em;
213
+ }
214
+ }
215
+
216
+ @media (max-width: 575.98px) {
217
+ .tableTwo__row td {
218
+ padding: 10px 10px 10px 12px;
219
+ }
220
+ }
221
+
222
+ .tableTwo__row td:first-child {
223
+ background-color: #f2f8ff;
224
+ padding: 10px 16px;
225
+ }
226
+
227
+ @media (max-width: 767.98px) {
228
+ .tableTwo__row td:first-child {
229
+ padding: 10px 6px 10px 8px;
230
+ }
231
+ }
232
+ </style>