-
Notifications
You must be signed in to change notification settings - Fork 7
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
バーコードモーダルの選択/ボタンでcomponents/UIを利用する #993
base: main
Are you sure you want to change the base?
Conversation
v-modelってstringしか受け付けないってことでいいのでしょうか?ItemsPageのSortTypeも基本はstringで特定の値だけしか受け付けないように設定してあるものって認識で大丈夫でしょうか? |
昨日はやる気が出なかったので返信できませんでした。ごめんなさい
これは違くて受け取るコンポーネントの
部分ですね |
直しました! |
@@ -26,16 +23,25 @@ const emit = defineEmits<{ | |||
const toastStore = useToast() | |||
|
|||
const codeReader = new BrowserBarcodeReader() | |||
const inputs = ref<VideoInputDevice[]>([]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
残してほしいです
|
||
const initialize = async () => { | ||
try { | ||
const videoInputDevices = await codeReader.getVideoInputDevices() | ||
inputs.value = videoInputDevices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
残しといてほしいです
const videoEle = shallowRef<HTMLVideoElement>() | ||
const deviceOptions = ref<DeviceOption[]>([]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const deviceOptions = ref<DeviceOption[]>([]) | |
const deviceOptions = computed<DeviceOption[]>(() => inputs.map(v => ({ | |
key: v?.deviceId ?? '', | |
label: v?.label ?? 'no device name' | |
}))) |
かな?
computed
を使うと更新のし忘れがなくなるからこうしたいです
現状VideoInputDevice[]
はinitialize
でしか更新されてませんが今後ほかのところで更新することになるかもしれないので
セレクターの初期値を設定する部分がどうもうまくできてないようで、何も表示されません。他は見た目はちゃんと動いてると思います。