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
@@ -1,161 +1,113 @@
1
1
  <template>
2
- <div class="hero-slide">
3
- <div class="slide-container">
4
- <div
5
- v-for="(slide, index) in slides"
6
- :key="index"
7
- class="slide-item"
8
- :class="{ active: currentSlide === index }"
9
- >
10
- <h2>{{ slide.title }}</h2>
11
- <p>{{ slide.description }}</p>
12
- </div>
13
- </div>
14
- <div v-if="showIndicators" class="slide-indicators">
15
- <span
16
- v-for="(_, index) in slides"
17
- :key="index"
18
- class="indicator"
19
- :class="{ active: currentSlide === index }"
20
- @click="goToSlide(index)"
21
- ></span>
22
- </div>
2
+ <div class="hero-slide has-quick-links is-video-and-image" @mouseenter="isHover = true" @mouseleave="isHover = false">
3
+ <template v-for="item in modelValue?.data" :key="item.id">
4
+ <Swiper v-if="item.type === 'Banners'" ref="swiperRef" :data="item.data"></Swiper>
5
+ <QuickLinks v-if="item.type === 'Links' && item.data.length" :data="item.data"></QuickLinks>
6
+ </template>
7
+
8
+ <Operate v-if="!modelValue?.readOnly" v-model:show="isHover" @handle-edit="showSetting = true" @handle-delete="handleDelete" @handle-copy="handleCopy"></Operate>
23
9
  </div>
10
+
11
+ <Setting v-model:show="showSetting" :data="modelValue" @updateSwiper="updateSwiper"></Setting>
24
12
  </template>
25
13
 
26
14
  <script setup lang="ts">
27
- import { ref, onMounted, onUnmounted } from 'vue'
28
- import type { HeroSlideProps, HeroSlideEmits, SlideItem } from './type'
15
+ import { ref } from 'vue'
16
+ import { randomString } from '@/utils/common'
17
+ import Setting from './setting.vue'
18
+ import Operate from '@/components/Operate/index.vue'
19
+ import QuickLinks from '@/components/QuickLinks/index.vue'
20
+ import Swiper from '@/components/Swiper/index.vue'
29
21
 
30
22
  // 定义组件名称
31
23
  defineOptions({
32
24
  name: 'HeroSlide'
33
25
  })
34
26
 
35
- const props = withDefaults(defineProps<HeroSlideProps>(), {
36
- autoPlayInterval: 3000,
37
- showIndicators: true,
38
- autoPlay: true
39
- })
40
-
41
- const emit = defineEmits<HeroSlideEmits>()
27
+ const props = defineProps({
28
+ modelValue: {
29
+ type: Object,
30
+ default: () => {}
31
+ },
42
32
 
43
- const currentSlide = ref(0)
44
- const slides = ref<SlideItem[]>([
45
- { title: '轮播图标题 1', description: '这是第一张轮播图的描述内容' },
46
- { title: '轮播图标题 2', description: '这是第二张轮播图的描述内容' },
47
- { title: '轮播图标题 3', description: '这是第三张轮播图的描述内容' }
48
- ])
33
+ // 是否预览
34
+ isPreview: {
35
+ type: Boolean,
36
+ default: false
37
+ }
38
+ })
49
39
 
50
- let autoPlayTimer: number | null = null
40
+ const emit = defineEmits(['update:modelValue', 'handleDelete', 'handleCopy'])
41
+
42
+ const handleInit = () => {
43
+ if (props.modelValue && props.modelValue.data) return // 有数据不用初始化
44
+ const data = {
45
+ id: props.modelValue?.id || randomString(),
46
+ type: 'HeroSlide',
47
+ readOnly: props.modelValue?.readOnly || false,
48
+ data: [
49
+ {
50
+ id: randomString(),
51
+ type: 'Banners',
52
+ data: [
53
+ {
54
+ id: randomString(),
55
+ type: 'Image',
56
+ title: '耀华国际教育学校浙江桐乡',
57
+ imgSrc: 'https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png',
58
+ alt: '',
59
+ link: 'https://www.baidu.com',
60
+ },
61
+ {
62
+ id: randomString(),
63
+ type: 'Video',
64
+ title: '耀华国际教育学校浙江桐乡',
65
+ imgSrc: 'https://osswebsite-test.cedim.cn/media-library/ywies-tx/images/high-school-test/home/different_1_optim.png',
66
+ alt: '',
67
+ link: '',
68
+ videoSrc: 'https://mvideo.ycyw.com/2e1a9441vodgzp1253458132/a31402d51397757891052265568/SW8B19vOtzMA.mp4'
69
+ },
70
+ ]
71
+ },
72
+ {
73
+ id: randomString(),
74
+ type: 'Links',
75
+ data: [
76
+ {
77
+ id: randomString(),
78
+ text: '了解更多',
79
+ url: 'https://www.baidu.com',
80
+ isExternal: false
81
+ }
82
+ ]
83
+ }
84
+ ]
85
+ }
86
+ emit('update:modelValue', data)
87
+ }
51
88
 
52
- const goToSlide = (index: number) => {
53
- currentSlide.value = index
54
- emit('change', index)
55
- }
89
+ const isHover = ref<boolean>(false);
90
+ const showSetting = ref<boolean>(false);
56
91
 
57
- const nextSlide = () => {
58
- currentSlide.value = (currentSlide.value + 1) % slides.value.length
59
- emit('change', currentSlide.value)
92
+ const handleDelete = () => {
93
+ emit('handleDelete', props.modelValue.id)
60
94
  }
61
95
 
62
- const startAutoPlay = () => {
63
- if (props.autoPlay) {
64
- autoPlayTimer = window.setInterval(nextSlide, props.autoPlayInterval)
65
- }
96
+ const handleCopy = () => {
97
+ emit('handleCopy', props.modelValue)
66
98
  }
67
99
 
68
- const stopAutoPlay = () => {
69
- if (autoPlayTimer) {
70
- clearInterval(autoPlayTimer)
71
- autoPlayTimer = null
72
- }
100
+ const swiperRef = ref<typeof Swiper>()
101
+ const updateSwiper = () => {
102
+ swiperRef.value?.initSwiper()
73
103
  }
74
104
 
75
- onMounted(() => {
76
- startAutoPlay()
77
- })
78
-
79
- onUnmounted(() => {
80
- stopAutoPlay()
81
- })
105
+ handleInit()
82
106
  </script>
83
107
 
84
- <style scoped>
108
+ <style lang="scss" scoped>
85
109
  .hero-slide {
86
110
  position: relative;
87
- width: 100%;
88
- height: 300px;
89
111
  overflow: hidden;
90
- border-radius: 12px;
91
- box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
92
- }
93
-
94
- .slide-container {
95
- position: relative;
96
- width: 100%;
97
- height: 100%;
98
- }
99
-
100
- .slide-item {
101
- position: absolute;
102
- top: 0;
103
- left: 0;
104
- width: 100%;
105
- height: 100%;
106
- display: flex;
107
- flex-direction: column;
108
- justify-content: center;
109
- align-items: center;
110
- background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
111
- color: white;
112
- opacity: 0;
113
- transition: opacity 0.5s ease-in-out;
114
- text-align: center;
115
- padding: 20px;
116
- box-sizing: border-box;
117
- }
118
-
119
- .slide-item.active {
120
- opacity: 1;
121
- }
122
-
123
- .slide-item h2 {
124
- margin: 0 0 16px 0;
125
- font-size: 2rem;
126
- font-weight: 600;
127
- }
128
-
129
- .slide-item p {
130
- margin: 0;
131
- font-size: 1.1rem;
132
- opacity: 0.9;
133
- max-width: 600px;
134
- }
135
-
136
- .slide-indicators {
137
- position: absolute;
138
- bottom: 20px;
139
- left: 50%;
140
- transform: translateX(-50%);
141
- display: flex;
142
- gap: 8px;
143
- }
144
-
145
- .indicator {
146
- width: 12px;
147
- height: 12px;
148
- border-radius: 50%;
149
- background: rgba(255, 255, 255, 0.5);
150
- cursor: pointer;
151
- transition: background 0.3s ease;
152
- }
153
-
154
- .indicator.active {
155
- background: white;
156
- }
157
-
158
- .indicator:hover {
159
- background: rgba(255, 255, 255, 0.8);
160
112
  }
161
113
  </style>
@@ -0,0 +1,435 @@
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
+ <!-- 子组件属性 -->
8
+ <div class="setting-body">
9
+ <div class="setting-item" v-for="item in data.data" :key="item.id">
10
+ <p class="item-name">{{ item.type }}</p>
11
+
12
+ <template v-if="item.type === 'Banners'">
13
+ <draggable
14
+ v-model="item.data"
15
+ :component-data="{
16
+ tag: 'div',
17
+ type: 'transition-group',
18
+ name: !drag ? 'flip-list' : null
19
+ }"
20
+ v-bind="bannerDragOptions"
21
+ :disabled="!shouldShowDragHandle(item.data)"
22
+ @start="drag = true"
23
+ @end="drag = false"
24
+ item-key="id"
25
+ >
26
+ <template #item="{ element: banner }">
27
+ <div
28
+ class="item-button draggable-item"
29
+ :class="{ 'sortable-disabled': !shouldShowDragHandle(item.data) }"
30
+ :key="item.id"
31
+ >
32
+ <div class="btn-group">
33
+ <div
34
+ v-if="shouldShowDragHandle(item.data)"
35
+ class="drag-handle"
36
+ >
37
+ <icon-drag-arrow class="drag-icon" />
38
+ </div>
39
+ <icon-delete class="btn-delete" @click="handleDeleteBanner(item.data, item.id)" />
40
+ </div>
41
+
42
+ <p class="item-name">{{ banner.type }}</p>
43
+ <a-input class="mt-2" v-model="banner.title" placeholder="标题" allow-clear />
44
+ <a-input class="mt-2" v-model="banner.alt" placeholder="图片alt" allow-clear />
45
+ <a-input class="mt-2" v-model="banner.link" placeholder="链接" allow-clear />
46
+
47
+ <template v-if="banner.type === 'Image'">
48
+ <img class="item-img" :src="banner.imgSrc" />
49
+ <div class="mt-2 flex items-center">
50
+ <a-input v-model="banner.imgSrc" placeholder="请输入图片链接" allow-clear />
51
+ <a-upload class="fit-content" :show-file-list="false" action="/" />
52
+ </div>
53
+ </template>
54
+ <template v-else>
55
+ <video class="item-img" :src="banner.videoSrc" controls></video>
56
+ <div class="mt-2 flex items-center">
57
+ <a-input v-model="banner.videoSrc" placeholder="请输入视频链接" allow-clear />
58
+ <a-upload class="fit-content" :show-file-list="false" action="/" />
59
+ </div>
60
+ <img class="item-img" :src="banner.imgSrc" />
61
+ <div class="mt-2 flex items-center">
62
+ <a-input v-model="banner.imgSrc" placeholder="视频封面" allow-clear />
63
+ <a-upload class="fit-content" :show-file-list="false" action="/" />
64
+ </div>
65
+ </template>
66
+ <a-checkbox class="mt-2" :model-value="banner.isExternal">是否外部链接</a-checkbox>
67
+ </div>
68
+ </template>
69
+ </draggable>
70
+ <a-button-group class="mt-2" type="primary">
71
+ <a-button size="mini" type="outline" @click="handleAddBanner(item.data, 'Image')"><template #icon><icon-plus /></template> 图片 </a-button>
72
+ <a-button size="mini" type="outline" @click="handleAddBanner(item.data, 'Video')"><template #icon><icon-plus /></template> 视频 </a-button>
73
+ </a-button-group>
74
+ </template>
75
+
76
+ <template v-if="item.type === 'Links'">
77
+ <draggable
78
+ v-model="item.data"
79
+ :component-data="{
80
+ tag: 'div',
81
+ type: 'transition-group',
82
+ name: !drag ? 'flip-list' : null
83
+ }"
84
+ v-bind="linkDragOptions"
85
+ :disabled="!shouldShowDragHandle(item.data)"
86
+ @start="drag = true"
87
+ @end="drag = false"
88
+ item-key="id"
89
+ >
90
+ <template #item="{ element: link }">
91
+ <div
92
+ class="item-button draggable-item"
93
+ :class="{ 'sortable-disabled': !shouldShowDragHandle(item.data) }"
94
+ :key="link.id"
95
+ >
96
+ <div class="btn-group">
97
+ <div
98
+ v-if="shouldShowDragHandle(item.data)"
99
+ class="drag-handle"
100
+ >
101
+ <icon-drag-arrow class="drag-icon" />
102
+ </div>
103
+ <icon-delete class="btn-delete" @click="handleDeleteLink(item.data, link.id)" />
104
+ </div>
105
+
106
+ <a-link href="link">{{ link.text }}</a-link>
107
+ <div class="item-action flex items-center">
108
+ <a-input class="action-text" v-model="link.text" placeholder="按钮文本" allow-clear />
109
+ <a-input v-model="link.url" placeholder="按钮链接" allow-clear />
110
+ </div>
111
+ <a-checkbox :model-value="link.isExternal">是否外部链接</a-checkbox>
112
+ </div>
113
+ </template>
114
+ </draggable>
115
+ <div class="item-add-btn flex items-center" @click="handleAddLink(item.data)">
116
+ <icon-plus />
117
+ <span class="btn-text">添加链接</span>
118
+ </div>
119
+ </template>
120
+ </div>
121
+ </div>
122
+ </div>
123
+ </a-drawer>
124
+ </template>
125
+
126
+ <script lang="ts" setup>
127
+ import { ref, computed } from 'vue'
128
+ import draggable from 'vuedraggable'
129
+ import { randomString } from '@/utils/common'
130
+
131
+ // 拖拽相关状态
132
+ const drag = ref(false)
133
+
134
+ // 不同类型的拖拽配置选项
135
+ const bannerDragOptions = computed(() => ({
136
+ animation: 200,
137
+ group: 'banners', // banner专用分组
138
+ disabled: false,
139
+ ghostClass: 'ghost'
140
+ }))
141
+
142
+ const linkDragOptions = computed(() => ({
143
+ animation: 200,
144
+ group: 'links', // 链接专用分组
145
+ disabled: false,
146
+ ghostClass: 'ghost'
147
+ }))
148
+
149
+ // 检查是否应该显示拖拽图标
150
+ const shouldShowDragHandle = (list: any[]) => {
151
+ return list && list.length > 1
152
+ }
153
+
154
+ defineProps({
155
+ show: {
156
+ type: Boolean,
157
+ default: false
158
+ },
159
+
160
+ data: {
161
+ type: Object,
162
+ default: () => {}
163
+ }
164
+ })
165
+
166
+ const emit = defineEmits(['update:show', 'updateSwiper']);
167
+
168
+ const handleCancel = () => {
169
+ emit('update:show', false);
170
+ }
171
+
172
+ const handleAddBanner = (list: any[], type: string) => {
173
+ list.push({
174
+ id: randomString(),
175
+ type,
176
+ imgSrc: '',
177
+ title: '',
178
+ alt: '',
179
+ link: '',
180
+ videoSrc: type === 'Video' ? '' : undefined
181
+ })
182
+
183
+ emit('updateSwiper')
184
+ }
185
+
186
+ const handleDeleteBanner = (list: any[], id: string) => {
187
+ list.splice(list.findIndex(item => item.id === id), 1)
188
+ emit('updateSwiper')
189
+ }
190
+
191
+ const handleAddLink = (list: any[]) => {
192
+ list.push({
193
+ id: randomString(),
194
+ text: '查看更多',
195
+ url: undefined,
196
+ isExternal: false
197
+ })
198
+ }
199
+
200
+ const handleDeleteLink = (list: any[], id: string) => {
201
+ list.splice(list.findIndex(item => item.id === id), 1)
202
+ }
203
+ </script>
204
+
205
+ <style lang="scss" scoped>
206
+ .setting-content {
207
+ .setting-header {
208
+ padding-bottom: 12px;
209
+
210
+ .header-title {
211
+ width: 120px;
212
+ padding-right: 12px;
213
+ text-align: right;
214
+ }
215
+ }
216
+
217
+ .setting-body {
218
+ margin-top: 12px;
219
+
220
+ .setting-item {
221
+ position: relative;
222
+ padding: 16px 12px;
223
+ background: #f0f2f5;
224
+ border-radius: 8px;
225
+ margin-bottom: 20px;
226
+
227
+ .btn-group {
228
+ position: absolute;
229
+ right: 0;
230
+ top: 0;
231
+ display: flex;
232
+ align-items: center;
233
+ padding: 4px;
234
+
235
+ .btn-delete {
236
+ padding: 4px;
237
+ font-size: 24px;
238
+ cursor: pointer;
239
+ }
240
+ }
241
+
242
+ .item-name {
243
+ font-size: 16px;
244
+ font-weight: 600;
245
+ padding-bottom: 10px;
246
+ border-bottom: 1px solid #fff;
247
+ }
248
+
249
+ .item-title {
250
+ padding: 12px 0 8px 0;
251
+ font-size: 14px;
252
+ font-weight: 600;
253
+ }
254
+
255
+ .arco-input-wrapper {
256
+ background: #fff;
257
+ }
258
+
259
+ .item-button {
260
+ position: relative;
261
+ padding: 12px 8px 4px;
262
+ background: #fff;
263
+ border-radius: 4px;
264
+ margin: 4px 0;
265
+ transition: all 0.3s ease;
266
+
267
+ &.draggable-item {
268
+ cursor: move;
269
+
270
+ &:hover {
271
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
272
+ transform: translateY(-1px);
273
+ }
274
+
275
+ // 当禁用拖拽时,不显示拖拽效果
276
+ &.sortable-disabled {
277
+ cursor: default;
278
+
279
+ &:hover {
280
+ box-shadow: none;
281
+ transform: none;
282
+ }
283
+ }
284
+ }
285
+
286
+ .arco-input-wrapper {
287
+ background: #f2f3f5;
288
+ }
289
+ }
290
+
291
+ // 拖拽相关样式
292
+ .flip-list-move {
293
+ transition: transform 0.5s;
294
+ }
295
+
296
+ .no-move {
297
+ transition: transform 0s;
298
+ }
299
+
300
+ .ghost {
301
+ opacity: 0.5;
302
+ background: #c8ebfb;
303
+ }
304
+
305
+ .list-group {
306
+ min-height: 20px;
307
+ }
308
+
309
+ .list-group-item {
310
+ cursor: move;
311
+ }
312
+
313
+ .list-group-item i {
314
+ cursor: pointer;
315
+ }
316
+
317
+ .item-action {
318
+ padding: 10px 0;
319
+
320
+ .action-text {
321
+ width: 150px;
322
+ margin-right: 8px;
323
+ }
324
+ }
325
+
326
+ .item-add-btn {
327
+ display: inline-block;
328
+ padding: 2px 8px;
329
+ margin-top: 5px;
330
+ font-size: 11px;
331
+ color: #165dff;
332
+ border-radius: 4px;
333
+ font-weight: 600;
334
+ border: 1px solid #165dff;
335
+ cursor: pointer;
336
+ }
337
+
338
+ .item-img {
339
+ margin-top: 12px;
340
+ height: 160px;
341
+ }
342
+
343
+ .fit-content {
344
+ width: fit-content;
345
+ }
346
+
347
+ .item-img-list {
348
+ .img-list-item {
349
+ margin: 4px 0;
350
+ position: relative;
351
+ padding: 8px;
352
+ border-radius: 4px;
353
+ transition: all 0.3s ease;
354
+ background: #fff;
355
+ border-radius: 4px;
356
+
357
+ &.draggable-item {
358
+ cursor: move;
359
+
360
+ &:hover {
361
+ box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
362
+ transform: translateY(-1px);
363
+ }
364
+
365
+ // 当禁用拖拽时,不显示拖拽效果
366
+ &.sortable-disabled {
367
+ cursor: default;
368
+
369
+ &:hover {
370
+ box-shadow: none;
371
+ transform: none;
372
+ }
373
+ }
374
+ }
375
+
376
+ .arco-input-wrapper {
377
+ background: #f2f3f5;
378
+ }
379
+
380
+ .img-drag-handle {
381
+ top: 0 !important;
382
+ }
383
+ }
384
+
385
+ .item-img-box {
386
+ margin-right: 12px;
387
+ position: relative;
388
+ width: 133px;
389
+ height: 100px;
390
+
391
+ .item-img-dlete {
392
+ position: absolute;
393
+ padding: 8px;
394
+ font-size: 32px;
395
+ top: -16px;
396
+ right: -16px;
397
+ color: red;
398
+ cursor: pointer;
399
+ }
400
+ }
401
+
402
+ .small-img {
403
+ margin: 0;
404
+ height: 100px;
405
+ object-fit: cover;
406
+ }
407
+
408
+ .item-right {
409
+ padding-top: 24px;
410
+ }
411
+ }
412
+ }
413
+ }
414
+
415
+ .drag-handle {
416
+ padding: 4px;
417
+ cursor: grab;
418
+ padding: 4px;
419
+ border-radius: 4px;
420
+
421
+ &:hover {
422
+ background-color: #f0f2f5;
423
+ }
424
+
425
+ &:active {
426
+ cursor: grabbing;
427
+ }
428
+
429
+ .drag-icon {
430
+ font-size: 16px;
431
+ color: #86909c;
432
+ }
433
+ }
434
+ }
435
+ </style>
@@ -1,19 +1,10 @@
1
1
  export interface HeroSlideProps {
2
- /** 自动播放间隔时间(毫秒) */
3
- autoPlayInterval?: number
4
- /** 是否显示指示器 */
5
- showIndicators?: boolean
6
- /** 是否启用自动播放 */
7
- autoPlay?: boolean
2
+ /** 双向绑定的值 */
3
+ modelValue: any
8
4
  }
9
5
 
10
6
  export interface HeroSlideEmits {
11
- (e: 'change', index: number): void
12
- (e: 'click', index: number): void
13
- }
14
-
15
- export interface SlideItem {
16
- title: string
17
- description: string
18
- image?: string
7
+ (e: 'update:modelValue', value: any): void
8
+ (e: 'handleDelete', value: string | number): void
9
+ (e: 'handleCopy', value: any): void
19
10
  }