vue smart-select the text on the list is not updated after changing selected option by script
まだ誰も着手していません。
評価
- 難易度
- 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 にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- 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
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
antfu-collective/icones#398 ·
-
ECmail.com オープン
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
wesbos/burner-email-providers#554 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
radiantearth/stac-browser#1023 ·
-
HMR stops working オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
components-web-app/docs#92 ·