init
This commit is contained in:
1
wx214944c362629fc7/components/imgDrag/imgDrag.js
Normal file
1
wx214944c362629fc7/components/imgDrag/imgDrag.js
Normal file
File diff suppressed because one or more lines are too long
1
wx214944c362629fc7/components/imgDrag/imgDrag.json
Normal file
1
wx214944c362629fc7/components/imgDrag/imgDrag.json
Normal file
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{}}
|
||||
16
wx214944c362629fc7/components/imgDrag/imgDrag.wxml
Normal file
16
wx214944c362629fc7/components/imgDrag/imgDrag.wxml
Normal 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>
|
||||
1
wx214944c362629fc7/components/imgDrag/imgDrag.wxss
Normal file
1
wx214944c362629fc7/components/imgDrag/imgDrag.wxss
Normal 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}
|
||||
Reference in New Issue
Block a user