nativescript-vue - 使用 nativescript playground vue 禁用按钮条件
问题描述
当文本字段中没有输入任何内容时,我无法禁用提交按钮。这是我的结帐组件,它是一个子组件。
<template>
<StackLayout>
<Label class="h1 text-center" text="Cart" style="color:black" />
<Label class="h2 text-center" text="(select a lesson to remove it)"
style="color:black" />
<ListView for="lesson in cart" @itemTap="onItemTap"
style="color:black" height="auto" minHeight="250">
<v-template>
<StackLayout>
<Label :text="lesson.subject" />
<Label :text="`price: ${lesson.price}`" />
<Label :text="`spaces: ${lesson.availableInventory}`" />
</StackLayout>
</v-template>
</ListView>
<TextField style="color:black;" hint="name" v-model="order.name" />
<TextField style="color:black;" hint="phone" v-model="order.phone" />
<Button @tap="submitOrder" text="Submit Order">
</StackLayout>
</template>
解决方案
推荐阅读
- python - Python 请求:计算请求的完整大小
- listview - 如何在xamarin中做一个水平的tableview
- google-cloud-storage - 从 Kubernetes pod 直接将数据写入 Google Cloud Storage
- c# - 从存储过程中按名称读取返回参数
- oracle-jet - 如何在 rowExpander 点击时加载动态数据?
- c++ - 如何在 C++ 中将字符变量添加到字符数组
- ruby-on-rails - ruby on rails simple_format 添加
到粗体和斜体列表项 - c# - 失去焦点时WPF列表框选择不灰显
- php - 多对多关系库存发票
- sql-server - X & Y 更新场景