vue smart-select the text on the list is not updated after changing selected option by script
还没有人认领这个 Issue。
评估
- 难度
- 3/5
- 预计耗时
- 1-2 天
- 新手友好度
- 48/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 冷清
- 技术栈
- javascript
- 领域
- frontend
调研方向
从提供的 Vue 3.5.23 复现开始,使用 smart-select 组件、其 v-model 绑定以及通过脚本对 selectedId 的更改。在报告的 Chrome 配置中验证行为,然后跟踪 smart-select 的更新路径。完成的标准是:脚本运行后,列表标签从 Option 1 变为 Option 3,并且选择某个选项会一致地更新绑定值。
由索引模型根据 Issue 内容生成。
描述
- Framework7 version: 8.3.4
- Vue.js version: 3.5.23
- Platform and Target: window11 chrome browser
Describe the bug
smart-select, the text on the list is not updated after changing selected option by script, while the popup selected option is updated correctly.
<script setup>
import { reactive } from 'vue'
let input = reactive({
selectedId: 1,
options: [
{
id: 1,
text: 'Option 1',
},
{
id: 2,
text: 'Option 2',
},
{
id: 3,
text: 'Option 3',
},
],
})
setTimeout(() => {
input.selectedId = 3 // change selected option after 3 seconds
}, 3000)
</script>
<template>
<f7-app>
<f7-page>
<f7-list class="select-list">
<f7-list-item title="Options" smart-select :smart-select-params="{
openIn: 'popup',
closeOnSelect: true,
}">
<select v-model="input.selectedId">
<option v-for="obj in input.options" :key="obj.id" :value="obj.id" :selected="input.selectedId === obj.id">{{ obj.text }}</option>
</select>
</f7-list-item>
</f7-list>
</f7-page>
</f7-app>
</template>
<style lang="less">
body, html, #app {
width: 100%;
height: 100%;
overflow: hidden;
margin: 0;
padding: 0;
}
</style>
At the beginning, shows Option 1, a script will change it to Option 3 after 3 seconds.
3 seconds later, it is still Option 1
while the popup is updated correctly
clicking Option 3 in popup will not change the value outside, unless click Option 2.
- 主要语言
- JavaScript
- 星标
- 18.8k
- 派生
- 3.2k
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
framework7io/framework7 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 68/100
framework7io/framework7#4365 · 1 条评论 ·
-
propsHistory未关闭
难度 2/5 1-3 小时 新手友好度 72/100
framework7io/framework7#4347 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 64/100
framework7io/framework7#4222 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
framework7io/framework7#4175 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 65/100
framework7io/framework7#3969 · 3 条评论 ·
查看 framework7io/framework7 的全部 Issue
相似的 Issue
-
agent/quality hive/hosted-available-lke648397-260827-5n31 quality testing
难度 1/5 1 小时以内 新手友好度 90/100
维护者通常 1 天内回复
-
难度 2/5 半天 新手友好度 78/100
jaegertracing/jaeger-ui#4512 ·
维护者通常 1 天内回复
-
feedback simulation workshop
难度 2/5 1-3 小时 新手友好度 84/100
githubnext/gh-aw-workshop#3857 ·
维护者通常 2 天内回复
-
area-clientside-dartpad
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 72/100
quarkusio/extensions#3432 ·
维护者通常 1 天内回复