officialblock 1.0.7 → 1.0.8

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 (73) 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 +13576 -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/components/ArticleList/article.vue +3 -3
  13. package/src/components/ArticleList/contact.vue +9 -9
  14. package/src/components/ArticleList/index.ts +1 -1
  15. package/src/components/ArticleList/index.vue +22 -80
  16. package/src/components/ArticleList/setting.vue +61 -71
  17. package/src/components/ArticleList/type.ts +12 -18
  18. package/src/components/BannerImage/index.ts +11 -0
  19. package/src/components/BannerImage/index.vue +153 -0
  20. package/src/components/BannerImage/setting.vue +55 -0
  21. package/src/components/BannerImage/type.ts +10 -0
  22. package/src/components/BannerPage/index.ts +11 -0
  23. package/src/components/BannerPage/index.vue +283 -0
  24. package/src/components/BannerPage/setting.vue +55 -0
  25. package/src/components/BannerPage/type.ts +10 -0
  26. package/src/components/BtnList/index.ts +11 -0
  27. package/src/components/BtnList/index.vue +588 -0
  28. package/src/components/BtnList/setting.vue +255 -0
  29. package/src/components/BtnList/type.ts +10 -0
  30. package/src/components/Button/index.vue +45 -33
  31. package/src/components/CustomSpace/index.ts +11 -0
  32. package/src/components/CustomSpace/index.vue +82 -0
  33. package/src/components/CustomSpace/setting.vue +89 -0
  34. package/src/components/CustomSpace/type.ts +10 -0
  35. package/src/components/GalleryList/index.ts +12 -0
  36. package/src/components/GalleryList/index.vue +311 -0
  37. package/src/components/GalleryList/setting.vue +268 -0
  38. package/src/components/GalleryList/type.ts +10 -0
  39. package/src/components/HeroSlide/index.ts +1 -1
  40. package/src/components/HeroSlide/index.vue +85 -133
  41. package/src/components/HeroSlide/setting.vue +435 -0
  42. package/src/components/HeroSlide/type.ts +5 -14
  43. package/src/components/LinkLIst/index.ts +11 -0
  44. package/src/components/LinkLIst/index.vue +317 -0
  45. package/src/components/LinkLIst/setting.vue +264 -0
  46. package/src/components/LinkLIst/type.ts +10 -0
  47. package/src/components/Media/index.vue +18 -18
  48. package/src/components/Operate/index.vue +17 -7
  49. package/src/components/Profile/index.vue +999 -0
  50. package/src/components/Profile/modal.vue +56 -0
  51. package/src/components/Profile/setting.vue +330 -0
  52. package/src/components/QuickLinks/index.vue +166 -0
  53. package/src/components/QuoteText/index.ts +11 -0
  54. package/src/components/QuoteText/index.vue +133 -0
  55. package/src/components/QuoteText/setting.vue +81 -0
  56. package/src/components/QuoteText/type.ts +10 -0
  57. package/src/components/ScrollKeyInfo/index.vue +0 -0
  58. package/src/components/Swiper/index.vue +538 -0
  59. package/src/components/index.ts +23 -5
  60. package/src/index.ts +56 -12
  61. package/src/main.ts +6 -3
  62. package/src/router/index.ts +6 -0
  63. package/src/style.css +17 -0
  64. package/src/styles/component-isolation.scss +256 -0
  65. package/src/styles/editor.scss +1 -1
  66. package/src/styles/layers.scss +256 -0
  67. package/src/styles/main.scss +21687 -0
  68. package/src/styles/mixins/style-isolation.scss +262 -0
  69. package/src/styles/smart-reset.scss +287 -0
  70. package/src/styles/test.scss +1 -1
  71. package/src/types/button.ts +10 -0
  72. package/src/views/StyleIsolationTest.vue +292 -0
  73. package/src/views/components/ArticleListDemo.vue +49 -10
@@ -0,0 +1,283 @@
1
+ <template>
2
+ <div class="banner-page" @mouseenter="isHover = true" @mouseleave="isHover = false">
3
+ <div class="red">
4
+ <p class="banner-page__title">{{ modelValue?.data?.title }}</p>
5
+ </div>
6
+ <div class="orange"></div>
7
+ <div class="position-absolute triangle-position">
8
+ <div class="position-relative h-100 banner-strips">
9
+ <img src="https://ywies-tx.cedim.cn/images/material/banner-strips.png" alt="">
10
+ <div class="triangle" :style="{backgroundImage: 'url(' + modelValue?.data?.imgSrc + ')'}" data-v-24231ec2=""></div>
11
+ </div>
12
+ </div>
13
+
14
+ <Operate v-if="!modelValue?.readOnly" v-model:show="isHover" @handle-edit="showSetting = true" @handle-delete="handleDelete" @handle-copy="handleCopy"></Operate>
15
+ </div>
16
+
17
+ <Setting v-model:show="showSetting" :data="modelValue"></Setting>
18
+ </template>
19
+
20
+ <script lang="ts" setup>
21
+ import { ref } from 'vue'
22
+ import { randomString } from '@/utils/common'
23
+ import Operate from '@/components/Operate/index.vue'
24
+ import Setting from './setting.vue'
25
+
26
+ // 定义组件名称
27
+ defineOptions({
28
+ name: 'BannerPage'
29
+ })
30
+
31
+ const props = defineProps({
32
+ modelValue: {
33
+ type: Object,
34
+ default: () => {}
35
+ },
36
+
37
+ // 是否预览
38
+ isPreview: {
39
+ type: Boolean,
40
+ default: false
41
+ }
42
+ })
43
+
44
+ const emit = defineEmits(['update:modelValue', 'handleDelete', 'handleCopy'])
45
+
46
+ const handleInit = () => {
47
+ if (props.modelValue && props.modelValue.data) return // 有数据不用初始化
48
+ const data = {
49
+ id: props.modelValue?.id || randomString(),
50
+ type: 'BannerPage',
51
+ readOnly: props.modelValue?.readOnly || false,
52
+ data: {
53
+ title: '冷风机奥附件哦啊金佛阿吉佛大金佛电极法对哦就对哦就发哦就发哦激发激发哦飞机奥飞机',
54
+ imgSrc: 'https://osswebsite.ycyw.com/media-library/ywies-bj/images/home/ywies-tx.jpg',
55
+ }
56
+ }
57
+ emit('update:modelValue', data)
58
+ }
59
+
60
+ const isHover = ref<boolean>(false);
61
+ const showSetting = ref<boolean>(false);
62
+
63
+ const handleDelete = () => {
64
+ emit('handleDelete', props.modelValue.id)
65
+ }
66
+
67
+ const handleCopy = () => {
68
+ emit('handleCopy', props.modelValue)
69
+ }
70
+
71
+ handleInit()
72
+ </script>
73
+
74
+ <style scoped>
75
+ .banner-page {
76
+ height: 328px;
77
+ width: 100%;
78
+ display: flex;
79
+ position: relative;
80
+ justify-content: space-between;
81
+ overflow: hidden;
82
+ }
83
+
84
+ @media (max-width: 575.98px) {
85
+ .banner-page {
86
+ height: 160px;
87
+ }
88
+ }
89
+
90
+ .banner-page__title {
91
+ font-size: 24px;
92
+ font-weight: 700;
93
+ line-height: 1.15;
94
+ text-shadow: 0 8px 32px 0 rgba(130,130,140,.24);
95
+ color: #fff;
96
+ max-width: 357px;
97
+ margin-left: 60px;
98
+ z-index: 1;
99
+ }
100
+
101
+ @media (min-width: 768px) {
102
+ .banner-page__title {
103
+ font-size: 36px;
104
+ }
105
+ }
106
+
107
+ @media (min-width: 1024px) {
108
+ .banner-page__title {
109
+ font-size: 40px;
110
+ line-height: 1.25;
111
+ }
112
+ }
113
+
114
+ @media (max-width: 1023.98px) {
115
+ .banner-page__title {
116
+ margin-left: 40px;
117
+ width: 50%;
118
+ }
119
+ }
120
+
121
+ @media (max-width: 575.98px) {
122
+ .banner-page__title {
123
+ margin-left: 22px;
124
+ }
125
+ }
126
+
127
+ .banner-page .red {
128
+ height: 100%;
129
+ width: 50%;
130
+ background-image: url('https://ywies-tx.cedim.cn/_nuxt/img/header-left-banner.c745bf5.jpg');
131
+ background-repeat: no-repeat;
132
+ background-size: cover;
133
+ background-position: 50%;
134
+ display: flex;
135
+ align-items: center;
136
+ }
137
+
138
+ .banner-page .red:after {
139
+ position: absolute;
140
+ content: "";
141
+ width: 100%;
142
+ height: 100%;
143
+ background-repeat: no-repeat;
144
+ background-size: 100%;
145
+ background-color: rgba(235,0,40,.6);
146
+ }
147
+
148
+ @media (max-width: 767.98px) {
149
+ .banner-page .red {
150
+ width: 65%;
151
+ }
152
+ }
153
+
154
+ .banner-page .orange {
155
+ width: 50%;
156
+ background-image: url('https://ywies-tx.cedim.cn/_nuxt/img/header-right-banner.6a0f5b9.jpg');
157
+ background-position: 50%;
158
+ position: relative;
159
+ }
160
+
161
+ .banner-page .orange,
162
+ .banner-page .orange:after {
163
+ height: 100%;
164
+ background-repeat: no-repeat;
165
+ background-size: 100%;
166
+ }
167
+
168
+ .banner-page .orange:after {
169
+ position: absolute;
170
+ content: "";
171
+ width: 100%;
172
+ background-color: rgba(255,158,24,.6);
173
+ }
174
+
175
+ @media (max-width: 1440px) {
176
+ .banner-page .orange {
177
+ background-size: cover;
178
+ background-position: 220px 50%;
179
+ }
180
+ }
181
+
182
+ @media (max-width: 992px) {
183
+ .banner-page .orange {
184
+ background-position: 180px 50%;
185
+ }
186
+ }
187
+
188
+ @media (max-width: 767.98px) {
189
+ .banner-page .orange {
190
+ width: 35%;
191
+ }
192
+ }
193
+
194
+ @media (max-width: 575.98px) {
195
+ .banner-page .orange {
196
+ background-position: 18px 50%;
197
+ }
198
+ }
199
+
200
+ .banner-page .triangle-position {
201
+ position: absolute;
202
+ top: 0;
203
+ left: 66%;
204
+ width: 100%;
205
+ height: 100%;
206
+ transform: translateX(-50%);
207
+ max-width: 693px;
208
+ }
209
+
210
+ @media (min-width: 1441px) {
211
+ .banner-page .triangle-position {
212
+ left: 50%;
213
+ }
214
+ }
215
+
216
+ .banner-page .banner-strips img {
217
+ position: absolute;
218
+ height: 100%;
219
+ z-index: 1;
220
+ right: 77%;
221
+ }
222
+
223
+ @media (max-width: 1023.98px) {
224
+ .banner-page .banner-strips img {
225
+ right: 65%;
226
+ }
227
+ }
228
+
229
+ @media (max-width: 767.98px) {
230
+ .banner-page .banner-strips img {
231
+ right: 50%;
232
+ }
233
+ }
234
+
235
+ @media (max-width: 375px) {
236
+ .banner-page .banner-strips img {
237
+ right: 49%;
238
+ }
239
+ }
240
+
241
+ .banner-page .triangle {
242
+ position: absolute;
243
+ top: 0;
244
+ left: 50%;
245
+ width: 100%;
246
+ height: 100%;
247
+ max-width: 700px;
248
+ transform: translateX(-50%);
249
+ background-position: 50%;
250
+ background-size: cover;
251
+ background-repeat: no-repeat;
252
+ background-image: var(--bg-image);
253
+ -webkit-clip-path: polygon(0 0,100% 0,80% 100%,20% 100%);
254
+ clip-path: polygon(0 0,100% 0,80% 100%,20% 100%);
255
+ }
256
+
257
+ @media (max-width: 1023.98px) {
258
+ .banner-page .triangle {
259
+ max-width: 600px;
260
+ left: 53%;
261
+ -webkit-clip-path: polygon(0 0,100% 0,72% 100%,25% 100%);
262
+ clip-path: polygon(0 0,100% 0,72% 100%,25% 100%);
263
+ }
264
+ }
265
+
266
+ @media (max-width: 767.98px) {
267
+ .banner-page .triangle {
268
+ max-width: 450px;
269
+ left: 60%;
270
+ }
271
+ }
272
+
273
+ @media (max-width: 575.98px) {
274
+ .banner-page .triangle {
275
+ max-width: 225px;
276
+ left: 56%;
277
+ }
278
+ }
279
+
280
+ .banner-page .triangle img {
281
+ position: absolute;
282
+ }
283
+ </style>
@@ -0,0 +1,55 @@
1
+ <template>
2
+ <a-drawer :width="500" :visible="show" :footer="false" @cancel="handleCancel" unmountOnClose>
3
+ <template #title>
4
+ {{data.type}}组件编辑
5
+ </template>
6
+ <div class="setting-content">
7
+ <p class="item-title">标题</p>
8
+ <a-input v-model="data.data.title" placeholder="请输入标题" allow-clear />
9
+
10
+ <p class="item-title">图片</p>
11
+ <img class="item-img" :src="data?.data?.imgSrc" />
12
+ <div class="item-uplaod flex items-center">
13
+ <a-input v-model="data.data.imgSrc" placeholder="请输入图片链接" allow-clear />
14
+ <a-upload class="fit-content" :show-file-list="false" action="/" />
15
+ </div>
16
+ </div>
17
+ </a-drawer>
18
+ </template>
19
+
20
+ <script lang="ts" setup>
21
+ defineProps({
22
+ show: {
23
+ type: Boolean,
24
+ default: false
25
+ },
26
+
27
+ data: {
28
+ type: Object,
29
+ default: () => {}
30
+ }
31
+ })
32
+
33
+ const emit = defineEmits(['update:show']);
34
+
35
+ const handleCancel = () => {
36
+ emit('update:show', false);
37
+ }
38
+ </script>
39
+
40
+ <style lang="scss" scoped>
41
+ .setting-content {
42
+ position: relative;
43
+
44
+ .item-title {
45
+ padding: 12px 0 8px 0;
46
+ font-size: 14px;
47
+ font-weight: 600;
48
+ }
49
+
50
+ .item-img {
51
+ margin-top: 12px;
52
+ height: 160px;
53
+ }
54
+ }
55
+ </style>
@@ -0,0 +1,10 @@
1
+ export interface BannerPageProps {
2
+ /** 双向绑定的值 */
3
+ modelValue: any
4
+ }
5
+
6
+ export interface BannerPageEmits {
7
+ (e: 'update:modelValue', value: any): void
8
+ (e: 'handleDelete', value: string | number): void
9
+ (e: 'handleCopy', value: any): void
10
+ }
@@ -0,0 +1,11 @@
1
+ import type { App, Plugin } from 'vue'
2
+ import BtnList from './index.vue'
3
+
4
+ export default {
5
+ install: (app: App) => {
6
+ app.component('BtnList', BtnList)
7
+ },
8
+ } satisfies Plugin
9
+
10
+ export { default as BtnList } from './index.vue'
11
+ export type { BtnListProps, BtnListEmits } from './type'