提交 b445f526 编写于 作者: 雪洛's avatar 雪洛

fix(uni-app-x web): 修复部分情况下picker-view、picker-view-column值显示错误并额外触发了change事件的Bug#1009

上级 254a8891
......@@ -116,9 +116,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
const resizeSensorRef: Ref<ComponentPublicInstance | null> = ref(null)
const initIndicatorHeight = () => {
const resizeSensor = resizeSensorRef.value as ComponentPublicInstance
indicatorHeight.value = (
__X__ ? resizeSensor : resizeSensor.$el
).offsetHeight
indicatorHeight.value = resizeSensor.$el.offsetHeight
}
if (__PLATFORM__ !== 'app') {
onMounted(initIndicatorHeight)
......
......@@ -72,8 +72,7 @@ export default /*#__PURE__*/ defineBuiltInComponent({
const resizeSensorRef: Ref<ComponentPublicInstance | null> = ref(null)
const onMountedCallback = () => {
const resizeSensor = resizeSensorRef.value as ComponentPublicInstance
resizeSensor &&
(state.height = (__X__ ? resizeSensor : resizeSensor.$el).offsetHeight)
resizeSensor && (state.height = resizeSensor.$el.offsetHeight)
}
if (__PLATFORM__ !== 'app') {
onMounted(onMountedCallback)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册