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.
- package/dist/index-Ch_ldWmA.js +1 -0
- package/dist/index-DXm2cqxo.mjs +485 -0
- package/dist/official-block.cjs.js +74 -74
- package/dist/official-block.es.js +13608 -10831
- package/dist/official-block.umd.js +78 -78
- package/dist/style.css +1 -1
- package/dist/swiper-JiLDDxAF.js +1 -0
- package/dist/swiper-acbnDJoL.mjs +2035 -0
- package/dist/utils-DD-vVZej.mjs +316 -0
- package/dist/utils-DOLLD0-F.js +1 -0
- package/package.json +2 -1
- package/src/assets/icon-email.svg +3 -0
- package/src/components/ArticleList/article.vue +3 -3
- package/src/components/ArticleList/contact.vue +9 -9
- package/src/components/ArticleList/index.ts +1 -1
- package/src/components/ArticleList/index.vue +22 -80
- package/src/components/ArticleList/setting.vue +339 -175
- package/src/components/ArticleList/type.ts +12 -18
- package/src/components/BannerImage/index.ts +11 -0
- package/src/components/BannerImage/index.vue +153 -0
- package/src/components/BannerImage/setting.vue +55 -0
- package/src/components/BannerImage/type.ts +10 -0
- package/src/components/BannerImageWithLink/index.ts +11 -0
- package/src/components/BannerImageWithLink/index.vue +323 -0
- package/src/components/BannerImageWithLink/setting.vue +344 -0
- package/src/components/BannerImageWithLink/type.ts +17 -0
- package/src/components/BannerPage/index.ts +11 -0
- package/src/components/BannerPage/index.vue +283 -0
- package/src/components/BannerPage/setting.vue +55 -0
- package/src/components/BannerPage/type.ts +10 -0
- package/src/components/BtnList/index.ts +11 -0
- package/src/components/BtnList/index.vue +588 -0
- package/src/components/BtnList/setting.vue +255 -0
- package/src/components/BtnList/type.ts +10 -0
- package/src/components/Button/index.vue +45 -33
- package/src/components/ContactUsList/index.ts +11 -0
- package/src/components/ContactUsList/index.vue +369 -0
- package/src/components/ContactUsList/setting.vue +497 -0
- package/src/components/ContactUsList/type.ts +17 -0
- package/src/components/CountDown/index.ts +11 -0
- package/src/components/CountDown/index.vue +315 -0
- package/src/components/CountDown/setting.vue +302 -0
- package/src/components/CountDown/type.ts +17 -0
- package/src/components/CustomIframe/index.ts +11 -0
- package/src/components/CustomIframe/index.vue +118 -0
- package/src/components/CustomIframe/setting.vue +323 -0
- package/src/components/CustomIframe/type.ts +17 -0
- package/src/components/CustomSpace/index.ts +11 -0
- package/src/components/CustomSpace/index.vue +82 -0
- package/src/components/CustomSpace/setting.vue +89 -0
- package/src/components/CustomSpace/type.ts +10 -0
- package/src/components/GalleryList/index.ts +12 -0
- package/src/components/GalleryList/index.vue +311 -0
- package/src/components/GalleryList/setting.vue +268 -0
- package/src/components/GalleryList/type.ts +10 -0
- package/src/components/HeroSlide/index.ts +1 -1
- package/src/components/HeroSlide/index.vue +85 -133
- package/src/components/HeroSlide/setting.vue +435 -0
- package/src/components/HeroSlide/type.ts +5 -14
- package/src/components/LinkLIst/index.ts +11 -0
- package/src/components/LinkLIst/index.vue +317 -0
- package/src/components/LinkLIst/setting.vue +264 -0
- package/src/components/LinkLIst/type.ts +10 -0
- package/src/components/Media/index.vue +18 -18
- package/src/components/Operate/index.vue +17 -8
- package/src/components/Profile/index.vue +999 -0
- package/src/components/Profile/modal.vue +56 -0
- package/src/components/Profile/setting.vue +330 -0
- package/src/components/QuickLinks/index.vue +166 -0
- package/src/components/QuoteText/index.ts +11 -0
- package/src/components/QuoteText/index.vue +133 -0
- package/src/components/QuoteText/setting.vue +81 -0
- package/src/components/QuoteText/type.ts +10 -0
- package/src/components/ScrollKeyInfo/index.ts +11 -0
- package/src/components/ScrollKeyInfo/index.vue +1345 -0
- package/src/components/ScrollKeyInfo/setting.vue +302 -0
- package/src/components/ScrollKeyInfo/type.ts +17 -0
- package/src/components/Swiper/index.vue +538 -0
- package/src/components/TabDefault/components/ComponentSelector/compsData.js +143 -0
- package/src/components/TabDefault/components/ComponentSelector/index.vue +188 -0
- package/src/components/TabDefault/components/PageContent.vue +207 -0
- package/src/components/TabDefault/index.vue +475 -0
- package/src/components/TabDefault/setting.vue +581 -0
- package/src/components/TabDefault/type.ts +17 -0
- package/src/components/TableTwo/index.ts +11 -0
- package/src/components/TableTwo/index.vue +232 -0
- package/src/components/TableTwo/setting.vue +558 -0
- package/src/components/TableTwo/type.ts +17 -0
- package/src/components/index.ts +40 -5
- package/src/index.ts +56 -12
- package/src/main.ts +6 -3
- package/src/router/index.ts +6 -0
- package/src/style.css +17 -0
- package/src/styles/component-isolation.scss +257 -0
- package/src/styles/editor.scss +1 -1
- package/src/styles/layers.scss +256 -0
- package/src/styles/main.scss +21687 -0
- package/src/styles/mixins/style-isolation.scss +262 -0
- package/src/styles/smart-reset.scss +287 -0
- package/src/styles/test.scss +1 -1
- package/src/types/button.ts +10 -0
- package/src/views/StyleIsolationTest.vue +292 -0
- 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>
|