-
Notifications
You must be signed in to change notification settings - Fork 0
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
検索フォームの実装 #43
検索フォームの実装 #43
Conversation
https://icon-sets.iconify.design/mdi/at/ @のアイコンがあるので、 |
なるほど、よさそうです! |
そうですね。今あるやつはなくして、FormInputを改修する感じですね。 |
src/components/UI/FormInput.vue
Outdated
@@ -40,7 +40,9 @@ const handleInput = (event: Event) => { | |||
|
|||
<template> | |||
<div :class="$style.container" :data-has-anchor="props.hasAnchor"> | |||
<span v-if="props.hasAtmark" :class="$style.atmark"> @ </span> | |||
<div v-if="props.icon !== undefined" :class="$style.iconContainer"> |
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.
めっちゃ細かいんですが、typeof icon !== 'undefined'
の方がいいかもしれません。
参考: https://developer.mozilla.org/ja/docs/Web/JavaScript/Reference/Global_Objects/undefined
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.
strict modeではundefined
を上書きできないので元のままでも大丈夫ですね 🖖 ESMは常にstrict mode)
下を実行するとエラーになります
function f () {
"use strict";
undefined = 'po';
}
f();
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.
ありがとうございます 🙇♂️🙇♂️🙇♂️
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.
:yosa: :desu:
inputformと似たような感じになっちゃいましたけど大丈夫ですかねこれ