im-ui-mobile 0.1.19 → 0.1.20

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.
@@ -51,9 +51,9 @@
51
51
  </view>
52
52
 
53
53
  <!-- 文件列表 -->
54
- <view v-if="showList && fileList.length > 0" class="im-upload__list">
55
- <view v-for="(file, index) in fileList" :key="file.uid" class="im-upload__item"
56
- :class="`im-upload__item--${listType}`">
54
+ <view class="im-upload__list">
55
+ <view v-if="showList && fileList.length > 0" v-for="(file, index) in fileList" :key="file.uid"
56
+ class="im-upload__item" :class="`im-upload__item--${listType}`">
57
57
  <!-- 图片列表 -->
58
58
  <template v-if="listType === 'picture'">
59
59
  <view class="im-upload__item-preview">
@@ -121,6 +121,10 @@
121
121
  </view>
122
122
  </template>
123
123
  </view>
124
+
125
+ <view v-if="!type" class="im-upload__default" @tap="handleUploadTap">
126
+ <im-icon type="custom" name="+" customClass="im-upload__default-icon" />
127
+ </view>
124
128
  </view>
125
129
 
126
130
  <!-- 上传提示 -->
@@ -297,7 +301,7 @@ const props = withDefaults(defineProps<Props>(), {
297
301
  }
298
302
  },
299
303
 
300
- showList: false,
304
+ showList: true,
301
305
  listType: 'picture',
302
306
  removable: true,
303
307
  previewable: true,
@@ -751,6 +755,26 @@ defineExpose({
751
755
  font-size: 28rpx;
752
756
  }
753
757
 
758
+ .im-upload__default {
759
+ margin-top: 20rpx;
760
+ display: flex;
761
+ align-items: center;
762
+ justify-content: center;
763
+ width: 180rpx;
764
+ height: 180rpx;
765
+ border: 4rpx dashed #dcdfe6;
766
+ border-radius: 20rpx;
767
+ background-color: #fafafa;
768
+ transition: all 0.3s;
769
+
770
+ &-icon {
771
+ color: #dcdfe6;
772
+ font-size: 200rpx;
773
+ margin-top: -20rpx;
774
+ }
775
+ }
776
+
777
+
754
778
  .im-upload__card {
755
779
  display: flex;
756
780
  flex-direction: column;
@@ -856,8 +880,8 @@ defineExpose({
856
880
 
857
881
  .im-upload__item-preview {
858
882
  position: relative;
859
- width: 200rpx;
860
- height: 200rpx;
883
+ width: 184rpx;
884
+ height: 184rpx;
861
885
  border-radius: 8rpx;
862
886
  overflow: hidden;
863
887
  border: 1rpx solid #ebeef5;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "im-ui-mobile",
3
- "version": "0.1.19",
3
+ "version": "0.1.20",
4
4
  "description": "A Vue3.0 + Typescript instant messaging component library for Uniapp",
5
5
  "type": "module",
6
6
  "main": "index.js",