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,344 @@
1
+ <template>
2
+ <a-drawer
3
+ :width="500"
4
+ :visible="show"
5
+ :footer="false"
6
+ @cancel="handleCancel"
7
+ unmountOnClose
8
+ >
9
+ <template #title> {{ data?.type }}组件编辑 </template>
10
+ <div class="seting-box">
11
+ <p class="item-title">标题</p>
12
+ <a-input v-model="data.title" placeholder="请输入标题" allow-clear />
13
+ <p class="item-title">图片</p>
14
+ <img v-if="data?.image" class="item-img" :src="data?.image" />
15
+ <div class="item-uplaod flex items-center">
16
+ <a-input
17
+ v-model="data.image"
18
+ placeholder="请输入图片链接"
19
+ allow-clear
20
+ />
21
+ <a-upload class="fit-content" :show-file-list="false" action="/" />
22
+ </div>
23
+ <a-divider class="divider_box" type="dashed" :size="1" />
24
+ <a-button type="outline" @click="handlerLink" v-if="!showLink"
25
+ >添加链接</a-button
26
+ >
27
+ <div class="link-title-box" v-if="showLink">
28
+ <h4>链接</h4>
29
+ <a-button type="text" @click="removeLink">移除</a-button>
30
+ </div>
31
+ <div v-if="showLink">
32
+ <p class="item-title">文本</p>
33
+ <a-input v-model="data.text" placeholder="请输入文本" allow-clear />
34
+ <p class="item-title">链接类型</p>
35
+ <a-select v-model="data.linkType" placeholder="请选择" allow-clear>
36
+ <a-option value="External Link">外部链接</a-option>
37
+ <a-option value="Internal Link">内容链接</a-option>
38
+ </a-select>
39
+ <p class="item-title">链接</p>
40
+ <a-input v-model="data.link" placeholder="请输入链接" allow-clear />
41
+ </div>
42
+ </div>
43
+ </a-drawer>
44
+ </template>
45
+
46
+ <script lang="ts" setup>
47
+ import { ref, computed } from "vue";
48
+
49
+ const props = defineProps({
50
+ show: {
51
+ type: Boolean,
52
+ default: false,
53
+ },
54
+
55
+ data: {
56
+ type: Object,
57
+ default: () => {},
58
+ },
59
+ });
60
+
61
+ const emit = defineEmits(["update:show"]);
62
+ const showLink = ref(false);
63
+
64
+ const handleCancel = () => {
65
+ emit("update:show", false);
66
+ };
67
+ const removeLink = () => {
68
+ showLink.value = false;
69
+ };
70
+ const handlerLink = () => {
71
+ showLink.value = !showLink.value;
72
+ };
73
+ </script>
74
+
75
+ <style lang="scss" scoped>
76
+ .link-title-box {
77
+ display: flex;
78
+ align-items: flex-end;
79
+ margin-top: 30px;
80
+ margin-bottom: -15px;
81
+ }
82
+ :deep(.arco-select-view-single) {
83
+ background: #ffffff;
84
+ }
85
+ .divider_box {
86
+ margin-top: 30px;
87
+ margin-bottom: 20px;
88
+ }
89
+ .item-title {
90
+ padding: 12px 0 8px 0;
91
+ font-size: 14px;
92
+ font-weight: 600;
93
+ margin-top: 10px;
94
+ }
95
+ .setting-header {
96
+ padding-bottom: 12px;
97
+
98
+ .header-title {
99
+ width: 120px;
100
+ padding-right: 12px;
101
+ text-align: right;
102
+ }
103
+ }
104
+ .setting-header :deep(.arco-select-view-single) {
105
+ background-color: #fff !important;
106
+ }
107
+ .setting-header :deep(.arco-input-wrapper) {
108
+ background-color: #fff !important;
109
+ }
110
+ .item-img {
111
+ height: 100px;
112
+ }
113
+ .seting-box {
114
+ padding: 20px;
115
+ background: #f0f2f5;
116
+ border-radius: 3px;
117
+ .arco-input-wrapper {
118
+ background: #ffffff;
119
+ }
120
+ }
121
+ .setting-content {
122
+ .setting-header {
123
+ padding-bottom: 12px;
124
+
125
+ .header-title {
126
+ width: 120px;
127
+ padding-right: 12px;
128
+ text-align: right;
129
+ }
130
+ }
131
+
132
+ .setting-body {
133
+ margin-top: 12px;
134
+
135
+ .setting-item {
136
+ position: relative;
137
+ padding: 16px 12px;
138
+ background: #f0f2f5;
139
+ border-radius: 8px;
140
+ margin-bottom: 20px;
141
+
142
+ .btn-group {
143
+ position: absolute;
144
+ right: 0;
145
+ top: 0;
146
+ display: flex;
147
+ align-items: center;
148
+ padding: 4px;
149
+
150
+ .btn-delete {
151
+ padding: 4px;
152
+ font-size: 24px;
153
+ cursor: pointer;
154
+ }
155
+ }
156
+
157
+ .item-name {
158
+ font-size: 16px;
159
+ font-weight: 600;
160
+ padding-bottom: 10px;
161
+ border-bottom: 1px solid #fff;
162
+ }
163
+
164
+ .arco-input-wrapper {
165
+ background: #fff;
166
+ }
167
+
168
+ .item-button {
169
+ position: relative;
170
+ padding: 12px 8px 4px;
171
+ background: #fff;
172
+ border-radius: 4px;
173
+ margin: 4px 0;
174
+ transition: all 0.3s ease;
175
+
176
+ &.draggable-item {
177
+ cursor: move;
178
+
179
+ &:hover {
180
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
181
+ transform: translateY(-1px);
182
+ }
183
+
184
+ // 当禁用拖拽时,不显示拖拽效果
185
+ &.sortable-disabled {
186
+ cursor: default;
187
+
188
+ &:hover {
189
+ box-shadow: none;
190
+ transform: none;
191
+ }
192
+ }
193
+ }
194
+
195
+ .arco-input-wrapper {
196
+ background: #f2f3f5;
197
+ }
198
+ }
199
+
200
+ // 拖拽相关样式
201
+ .flip-list-move {
202
+ transition: transform 0.5s;
203
+ }
204
+
205
+ .no-move {
206
+ transition: transform 0s;
207
+ }
208
+
209
+ .ghost {
210
+ opacity: 0.5;
211
+ background: #c8ebfb;
212
+ }
213
+
214
+ .list-group {
215
+ min-height: 20px;
216
+ }
217
+
218
+ .list-group-item {
219
+ cursor: move;
220
+ }
221
+
222
+ .list-group-item i {
223
+ cursor: pointer;
224
+ }
225
+
226
+ .item-action {
227
+ padding: 10px 0;
228
+
229
+ .action-text {
230
+ width: 150px;
231
+ margin-right: 8px;
232
+ }
233
+ }
234
+
235
+ .item-add-btn {
236
+ display: inline-block;
237
+ padding: 2px 8px;
238
+ margin-top: 5px;
239
+ font-size: 11px;
240
+ color: #165dff;
241
+ border-radius: 4px;
242
+ font-weight: 600;
243
+ border: 1px solid #165dff;
244
+ cursor: pointer;
245
+ }
246
+
247
+ .item-img {
248
+ margin-top: 12px;
249
+ height: 160px;
250
+ }
251
+
252
+ .fit-content {
253
+ width: fit-content;
254
+ }
255
+
256
+ .item-img-list {
257
+ .img-list-item {
258
+ margin: 4px 0;
259
+ position: relative;
260
+ padding: 8px;
261
+ border-radius: 4px;
262
+ transition: all 0.3s ease;
263
+ background: #fff;
264
+ border-radius: 4px;
265
+
266
+ &.draggable-item {
267
+ cursor: move;
268
+
269
+ &:hover {
270
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
271
+ transform: translateY(-1px);
272
+ }
273
+
274
+ // 当禁用拖拽时,不显示拖拽效果
275
+ &.sortable-disabled {
276
+ cursor: default;
277
+
278
+ &:hover {
279
+ box-shadow: none;
280
+ transform: none;
281
+ }
282
+ }
283
+ }
284
+
285
+ .arco-input-wrapper {
286
+ background: #f2f3f5;
287
+ }
288
+
289
+ .img-drag-handle {
290
+ top: 0 !important;
291
+ }
292
+ }
293
+
294
+ .item-img-box {
295
+ margin-right: 12px;
296
+ position: relative;
297
+ width: 133px;
298
+ height: 100px;
299
+
300
+ .item-img-dlete {
301
+ position: absolute;
302
+ padding: 8px;
303
+ font-size: 32px;
304
+ top: -16px;
305
+ right: -16px;
306
+ color: red;
307
+ cursor: pointer;
308
+ }
309
+ }
310
+
311
+ .small-img {
312
+ margin: 0;
313
+ height: 100px;
314
+ object-fit: cover;
315
+ }
316
+
317
+ .item-right {
318
+ padding-top: 24px;
319
+ }
320
+ }
321
+ }
322
+ }
323
+
324
+ .drag-handle {
325
+ padding: 4px;
326
+ cursor: grab;
327
+ padding: 4px;
328
+ border-radius: 4px;
329
+
330
+ &:hover {
331
+ background-color: #f0f2f5;
332
+ }
333
+
334
+ &:active {
335
+ cursor: grabbing;
336
+ }
337
+
338
+ .drag-icon {
339
+ font-size: 16px;
340
+ color: #86909c;
341
+ }
342
+ }
343
+ }
344
+ </style>
@@ -0,0 +1,17 @@
1
+ export interface BannerImageWithLinkProps {
2
+ /** 双向绑定的值 */
3
+ modelValue: any
4
+ }
5
+
6
+ export interface BannerImageWithLinkEmits {
7
+ (e: 'update:modelValue', value: any): void
8
+ (e: 'handleDelete', value: string | number): void
9
+ (e: 'handleCopy', value: any): void
10
+ }
11
+
12
+ // export type ComponentSlots = {
13
+ // /** 默认插槽内容 */
14
+ // default?: (props: { value: string | number }) => VNode[]
15
+ // /** 头部内容 */
16
+ // header?: (props: { title: string }) => VNode[]
17
+ // }
@@ -0,0 +1,11 @@
1
+ import type { App, Plugin } from 'vue'
2
+ import BannerPage from './index.vue'
3
+
4
+ export default {
5
+ install: (app: App) => {
6
+ app.component('BannerPage', BannerPage)
7
+ },
8
+ } satisfies Plugin
9
+
10
+ export { default as BannerPage } from './index.vue'
11
+ export type { BannerPageProps, BannerPageEmits } from './type'
@@ -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
+ }