Commit 3961650c authored by Facius's avatar Facius

improvement: 开始考试也能滚动

parent 55c5616a
...@@ -34,7 +34,6 @@ ...@@ -34,7 +34,6 @@
/** /**
* circleProgress 环形进度条 * circleProgress 环形进度条
* @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。 * @description 展示操作或任务的当前进度,比如上传文件,是一个圆形的进度条。注意:此组件的percent值只能动态增加,不能动态减少。
* @tutorial https://www.uviewui.com/components/circleProgress.html
* @property {String Number} percent 圆环进度百分比值,为数值类型,0-100 * @property {String Number} percent 圆环进度百分比值,为数值类型,0-100
* @property {String} inactive-color 圆环的底色,默认为灰色(该值无法动态变更)(默认#ececec) * @property {String} inactive-color 圆环的底色,默认为灰色(该值无法动态变更)(默认#ececec)
* @property {String} active-color 圆环激活部分的颜色(该值无法动态变更)(默认#19be6b) * @property {String} active-color 圆环激活部分的颜色(该值无法动态变更)(默认#19be6b)
...@@ -43,7 +42,7 @@ ...@@ -43,7 +42,7 @@
* @property {String Number} duration 整个圆环执行一圈的时间,单位ms(默认呢1500) * @property {String Number} duration 整个圆环执行一圈的时间,单位ms(默认呢1500)
* @property {String} type 如设置,active-color值将会失效 * @property {String} type 如设置,active-color值将会失效
* @property {String} bg-color 整个组件背景颜色,默认为白色 * @property {String} bg-color 整个组件背景颜色,默认为白色
* @example <u-circle-progress active-color="#2979ff" :percent="80"></u-circle-progress> * @example <circle-progress active-color="#2979ff" :percent="80"></circle-progress>
*/ */
export default { export default {
name: 'circle-progress', name: 'circle-progress',
...@@ -105,7 +104,7 @@ export default { ...@@ -105,7 +104,7 @@ export default {
// #endif // #endif
widthPx: uni.upx2px(this.width), // 转成px后的整个组件的背景宽度 widthPx: uni.upx2px(this.width), // 转成px后的整个组件的背景宽度
borderWidthPx: uni.upx2px(this.borderWidth), // 转成px后的圆环的宽度 borderWidthPx: uni.upx2px(this.borderWidth), // 转成px后的圆环的宽度
startAngle: Math.PI * 0.84, // canvas画圆的起始角度,默认为3点钟方向,定位到12点钟方向 startAngle: Math.PI * 0.84, // canvas画圆的起始角度,默认为3点钟方向,定位到8点钟方向
progressContext: null, // 活动圆的canvas上下文 progressContext: null, // 活动圆的canvas上下文
newPercent: 0, // 当动态修改进度值的时候,保存进度值的变化前后值,用于比较用 newPercent: 0, // 当动态修改进度值的时候,保存进度值的变化前后值,用于比较用
oldPercent: 0, // 当动态修改进度值的时候,保存进度值的变化前后值,用于比较用 oldPercent: 0, // 当动态修改进度值的时候,保存进度值的变化前后值,用于比较用
......
...@@ -125,9 +125,10 @@ export default { ...@@ -125,9 +125,10 @@ export default {
.line-view { .line-view {
background-color: #e8ebf3; background-color: #e8ebf3;
height: 2rpx; height: 2rpx;
width: 100%; width: calc(100% + 60rpx);
margin-bottom: 40rpx; margin-bottom: 40rpx;
margin-top: 40rpx; margin-top: 40rpx;
margin-left: -30rpx;
} }
.pop-btn-view { .pop-btn-view {
......
...@@ -9,32 +9,34 @@ ...@@ -9,32 +9,34 @@
title-bold title-bold
></u-navbar> ></u-navbar>
<view class="content"> <view class="content">
<view class="head-view"> <view class="body-view">
<view class="image-view"> <view class="head-view">
<image class="image" :src="info.image || defaultImage"> </image <view class="image-view">
></view> <image class="image" :src="info.image || defaultImage"> </image
<view>{{ info.name }}</view> ></view>
</view> <view>{{ info.name }}</view>
<view class="line-view"></view>
<view class="list-view">
<view v-for="(value, key) in labels" :key="key" class="item-view">
<view class="left-view">{{ value }}</view>
<view>{{ info[key] }}</view>
</view> </view>
</view> <view class="line-view"></view>
<view class="line-view"></view> <view class="list-view">
<view class="tip-view" <view v-for="(value, key) in labels" :key="key" class="item-view">
>温馨提示:模拟考试中不能修改答案,没做错1道题扣2分,合格标准为90分。</view <view class="left-view">{{ value }}</view>
> <view>{{ info[key] }}</view>
<view class="bottom-view"> </view>
<u-button </view>
:customStyle="buttonStyle" <view class="line-view"></view>
@click="handleClick" <view class="tip-view"
type="primary" >温馨提示:模拟考试中不能修改答案,没做错1道题扣2分,合格标准为90分。</view
shape="circle"
> >
开始模拟 <view class="bottom-view">
</u-button> <u-button
:customStyle="buttonStyle"
@click="handleClick"
type="primary"
shape="circle"
>
开始模拟
</u-button>
</view>
</view> </view>
</view> </view>
</view> </view>
...@@ -91,6 +93,12 @@ export default { ...@@ -91,6 +93,12 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
::-webkit-scrollbar {
width: 0;
height: 0;
color: transparent;
display: none;
}
.begin-answer { .begin-answer {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
...@@ -101,66 +109,70 @@ export default { ...@@ -101,66 +109,70 @@ export default {
height: 100vh; height: 100vh;
.content { .content {
height: 100%; height: 100%;
margin: 70rpx 24rpx 44rpx 24rpx; overflow: auto;
background-color: #ffffff; padding-top: 100rpx;
border-radius: 12rpx 12rpx 0 0; .body-view {
padding: 0 30rpx 60rpx 30rpx; margin: 0rpx 24rpx 44rpx 24rpx;
.head-view { background-color: #ffffff;
width: 100%; border-radius: 12rpx;
display: flex; padding: 0 30rpx 60rpx 30rpx;
align-items: center; .head-view {
font-size: 32rpx; width: 100%;
font-weight: bold;
color: #191c27;
flex-direction: column;
margin-bottom: 40rpx;
.image-view {
margin-bottom: 20rpx;
display: flex; display: flex;
justify-content: center;
align-items: center; align-items: center;
padding: 4rpx; font-size: 32rpx;
width: 140rpx; font-weight: bold;
height: 140rpx; color: #191c27;
background-color: #ffffff; flex-direction: column;
border-radius: 140rpx; margin-bottom: 40rpx;
margin-top: -70rpx; .image-view {
.image { margin-bottom: 20rpx;
width: 136rpx; display: flex;
height: 136rpx; justify-content: center;
border-radius: 136rpx; align-items: center;
padding: 4rpx;
width: 140rpx;
height: 140rpx;
background-color: #ffffff;
border-radius: 140rpx;
margin-top: -70rpx;
.image {
width: 136rpx;
height: 136rpx;
border-radius: 136rpx;
}
} }
} }
} .line-view {
.line-view { background-color: #e8ebf3;
background-color: #e8ebf3; height: 2rpx;
height: 2rpx; }
} .list-view {
.list-view { padding: 20rpx 0;
padding: 20rpx 0; .item-view {
.item-view { margin: 30rpx 0;
margin: 30rpx 0; display: flex;
display: flex; justify-content: space-between;
justify-content: space-between; align-items: flex-start;
align-items: flex-start; color: #5a6073;
color: #5a6073; font-size: 28rpx;
font-size: 28rpx; text-align: right;
text-align: right; word-break: break-all;
word-break: break-all; .left-view {
.left-view { text-align: left;
text-align: left; color: #9ea5bb;
color: #9ea5bb; margin-right: 30rpx;
margin-right: 30rpx; flex-shrink: 0;
flex-shrink: 0; }
} }
} }
} .tip-view {
.tip-view { font-size: 26rpx;
font-size: 26rpx; color: #9ea5bb;
color: #9ea5bb; margin: 50rpx 0 210rpx 0;
margin: 50rpx 0 210rpx 0; }
} .bottom-btn {
.bottom-btn { }
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment