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