|
@@ -1,4 +1,3 @@
|
|
|
-import { useRect } from '@vant/use'
|
|
|
import { PropType, defineComponent } from 'vue'
|
|
|
import styles from './index.module.less'
|
|
|
import { useResizeObserver } from '@vueuse/core'
|
|
@@ -64,12 +63,10 @@ export default defineComponent({
|
|
|
} else {
|
|
|
this.divStyle.bottom = this.offsetBottom || '0px'
|
|
|
}
|
|
|
-
|
|
|
try {
|
|
|
useResizeObserver((this as any).$refs.div2, (entries: any) => {
|
|
|
const entry = entries[0]
|
|
|
const { height } = entry.contentRect
|
|
|
- // console.log(height, 'height')
|
|
|
if (Math.abs(height - this.heightV) > 1) {
|
|
|
setTimeout(() => {
|
|
|
this.__initHeight(height)
|
|
@@ -122,7 +119,11 @@ export default defineComponent({
|
|
|
]}
|
|
|
style={[this.divStyle, this.sectionStyle]}
|
|
|
>
|
|
|
- <div ref="div2">{this.$slots.default && this.$slots.default()}</div>
|
|
|
+ <div ref="div2">
|
|
|
+ <div class={styles.pad}>
|
|
|
+ {this.$slots.default && this.$slots.default()}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</div>
|
|
|
)
|