stellar-ui-plus 1.24.22 → 1.24.24

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.
@@ -7,6 +7,7 @@
7
7
  | `appType` | APP环境,版本号的最后一位为环境标识 | `string` | `` | - | - |
8
8
  | `btnText` | 立即体验按钮文本 | `string` | `立即体验` | - | - |
9
9
  | `appVersion` | 当前应用版本 | `string` | `` | - | `1.24.6` |
10
+ | `zIndex` | 弹窗层级 | `string/number` | `998` | - | `1.24.23` |
10
11
 
11
12
 
12
13
  #### Events
@@ -6,6 +6,7 @@ export interface AppUpdateProps {
6
6
  appType: string;
7
7
  btnText: string;
8
8
  appVersion: string;
9
+ zIndex: number;
9
10
  }
10
11
 
11
12
  export default {
@@ -58,5 +59,12 @@ export default {
58
59
  validator: (value: string) => {
59
60
  return typeof value === 'string';
60
61
  }
62
+ },
63
+ zIndex: {
64
+ type: [Number, String],
65
+ default: () => 998,
66
+ validator: (value: any) => {
67
+ return typeof value === 'number' || typeof value === 'string'
68
+ }
61
69
  }
62
70
  } satisfies Record<keyof AppUpdateProps, any>;
@@ -41,6 +41,13 @@
41
41
  "default": "",
42
42
  "version": "1.24.6"
43
43
  },
44
+ {
45
+ "name": "zIndex",
46
+ "description": "弹窗层级",
47
+ "type": "string/number",
48
+ "default": "998",
49
+ "version": "1.24.23"
50
+ },
44
51
  {
45
52
  "name": "[event]cancel",
46
53
  "description": "取消更新",
@@ -345,7 +345,7 @@ defineExpose({
345
345
  </script>
346
346
 
347
347
  <template>
348
- <view class="update-mask flex-center" v-if="open">
348
+ <view class="update-mask flex-center" :style="{ zIndex }" v-if="open">
349
349
  <view class="update-content">
350
350
  <image class="update-image" src="../../static/app_update_img.png"></image>
351
351
 
@@ -408,7 +408,7 @@ defineExpose({
408
408
  right: 0;
409
409
  bottom: 0;
410
410
  background-color: rgba(0, 0, 0, 0.5);
411
- z-index: 9999;
411
+ z-index: 998;
412
412
 
413
413
  .update-content {
414
414
  width: 694rpx;
@@ -188,6 +188,9 @@ const onClick = () => {
188
188
  </swiper-item>
189
189
  </swiper>
190
190
  </template>
191
+ <view class="media-preview-slot">
192
+ <slot></slot>
193
+ </view>
191
194
  </view>
192
195
  <view class="media-preview-footer">
193
196
  <view class="footer-index">
@@ -210,7 +213,7 @@ const onClick = () => {
210
213
  height: 100vh;
211
214
  background-color: #000;
212
215
  color: #fff;
213
- z-index: 9999999;
216
+ z-index: 997;
214
217
 
215
218
  .media-preview-content {
216
219
  width: 100%;
@@ -218,6 +221,7 @@ const onClick = () => {
218
221
  display: flex;
219
222
  align-items: center;
220
223
  justify-content: center;
224
+ position: relative;
221
225
 
222
226
  .preview-item {
223
227
  width: 100%;
@@ -237,6 +241,12 @@ const onClick = () => {
237
241
  max-height: 100%;
238
242
  }
239
243
  }
244
+ .media-preview-slot {
245
+ position: absolute;
246
+ bottom: 30rpx;
247
+ left: 50%;
248
+ transform: translateX(-50%);
249
+ }
240
250
  }
241
251
 
242
252
  .media-preview-footer {
@@ -214,6 +214,34 @@
214
214
  </script>
215
215
  ```
216
216
 
217
+ #### 媒体预览插槽
218
+
219
+ - 事件`previewChange`监听媒体预览区域切换,参数为当前预览的索引或者`null`;
220
+ - 插槽`media-preview`可自定义媒体预览区域底部内容
221
+
222
+ ```html
223
+ <ste-upload v-model="fileList2" uploadIcon="&#xe67e;" @preview-change="previewChange">
224
+ <template v-slot:media-preview>
225
+ <button>自定义</button>
226
+ </template>
227
+ </ste-upload>
228
+ <script lang="ts" setup>
229
+ import { ref, watch } from 'vue';
230
+ const fileList2 = ref([]);
231
+
232
+ watch(fileList2, fileList => {
233
+ setTimeout(() => {
234
+ fileList.forEach(item => {
235
+ item.status = 'success';
236
+ });
237
+ }, 1000);
238
+ });
239
+ const previewChange = (index: number | null) => {
240
+ console.log('previewChange', index);
241
+ };
242
+ </script>
243
+ ```
244
+
217
245
  ---$
218
246
 
219
247
  ### API
@@ -17,6 +17,7 @@ const emits = defineEmits<{
17
17
  (e: 'read', list: UploadFileType[]): void;
18
18
  (e: 'beforeDelete', index: number, suspend: () => void, next: () => void, stop: () => void): void;
19
19
  (e: 'delete', index: number, list: UploadFileType[]): void;
20
+ (e: 'preview-change', index: number | null): void;
20
21
  (e: 'open-preview'): void;
21
22
  (e: 'close-preview'): void;
22
23
  (e: 'click-item', i: number): void;
@@ -83,6 +84,7 @@ watch(
83
84
  } else {
84
85
  emits('open-preview');
85
86
  }
87
+ emits('preview-change', val);
86
88
  }
87
89
  );
88
90
 
@@ -264,7 +266,9 @@ const onMediaType = () => {
264
266
  </slot>
265
267
  </view>
266
268
  </view>
267
- <ste-media-preview :show="Boolean(previewIndex || previewIndex === 0)" :urls="cmpPreviewList" v-model:index="previewIndex" @close="setPreviewIndex(null)" />
269
+ <ste-media-preview :show="Boolean(previewIndex || previewIndex === 0)" :urls="cmpPreviewList" v-model:index="previewIndex" @close="setPreviewIndex(null)">
270
+ <slot name="media-preview"></slot>
271
+ </ste-media-preview>
268
272
  </view>
269
273
  </template>
270
274
  <style lang="scss" scoped>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellar-ui-plus",
3
- "version": "1.24.22",
3
+ "version": "1.24.24",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",