29973
This commit is contained in:
@@ -9,28 +9,26 @@
|
||||
<p v-if="item.type === 'text'">{{ item.value }}</p>
|
||||
<image v-else mode="widthFix" :src="item.value" />
|
||||
</div>
|
||||
<u-popup v-model="isShow" :closeable="false" border-radius="32" mode="bottom" @close="isShow = false, currIndex = -1">
|
||||
<div class="rich-bottom">
|
||||
<div class="top">
|
||||
<h2>{{ type === 'text' ? '编辑文本' : '上传拼图汇报' }}</h2>
|
||||
<image @click="isShow = false, currIndex = -1" src="../../images/down_boldw.png" />
|
||||
<div class="rich-bottom" :class="[isShow ? 'active' : '']">
|
||||
<div class="top">
|
||||
<h2>{{ type === 'text' ? '编辑文本' : '编辑图片' }}</h2>
|
||||
<image @click="isShow = false, currIndex = -1" src="../../images/down_boldw.png" />
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn-item" hover-class="bg-hover" @click="remove">
|
||||
<image src="../../images/remove-black.png" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
<div class="btns">
|
||||
<div class="btn-item" hover-class="bg-hover" @click="remove">
|
||||
<image src="../../images/remove-black.png" />
|
||||
<span>删除</span>
|
||||
</div>
|
||||
<div class="btn-item" hover-class="bg-hover" v-if="type === 'text'" @click="toEditText">
|
||||
<image src="../../images/xiugai.png" />
|
||||
<span>修改</span>
|
||||
</div>
|
||||
<div class="btn-item" hover-class="bg-hover" @click="toClipping" v-else>
|
||||
<image src="../../images/jiancai.png" />
|
||||
<span>剪裁</span>
|
||||
</div>
|
||||
<div class="btn-item" hover-class="bg-hover" v-if="type === 'text'" @click="toEditText">
|
||||
<image src="../../images/xiugai.png" />
|
||||
<span>修改</span>
|
||||
</div>
|
||||
<div class="btn-item" hover-class="bg-hover" @click="toClipping" v-else>
|
||||
<image src="../../images/jiancai.png" />
|
||||
<span>剪裁</span>
|
||||
</div>
|
||||
</div>
|
||||
</u-popup>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -75,21 +73,26 @@
|
||||
},
|
||||
|
||||
remove () {
|
||||
this.$emit('onLongpress', {
|
||||
type: this.type,
|
||||
value: this.value,
|
||||
index: this.currIndex,
|
||||
action: 'remove'
|
||||
})
|
||||
this.$confirm('确定删除该条数据?').then(() => {
|
||||
this.$emit('onLongpress', {
|
||||
type: this.type,
|
||||
value: this.value,
|
||||
index: this.currIndex,
|
||||
action: 'remove'
|
||||
})
|
||||
|
||||
this.currIndex = -1
|
||||
this.isShow = false
|
||||
this.currIndex = -1
|
||||
this.isShow = false
|
||||
}).catch(() => {
|
||||
})
|
||||
},
|
||||
|
||||
toClipping () {
|
||||
uni.navigateTo({
|
||||
url: `./Clipping?url=${encodeURIComponent(this.value)}`
|
||||
})
|
||||
|
||||
this.isShow = false
|
||||
},
|
||||
|
||||
onLongpress (item, index) {
|
||||
@@ -117,6 +120,17 @@
|
||||
}
|
||||
|
||||
.rich-bottom {
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 11;
|
||||
width: 100%;
|
||||
transform: translateY(100%);
|
||||
border-radius: 32px 32px 0px 0px;
|
||||
transition: all ease 0.4s;
|
||||
overflow: hidden;
|
||||
background: #fff;
|
||||
|
||||
.top {
|
||||
display: flex;
|
||||
position: relative;
|
||||
@@ -139,12 +153,16 @@
|
||||
height: 32px;
|
||||
transform: translateY(-50%);
|
||||
}
|
||||
|
||||
&.active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.btns {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
height: 216px;
|
||||
height: 246px;
|
||||
|
||||
div {
|
||||
display: flex;
|
||||
@@ -164,6 +182,10 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
transform: translateY(0);
|
||||
}
|
||||
}
|
||||
|
||||
.rich-item {
|
||||
|
||||
Reference in New Issue
Block a user