This commit is contained in:
2024-08-22 12:47:21 +08:00
commit dedb40f497
373 changed files with 5393 additions and 0 deletions

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1 @@
{"component":true,"usingComponents":{}}

View File

@@ -0,0 +1,16 @@
<view class="drag-container" style="width: {{containerRes.width}}px; height: {{containerRes.height}}px;">
<view catch:longpress="longPress" catch:touchend="touchEnd" catch:touchmove="touchMove" class="drag-item drag-item-transition" mark:index="{{index}}" mark:key="{{item.key}}" style="transform: translate({{index===currentIndex?tranX:item.tranX}}px, {{index===currentIndex?tranY:item.tranY}}px); z-index: {{index===currentIndex?10:1}}; width: {{previewSize}}px; height: {{previewSize}}px;" wx:for="{{dragImgList}}" wx:key="id">
<image bindtap="preview" class="drag-item-img" data-list="{{dragImgList}}" data-src="{{item.src}}" mode="aspectFill" src="{{item.src}}"></image>
<view catch:tap="deleteImg" class="drag-item-delete" mark:key="{{item.key}}">
<view class="drag-item-delete_default" style="{{deleteStyle}}">x</view>
</view>
</view>
<view bindtap="uploadImage" class="drag-item drag-upload" hidden="{{dragImgList.length>=maxCount}}" style="transform: translate({{uploadPosition.tranX}}px, {{uploadPosition.tranY}}px); width: {{previewSize}}px; height: {{previewSize}}px;">
<view class="drag-upload_solt">
<slot name="upload"></slot>
</view>
<view class="drag-upload_default">
<text>+</text>
</view>
</view>
</view>

View File

@@ -0,0 +1 @@
.drag-container{position:relative}.drag-item{left:0;position:absolute;top:0}.drag-item-transition{transition:-webkit-transform .1s;transition:transform .1s;transition:transform .1s,-webkit-transform .1s}.drag-item-img{height:100%;width:100%}.drag-item-delete{position:absolute;right:0;top:0}.drag-item-delete_default{background-color:rgba(0,0,0,.7);border-radius:0 0 0 12px;color:#fefefe;display:-webkit-flex;display:flex;height:15px;justify-content:center;line-height:10px;width:21px}.drag-upload .drag-upload_solt:empty+.drag-upload_default{border:2px dashed;box-sizing:border-box;display:block;font-size:70px;font-weight:700;height:100%;line-height:100%;text-align:center;width:100%}.drag-upload .drag-upload_default{display:none}