0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

vue.js disabled ボタン

Posted at

指定した箇所(hakensaki)が未入力だったら
ボタンを押せなくする

hoge.vue

<el-form>

    <el-form-item label="派遣先を入力して下さい" prop="hakensaki">
        <el-input
                v-model="hakensaki">
        </el-input>
    </el-form-item>

<el-button type="primary" @click="hoge" :disabled="!hakensaki">予約する</el-button>


</el-form>

//略

data() {
    return {
        hakensaki:'',

':disabled="!hakensaki"'

haknesaki が無けりゃ disabled をオンにしろ
ってことで。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?