|
|
|
@ -1903,73 +1903,118 @@ |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}, |
|
|
|
|
// watchKeyBoardHeight() { |
|
|
|
|
// uni.onKeyboardHeightChange(res => { |
|
|
|
|
// if(res.height) { |
|
|
|
|
// const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// // 选择我们想要的元素 |
|
|
|
|
// query.select('#page').boundingClientRect(data => { |
|
|
|
|
// // data是选中元素的大小及位置信息 |
|
|
|
|
// if (data) { |
|
|
|
|
// // 元素的高度 |
|
|
|
|
// const height = data.height; |
|
|
|
|
// this.boxHeight = height + res.height |
|
|
|
|
// console.log('盒子的高度:', height); |
|
|
|
|
// } |
|
|
|
|
// }).exec(); // 执行查询 |
|
|
|
|
// } |
|
|
|
|
// }) |
|
|
|
|
// }, |
|
|
|
|
focus() { |
|
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// 选择我们想要的元素 |
|
|
|
|
query.select('#page').boundingClientRect(data => { |
|
|
|
|
// data是选中元素的大小及位置信息 |
|
|
|
|
if (data) { |
|
|
|
|
// 元素的高度 |
|
|
|
|
const height = data.height; |
|
|
|
|
if (this.isEdit) { |
|
|
|
|
|
|
|
|
|
this.boxHeight = height + 200 |
|
|
|
|
} |
|
|
|
|
console.log('盒子的高度:', height); |
|
|
|
|
} |
|
|
|
|
}).exec(); // 执行查询 |
|
|
|
|
// const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// // 选择我们想要的元素 |
|
|
|
|
// query.select('#page').boundingClientRect(data => { |
|
|
|
|
// // data是选中元素的大小及位置信息 |
|
|
|
|
// if (data) { |
|
|
|
|
// // 元素的高度 |
|
|
|
|
// const height = data.height; |
|
|
|
|
// if (this.isEdit) { |
|
|
|
|
// uni.onKeyboardHeightChange((res) => { |
|
|
|
|
// if (res.height) { |
|
|
|
|
// this.boxHeight = height + res.height |
|
|
|
|
// // this.inputTop = res.height; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// // uni.onKeyboardHeightChange((res) => { |
|
|
|
|
// // if (res.height) { |
|
|
|
|
// // this.boxHeight = height - res.height |
|
|
|
|
// // // this.inputTop = res.height; |
|
|
|
|
// // } |
|
|
|
|
// // }); |
|
|
|
|
// console.log('盒子的高度:', height); |
|
|
|
|
// } |
|
|
|
|
// }).exec(); // 执行查询 |
|
|
|
|
}, |
|
|
|
|
blur() { |
|
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// 选择我们想要的元素 |
|
|
|
|
query.select('#page').boundingClientRect(data => { |
|
|
|
|
// data是选中元素的大小及位置信息 |
|
|
|
|
if (data) { |
|
|
|
|
// 元素的高度 |
|
|
|
|
const height = data.height; |
|
|
|
|
if (this.isEdit) { |
|
|
|
|
|
|
|
|
|
this.boxHeight = height - 200 |
|
|
|
|
} |
|
|
|
|
console.log('盒子的高度:', height); |
|
|
|
|
} |
|
|
|
|
}).exec(); // 执行查询 |
|
|
|
|
// const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// // 选择我们想要的元素 |
|
|
|
|
// query.select('#page').boundingClientRect(data => { |
|
|
|
|
// // data是选中元素的大小及位置信息 |
|
|
|
|
// if (data) { |
|
|
|
|
// // 元素的高度 |
|
|
|
|
// const height = data.height; |
|
|
|
|
// if (this.isEdit) { |
|
|
|
|
// uni.onKeyboardHeightChange((res) => { |
|
|
|
|
// if (res.height) { |
|
|
|
|
// this.boxHeight = height - res.height |
|
|
|
|
// // this.inputTop = res.height; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// // uni.onKeyboardHeightChange((res) => { |
|
|
|
|
// // if (res.height) { |
|
|
|
|
// // this.boxHeight = height - res.height |
|
|
|
|
// // // this.inputTop = res.height; |
|
|
|
|
// // } |
|
|
|
|
// // }); |
|
|
|
|
// console.log('盒子的高度:', height); |
|
|
|
|
// } |
|
|
|
|
// }).exec(); // 执行查询 |
|
|
|
|
}, |
|
|
|
|
focus2() { |
|
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// 选择我们想要的元素 |
|
|
|
|
query.select('#page').boundingClientRect(data => { |
|
|
|
|
// data是选中元素的大小及位置信息 |
|
|
|
|
if (data) { |
|
|
|
|
// 元素的高度 |
|
|
|
|
const height = data.height; |
|
|
|
|
if (this.isEditStep2) { |
|
|
|
|
|
|
|
|
|
this.boxHeight = height + 300 |
|
|
|
|
} |
|
|
|
|
console.log('盒子的高度:', height); |
|
|
|
|
} |
|
|
|
|
}).exec(); // 执行查询 |
|
|
|
|
// const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// // 选择我们想要的元素 |
|
|
|
|
// query.select('#page').boundingClientRect(data => { |
|
|
|
|
// // data是选中元素的大小及位置信息 |
|
|
|
|
// if (data) { |
|
|
|
|
// // 元素的高度 |
|
|
|
|
// const height = data.height; |
|
|
|
|
// if (this.isEditStep2) { |
|
|
|
|
// uni.onKeyboardHeightChange((res) => { |
|
|
|
|
// if (res.height) { |
|
|
|
|
// this.boxHeight = height + res.height |
|
|
|
|
// // this.inputTop = res.height; |
|
|
|
|
// } |
|
|
|
|
// }); |
|
|
|
|
// } |
|
|
|
|
// console.log('盒子的高度:', height); |
|
|
|
|
// } |
|
|
|
|
// }).exec(); // 执行查询 |
|
|
|
|
}, |
|
|
|
|
blur2() { |
|
|
|
|
const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// 选择我们想要的元素 |
|
|
|
|
query.select('#page').boundingClientRect(data => { |
|
|
|
|
// data是选中元素的大小及位置信息 |
|
|
|
|
if (data) { |
|
|
|
|
// 元素的高度 |
|
|
|
|
const height = data.height; |
|
|
|
|
if (this.isEditStep2) { |
|
|
|
|
|
|
|
|
|
this.boxHeight = height - 300 |
|
|
|
|
} |
|
|
|
|
console.log('盒子的高度:', height); |
|
|
|
|
} |
|
|
|
|
}).exec(); // 执行查询 |
|
|
|
|
// const query = uni.createSelectorQuery().in(this); |
|
|
|
|
|
|
|
|
|
// // 选择我们想要的元素 |
|
|
|
|
// query.select('#page').boundingClientRect(data => { |
|
|
|
|
// // data是选中元素的大小及位置信息 |
|
|
|
|
// if (data) { |
|
|
|
|
// // 元素的高度 |
|
|
|
|
// const height = data.height; |
|
|
|
|
// if (this.isEditStep2) { |
|
|
|
|
// uni.onKeyboardHeightChange((res) => { |
|
|
|
|
// if (res.height) { |
|
|
|
|
// this.boxHeight = height - res.height |
|
|
|
|
// // this.inputTop = res.height; |
|
|
|
|
// } |
|
|
|
|
// }); } |
|
|
|
|
// console.log('盒子的高度:', height); |
|
|
|
|
// } |
|
|
|
|
// }).exec(); // 执行查询 |
|
|
|
|
}, |
|
|
|
|
onLongPressZD(item) { |
|
|
|
|
if (this.nidZD == item.nid) { |
|
|
|
|