Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

【bug】uni-data-picker组件在readonly属性为true时选项匹配错误 #988

Open
cucuzi opened this issue Jan 27, 2025 · 0 comments
Open

Comments

@cucuzi
Copy link

cucuzi commented Jan 27, 2025

版本信息

HbuilderX 4.45
uni-ui 1.5.7
vue3

代码片段

<template>
  <view>
    <uni-data-picker v-model="temperature" readonly placeholder="请选择最高气温" :localdata="temperaturePicker"></uni-data-picker>
  </view>
</template>
<script>
export default {
  data() {
    temperature: "25",
    temperaturePicker: []
  },
  onLoad(option) {
    for (let i = 50; i > -41; i--) {
      this.temperature.push({
        text: `${i}℃`,
        value: `${i}`
      });
    }
  }
}
</script>

实际结果

Image

预期结果

文本框中应该是25℃

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant