文件上传区域展开bug修复
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, watch, nextTick } from 'vue';
|
||||
import { ref, watch, nextTick, getCurrentInstance } from 'vue';
|
||||
|
||||
const props = defineProps({
|
||||
show: Boolean,
|
||||
@@ -26,11 +26,18 @@ const wrapStyle = ref({
|
||||
});
|
||||
|
||||
const contentRef = ref(null);
|
||||
const instance = getCurrentInstance();
|
||||
|
||||
// 获取高度(兼容 H5 + 小程序)
|
||||
function getContentHeight() {
|
||||
return new Promise((resolve) => {
|
||||
const query = uni.createSelectorQuery().in(this ? this : undefined);
|
||||
let query;
|
||||
// #ifdef MP-WEIXIN
|
||||
query = uni.createSelectorQuery().in(instance);
|
||||
// #endif
|
||||
// #ifndef MP-WEIXIN
|
||||
query = uni.createSelectorQuery();
|
||||
// #endif
|
||||
query
|
||||
.select('.content-inner')
|
||||
.boundingClientRect((data) => {
|
||||
|
||||
Reference in New Issue
Block a user