固定底部

This commit is contained in:
lmj
2022-11-24 17:10:48 +08:00
parent 6e4a15cfb6
commit 93a880e6e8
2 changed files with 57 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
<template>
<!--添加文章-->
<view class="" >
<view class="" style="background-color: #fff;height: 100vh;" >
<u-toast ref="messager"></u-toast>
<view>
<!-- <page-title :showBack="true">发文章</page-title> -->
@@ -29,6 +29,9 @@
<!-- <view v-if="hasKeyword" class="row">
<u--input :height="25" maxlength="20" placeholder-style="font-size:30upx;color:#c1c1c1;font-weight: normal;" v-model="article.keyword" placeholder="关键字"></u--input>
</view> -->
<view v-if="hasSummary" class="row">
<u--textarea placeholder="摘要" maxlength="150" placeholder-style="font-size:30upx;color:#c1c1c1;font-weight: normal;" border="surround" v-model="article.summary" ></u--textarea>
</view>
@@ -43,38 +46,42 @@
@ready="onEditorReady">
</editor>
</view>
<view style="padding-left: 0upx;display: flex;">
<!-- <view class="addbtn" v-if="!hasKeyword"><u-icon name="plus" @click="addKeyword()" label="关键字"></u-icon> </view> -->
<view class="addbtn" v-if="!cover" style="margin-left: 28upx;"><u-icon @click="addcover()" name="plus" label="封面"></u-icon> </view>
<view class="addbtn" v-if="!hasSummary" style="margin-left: 28upx;"><u-icon @click="addSummary()" name="plus" label="摘要"></u-icon> </view>
</view>
</view>
<view>
<view style="display: flex;justify-content:space-around;">
<view class="Articleicon">
<text class="editor-btn" @tap="insertImage()">
<image src="../../static/images/article/image.png" mode=""></image>
</text>
</view>
<view class="Articleicon">
<text class="editor-btn" @tap="undo()">
<image src="../../static/images/icon/artleft.png" mode=""></image>
</text>
</view>
<view class="Articleicon">
<text class="editor-btn" @tap="redo()">
<image src="../../static/images/icon/artright.png" mode=""></image>
</text>
</view>
<view class="Articleicon">
<text class="editor-btn" @tap="clear()">
<image src="../../static/images/icon/del.png" mode=""></image>
</text>
</view>
</view>
</view>
</view>
</view>
</view>
<view style="padding-left: 0upx;display: flex;position: fixed;bottom: 130upx;">
<!-- <view class="addbtn" v-if="!hasKeyword"><u-icon name="plus" @click="addKeyword()" label="关键字"></u-icon> </view> -->
<view class="addbtn" v-if="!cover" style="margin-left: 28upx;"><u-icon @click="addcover()" name="plus" label="封面"></u-icon> </view>
<view class="addbtn" v-if="!hasSummary" style="margin-left: 28upx;"><u-icon @click="addSummary()" name="plus" label="摘要"></u-icon> </view>
</view>
<view class="box-bottom">
<view style="display: flex;justify-content:space-around;">
<view class="Articleicon">
<text class="editor-btn" @tap="insertImage()">
<image src="../../static/images/article/image.png" mode=""></image>
</text>
</view>
<view class="Articleicon">
<text class="editor-btn" @tap="undo()">
<image src="../../static/images/icon/artleft.png" mode=""></image>
</text>
</view>
<view class="Articleicon">
<text class="editor-btn" @tap="redo()">
<image src="../../static/images/icon/artright.png" mode=""></image>
</text>
</view>
<view class="Articleicon">
<text class="editor-btn" @tap="clear()">
<image src="../../static/images/icon/del.png" mode=""></image>
</text>
</view>
</view>
</view>
@@ -312,6 +319,16 @@
</script>
<style lang="scss" scoped>
.content{
}
.box-bottom{
width: 100%;
height: 80upx;
position: fixed;
bottom: 0;
}
.title-left{
font-size: 32upx;
color: #7F7F7F;
@@ -349,9 +366,7 @@
height: 35upx;
}
}
.editor-content{
min-height: 600upx;
}
.feed-title{
display: flex;
justify-content: space-between;

View File

@@ -1,6 +1,6 @@
<template>
<!--添加文章-->
<view style="background-color: #fff;">
<view style="background-color: #fff;height: 100vh;">
<u-toast ref="messager"></u-toast>
<!-- <page-title :showBack="true">提问题</page-title> -->
<view style="background-color: #fff;padding-top: 18rpx;">
@@ -31,7 +31,7 @@
</view>
</view>
</view>
<view>
<view class="box-bottom">
<view style="display: flex;justify-content:space-around;">
<view class="Articleicon">
@@ -235,6 +235,12 @@
</script>
<style lang="scss" scoped>
.box-bottom{
width: 100%;
height: 120upx;
position: fixed;
bottom: 0;
}
::v-deep .content{
height: 750upx !important;
}