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,118 @@
1
+ <template>
2
+ <div
3
+ style="margin-top: 30px; margin-bottom: 30px"
4
+ class="custom-iframe-container"
5
+ :style="{ backgroundColor: modelValue?.bgColor }"
6
+ @mouseenter="isHover = true"
7
+ @mouseleave="isHover = false"
8
+ >
9
+ <div class="custom-iframe">
10
+ <div class="container-content-middle">
11
+ <iframe
12
+ width="450"
13
+ height="550"
14
+ frameborder="0"
15
+ :src="modelValue?.url"
16
+ allow=""
17
+ style="border: 0"
18
+ ></iframe>
19
+ </div>
20
+ </div>
21
+ <Operate
22
+ v-if="!modelValue?.readOnly"
23
+ v-model:show="isHover"
24
+ @handle-edit="showSetting = true"
25
+ @handle-delete="handleDelete"
26
+ @handle-copy="handleCopy"
27
+ ></Operate>
28
+ <!-- </a-row> -->
29
+ </div>
30
+
31
+ <Setting v-model:show="showSetting" :data="modelValue"></Setting>
32
+ </template>
33
+
34
+ <script lang="ts" setup>
35
+ import { computed, nextTick, ref } from "vue";
36
+ import { randomString } from "@/utils/common";
37
+ import Setting from "./setting.vue";
38
+ import Operate from "@/components/Operate/index.vue";
39
+
40
+ // 定义组件名称
41
+ defineOptions({
42
+ name: "CountDown",
43
+ });
44
+
45
+ const props = defineProps({
46
+ modelValue: {
47
+ type: Object,
48
+ default: () => {},
49
+ },
50
+
51
+ // 是否预览
52
+ isPreview: {
53
+ type: Boolean,
54
+ default: false,
55
+ },
56
+ });
57
+ console.log("!!!!", props.modelValue);
58
+ const emit = defineEmits(["update:modelValue", "handleDelete", "handleCopy"]);
59
+
60
+ const isHover = ref<boolean>(false);
61
+ const showSetting = ref<boolean>(false);
62
+ const timeObj = ref({
63
+ day: 0,
64
+ hour: 0,
65
+ min: 0,
66
+ sec: 0,
67
+ });
68
+ // const timer = null;
69
+ const timer = ref(null);
70
+
71
+ const handleDelete = () => {
72
+ emit("handleDelete", props.modelValue.id);
73
+ };
74
+
75
+ const handleCopy = () => {
76
+ emit("handleCopy", props.modelValue);
77
+ };
78
+
79
+ const handleInit = () => {
80
+ if (props.modelValue && props.modelValue.height) return; // 检查必要属性是否存在
81
+ const data = {
82
+ id: props.modelValue?.id || randomString(),
83
+ type: "CustomIframe",
84
+ readOnly: props.modelValue?.readOnly || false,
85
+ width: "medium",
86
+ height: 550,
87
+ url: "https://www.baidu.com",
88
+ };
89
+ emit("update:modelValue", data);
90
+ };
91
+
92
+ handleInit();
93
+ </script>
94
+
95
+ <style scoped lang="scss">
96
+ .custom-iframe-container {
97
+ position: relative;
98
+ }
99
+ .custom-iframe,
100
+ .custom-iframe iframe {
101
+ width: 100%;
102
+ }
103
+
104
+ .custom-iframe .has-ratio {
105
+ width: 100%;
106
+ padding-bottom: 0;
107
+ padding-bottom: var(--custom-ratio, 0);
108
+ position: relative;
109
+ }
110
+
111
+ .custom-iframe .has-ratio iframe {
112
+ position: absolute;
113
+ top: 0;
114
+ left: 0;
115
+ width: 100%;
116
+ height: 100%;
117
+ }
118
+ </style>
@@ -0,0 +1,323 @@
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
+ <div class="setting-header flex items-center">
12
+ <span class="header-title">组件宽度</span>
13
+ <a-select v-model="data.width" placeholder="请选择" allow-clear>
14
+ <a-option value="default">默认</a-option>
15
+ <a-option value="small">小</a-option>
16
+ <a-option value="medium">中</a-option>
17
+ <a-option value="large">大</a-option>
18
+ </a-select>
19
+ </div>
20
+ <div class="setting-header flex items-center">
21
+ <span class="header-title">组件高度</span>
22
+ <a-slider
23
+ v-model="data.height"
24
+ :min="320"
25
+ :max="1080"
26
+ :default-value="10"
27
+ show-input
28
+ />
29
+ </div>
30
+ <div class="setting-header flex items-center">
31
+ <span class="header-title">网址</span>
32
+ <a-input
33
+ v-model="data.url"
34
+ :style="{ background: '#ffffff' }"
35
+ placeholder="请输入"
36
+ allow-clear
37
+ />
38
+ </div>
39
+ </div>
40
+ </a-drawer>
41
+ </template>
42
+
43
+ <script lang="ts" setup>
44
+ import { ref, computed } from "vue";
45
+ import RichTextEditor from "@/components/RichTextEditor";
46
+ import { randomString } from "@/utils/common";
47
+
48
+ const props = defineProps({
49
+ show: {
50
+ type: Boolean,
51
+ default: false,
52
+ },
53
+
54
+ data: {
55
+ type: Object,
56
+ default: () => {},
57
+ },
58
+ });
59
+
60
+ const emit = defineEmits(["update:show"]);
61
+
62
+ const handleCancel = () => {
63
+ emit("update:show", false);
64
+ };
65
+ </script>
66
+
67
+ <style lang="scss" scoped>
68
+ .setting-header {
69
+ padding-bottom: 12px;
70
+
71
+ .header-title {
72
+ width: 120px;
73
+ padding-right: 12px;
74
+ text-align: right;
75
+ }
76
+ }
77
+ .setting-header :deep(.arco-select-view-single) {
78
+ background-color: #fff !important;
79
+ }
80
+ .setting-header :deep(.arco-input-wrapper) {
81
+ background-color: #fff !important;
82
+ }
83
+ .item-img {
84
+ height: 100px;
85
+ }
86
+ .seting-box {
87
+ padding: 20px;
88
+ background: #f0f2f5;
89
+ border-radius: 3px;
90
+ .arco-input-wrapper {
91
+ background: #ffffff;
92
+ }
93
+ }
94
+ .setting-content {
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
+
105
+ .setting-body {
106
+ margin-top: 12px;
107
+
108
+ .setting-item {
109
+ position: relative;
110
+ padding: 16px 12px;
111
+ background: #f0f2f5;
112
+ border-radius: 8px;
113
+ margin-bottom: 20px;
114
+
115
+ .btn-group {
116
+ position: absolute;
117
+ right: 0;
118
+ top: 0;
119
+ display: flex;
120
+ align-items: center;
121
+ padding: 4px;
122
+
123
+ .btn-delete {
124
+ padding: 4px;
125
+ font-size: 24px;
126
+ cursor: pointer;
127
+ }
128
+ }
129
+
130
+ .item-name {
131
+ font-size: 16px;
132
+ font-weight: 600;
133
+ padding-bottom: 10px;
134
+ border-bottom: 1px solid #fff;
135
+ }
136
+
137
+ .item-title {
138
+ padding: 12px 0 8px 0;
139
+ font-size: 14px;
140
+ font-weight: 600;
141
+ }
142
+
143
+ .arco-input-wrapper {
144
+ background: #fff;
145
+ }
146
+
147
+ .item-button {
148
+ position: relative;
149
+ padding: 12px 8px 4px;
150
+ background: #fff;
151
+ border-radius: 4px;
152
+ margin: 4px 0;
153
+ transition: all 0.3s ease;
154
+
155
+ &.draggable-item {
156
+ cursor: move;
157
+
158
+ &:hover {
159
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
160
+ transform: translateY(-1px);
161
+ }
162
+
163
+ // 当禁用拖拽时,不显示拖拽效果
164
+ &.sortable-disabled {
165
+ cursor: default;
166
+
167
+ &:hover {
168
+ box-shadow: none;
169
+ transform: none;
170
+ }
171
+ }
172
+ }
173
+
174
+ .arco-input-wrapper {
175
+ background: #f2f3f5;
176
+ }
177
+ }
178
+
179
+ // 拖拽相关样式
180
+ .flip-list-move {
181
+ transition: transform 0.5s;
182
+ }
183
+
184
+ .no-move {
185
+ transition: transform 0s;
186
+ }
187
+
188
+ .ghost {
189
+ opacity: 0.5;
190
+ background: #c8ebfb;
191
+ }
192
+
193
+ .list-group {
194
+ min-height: 20px;
195
+ }
196
+
197
+ .list-group-item {
198
+ cursor: move;
199
+ }
200
+
201
+ .list-group-item i {
202
+ cursor: pointer;
203
+ }
204
+
205
+ .item-action {
206
+ padding: 10px 0;
207
+
208
+ .action-text {
209
+ width: 150px;
210
+ margin-right: 8px;
211
+ }
212
+ }
213
+
214
+ .item-add-btn {
215
+ display: inline-block;
216
+ padding: 2px 8px;
217
+ margin-top: 5px;
218
+ font-size: 11px;
219
+ color: #165dff;
220
+ border-radius: 4px;
221
+ font-weight: 600;
222
+ border: 1px solid #165dff;
223
+ cursor: pointer;
224
+ }
225
+
226
+ .item-img {
227
+ margin-top: 12px;
228
+ height: 160px;
229
+ }
230
+
231
+ .fit-content {
232
+ width: fit-content;
233
+ }
234
+
235
+ .item-img-list {
236
+ .img-list-item {
237
+ margin: 4px 0;
238
+ position: relative;
239
+ padding: 8px;
240
+ border-radius: 4px;
241
+ transition: all 0.3s ease;
242
+ background: #fff;
243
+ border-radius: 4px;
244
+
245
+ &.draggable-item {
246
+ cursor: move;
247
+
248
+ &:hover {
249
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
250
+ transform: translateY(-1px);
251
+ }
252
+
253
+ // 当禁用拖拽时,不显示拖拽效果
254
+ &.sortable-disabled {
255
+ cursor: default;
256
+
257
+ &:hover {
258
+ box-shadow: none;
259
+ transform: none;
260
+ }
261
+ }
262
+ }
263
+
264
+ .arco-input-wrapper {
265
+ background: #f2f3f5;
266
+ }
267
+
268
+ .img-drag-handle {
269
+ top: 0 !important;
270
+ }
271
+ }
272
+
273
+ .item-img-box {
274
+ margin-right: 12px;
275
+ position: relative;
276
+ width: 133px;
277
+ height: 100px;
278
+
279
+ .item-img-dlete {
280
+ position: absolute;
281
+ padding: 8px;
282
+ font-size: 32px;
283
+ top: -16px;
284
+ right: -16px;
285
+ color: red;
286
+ cursor: pointer;
287
+ }
288
+ }
289
+
290
+ .small-img {
291
+ margin: 0;
292
+ height: 100px;
293
+ object-fit: cover;
294
+ }
295
+
296
+ .item-right {
297
+ padding-top: 24px;
298
+ }
299
+ }
300
+ }
301
+ }
302
+
303
+ .drag-handle {
304
+ padding: 4px;
305
+ cursor: grab;
306
+ padding: 4px;
307
+ border-radius: 4px;
308
+
309
+ &:hover {
310
+ background-color: #f0f2f5;
311
+ }
312
+
313
+ &:active {
314
+ cursor: grabbing;
315
+ }
316
+
317
+ .drag-icon {
318
+ font-size: 16px;
319
+ color: #86909c;
320
+ }
321
+ }
322
+ }
323
+ </style>
@@ -0,0 +1,17 @@
1
+ export interface CustomIframeProps {
2
+ /** 双向绑定的值 */
3
+ modelValue: any
4
+ }
5
+
6
+ export interface CustomIframeEmits {
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 CustomSpace from './index.vue'
3
+
4
+ export default {
5
+ install: (app: App) => {
6
+ app.component('CustomSpace', CustomSpace)
7
+ },
8
+ } satisfies Plugin
9
+
10
+ export { default as CustomSpace } from './index.vue'
11
+ export type { CustomSpaceProps, CustomSpaceEmits } from './type'
@@ -0,0 +1,82 @@
1
+ <template>
2
+ <div :id="modelValue?.data?.id" class="custom-space"
3
+ :style="{'--desktop-height': modelValue?.data?.desktopHeight + 'px', '--mobile-height': modelValue?.data?.mobileHeight + 'px', '--bg-color': modelValue?.data?.bgColor}"
4
+ @mouseenter="isHover = true" @mouseleave="isHover = false">
5
+ <Operate v-if="!modelValue?.readOnly" v-model:show="isHover" @handle-edit="showSetting = true" @handle-delete="handleDelete" @handle-copy="handleCopy"></Operate>
6
+ </div>
7
+
8
+ <Setting v-model:show="showSetting" :data="modelValue"></Setting>
9
+ </template>
10
+
11
+ <script lang="ts" setup>
12
+ import { ref } from 'vue'
13
+ import { randomString } from '@/utils/common'
14
+ import Operate from '@/components/Operate/index.vue'
15
+ import Setting from './setting.vue'
16
+
17
+ // 定义组件名称
18
+ defineOptions({
19
+ name: 'CustomSpace'
20
+ })
21
+
22
+ const props = defineProps({
23
+ modelValue: {
24
+ type: Object,
25
+ default: () => {}
26
+ },
27
+
28
+ // 是否预览
29
+ isPreview: {
30
+ type: Boolean,
31
+ default: false
32
+ }
33
+ })
34
+
35
+ const emit = defineEmits(['update:modelValue', 'handleDelete', 'handleCopy'])
36
+
37
+ const handleInit = () => {
38
+ if (props.modelValue && props.modelValue.data) return // 有数据不用初始化
39
+ const data = {
40
+ id: props.modelValue?.id || randomString(),
41
+ type: 'CustomSpace',
42
+ readOnly: props.modelValue?.readOnly || false,
43
+ data: {
44
+ id: '',
45
+ desktopHeight: '49',
46
+ mobileHeight: '24',
47
+ bgColor: ''
48
+ }
49
+ }
50
+ emit('update:modelValue', data)
51
+ }
52
+
53
+ const isHover = ref<boolean>(false);
54
+ const showSetting = ref<boolean>(false);
55
+
56
+ const handleDelete = () => {
57
+ emit('handleDelete', props.modelValue.id)
58
+ }
59
+
60
+ const handleCopy = () => {
61
+ emit('handleCopy', props.modelValue)
62
+ }
63
+
64
+ handleInit()
65
+ </script>
66
+
67
+ <style scoped>
68
+ .custom-space {
69
+ position: relative;
70
+ width: 100%;
71
+ height: 160px;
72
+ height: var(--desktop-height, 0);
73
+ background-color: transparent;
74
+ background-color: var(--bg-color, transparent);
75
+ }
76
+
77
+ @media (max-width: 767.98px) {
78
+ .custom-space {
79
+ height: var(--mobile-height, 0);
80
+ }
81
+ }
82
+ </style>
@@ -0,0 +1,89 @@
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-select v-model="data.bgColor" placeholder="请选择" allow-clear>
9
+ <a-option value="#ffffff">白色</a-option>
10
+ <a-option value="#F7F7FA">灰色</a-option>
11
+ </a-select>
12
+
13
+ <p class="item-title">间距设置</p>
14
+ <a-select v-model="customSpace" placeholder="请选择" @change="handleChange" allow-clear>
15
+ <a-option :value="1">制表符起始间距(49px,24px)</a-option>
16
+ <a-option :value="2">部分间距(80px,40px)</a-option>
17
+ <a-option :value="3">组件间距(32px,40px)</a-option>
18
+ <a-option :value="4">链接间距(16px,16px)</a-option>
19
+ <a-option :value="5">页末间距(160px,80px)</a-option>
20
+ </a-select>
21
+
22
+ <p class="item-title">PC高度(单位:px)</p>
23
+ <a-input v-model="data.data.desktopHeight" disabled />
24
+
25
+ <p class="item-title">移动端高度(单位:px)</p>
26
+ <a-input v-model="data.data.mobileHeight" disabled />
27
+
28
+ <p class="item-title">唯一标识</p>
29
+ <a-input v-model="data.data.id" placeholder="请输入唯一标识" allow-clear />
30
+ </div>
31
+ </a-drawer>
32
+ </template>
33
+
34
+ <script lang="ts" setup>
35
+ import { ref } from 'vue'
36
+ const props = defineProps({
37
+ show: {
38
+ type: Boolean,
39
+ default: false
40
+ },
41
+
42
+ data: {
43
+ type: Object,
44
+ default: () => {}
45
+ }
46
+ })
47
+
48
+ const emit = defineEmits(['update:show']);
49
+ const handleCancel = () => {
50
+ emit('update:show', false);
51
+ }
52
+
53
+ const customSpace = ref<number>(1);
54
+ const handleChange = (value: number) => {
55
+ if (value === 1) {
56
+ props.data.data.desktopHeight = 49;
57
+ props.data.data.mobileHeight = 24;
58
+ } else if (value === 2) {
59
+ props.data.data.desktopHeight = 80;
60
+ props.data.data.mobileHeight = 40;
61
+ } else if (value === 3) {
62
+ props.data.data.desktopHeight = 32;
63
+ props.data.data.mobileHeight = 40;
64
+ } else if (value === 4) {
65
+ props.data.data.desktopHeight = 16;
66
+ props.data.data.mobileHeight = 16;
67
+ } else if (value === 5) {
68
+ props.data.data.desktopHeight = 160;
69
+ props.data.data.mobileHeight = 80;
70
+ }
71
+ };
72
+ </script>
73
+
74
+ <style lang="scss" scoped>
75
+ .setting-content {
76
+ position: relative;
77
+
78
+ .item-title {
79
+ padding: 12px 0 8px 0;
80
+ font-size: 14px;
81
+ font-weight: 600;
82
+ }
83
+
84
+ .item-img {
85
+ margin-top: 12px;
86
+ height: 160px;
87
+ }
88
+ }
89
+ </style>
@@ -0,0 +1,10 @@
1
+ export interface CustomSpaceProps {
2
+ /** 双向绑定的值 */
3
+ modelValue: any
4
+ }
5
+
6
+ export interface CustomSpaceEmits {
7
+ (e: 'update:modelValue', value: any): void
8
+ (e: 'handleDelete', value: string | number): void
9
+ (e: 'handleCopy', value: any): void
10
+ }
@@ -0,0 +1,12 @@
1
+
2
+ import type { App, Plugin } from 'vue'
3
+ import GalleryList from './index.vue'
4
+
5
+ export default {
6
+ install: (app: App) => {
7
+ app.component('GalleryList', GalleryList)
8
+ },
9
+ } satisfies Plugin
10
+
11
+ export { default as GalleryList } from './index.vue'
12
+ export type { GalleryListProps, GalleryListEmits } from './type'