@@ -138,8 +138,6 @@
mixins: [myMixins],
data() {
return {
- keyboardHeight: 0,
- isKeyboardShow: false,
addReportShow: false,
remark: '',
showDatetime: false,
@@ -170,10 +168,6 @@
await this.getDetail();
await this.getRecordList();
await this.scrollToBottom();
- window.addEventListener('resize', this.handleResize);
- },
- beforeDestroy() {
- window.removeEventListener('resize', this.handleResize);
},
activated() {
let addressSession = sessionStorage.getItem('reportAddress');
@@ -186,30 +180,6 @@
}
},
methods: {
- handleResize() {
- const windowHeight = window.innerHeight;
- const docHeight = document.documentElement.clientHeight;
- const diff = docHeight - windowHeight;
- if (diff > 100) {
- this.keyboardHeight = diff + 20;
- this.isKeyboardShow = true;
- this.scrollToTextarea();
- } else {
- this.keyboardHeight = 0;
- this.isKeyboardShow = false;
- }
- },
- scrollToTextarea() {
- this.$nextTick(() => {
- const textarea = document.querySelector('.report_textarea');
- if (textarea && this.isKeyboardShow) {
- textarea.scrollIntoView({
- behavior: 'smooth',
- block: 'center'
- });
- }
- });
- },
filter(type, options) {
if (type === 'minute') {
return options.filter((option) => option % 5 === 0);
@@ -580,7 +550,7 @@
}
.report_common_content {
margin-bottom: 27px;
- /*.report_textarea {
+ .report_textarea {
width: 100%;
box-sizing: border-box;
background: #F8FAFC;
@@ -589,23 +559,6 @@
border: 1px solid #E2EAF6;
padding: 10px;
font-size: 13px;
- }*/
- .report_textarea {
- width: 100%;
- box-sizing: border-box;
- background: #F8FAFC;
- border-radius: 6px;
- min-height: 95px;
- border: 1px solid #E2EAF6;
- padding: 15px;
- font-size: 14px;
- line-height: 1.6;
- resize: none;
- outline: none;
- &:focus {
- border-color: #267EF0;
- box-shadow: 0 0 0 2px rgba(38, 126, 240, 0.1);
- }
}
}
}
@@ -625,14 +578,4 @@
::v-deep .van-popup__close-icon {
color: #0F458E;
}
- ::v-deep .van-popup--bottom {
- position: fixed !important;
- bottom: 0 !important;
- left: 0 !important;
- right: 0 !important;
- transform: none !important;
- max-height: 80vh !important;
- overflow-y: auto;
- -webkit-overflow-scrolling: touch;
- }