This commit is contained in:
yanran200730
2022-05-31 17:31:54 +08:00
parent f931c3eabb
commit 0e53e350f4

View File

@@ -9,10 +9,9 @@
<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>
<div class="btns"> <div class="btns">
@@ -30,7 +29,6 @@
</div> </div>
</div> </div>
</div> </div>
</u-popup>
</div> </div>
</template> </template>
@@ -75,6 +73,7 @@
}, },
remove () { remove () {
this.$confirm('确定删除该条数据?').then(() => {
this.$emit('onLongpress', { this.$emit('onLongpress', {
type: this.type, type: this.type,
value: this.value, value: this.value,
@@ -84,12 +83,16 @@
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 {