- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我真的很喜欢这个工具,因为它们简单紧凑。但有时我会遇到缺少插件/代码片段的问题(我的 JS 技能也很弱,通常我是后端开发人员),所以这是其中一种情况:
例如,我有这样一个简单的形式:
<div class="row">
<div class="six columns">
<label for="email">Contact email*</label>
<input v-model="email" class="u-full-width" type="email" id="email" placeholder="admin@exchange.com" name="email">
</div>
<div class="six columns">
<label for="date">Launch date*</label>
<input v-model="date" class="u-full-width" type="text" id="date" placeholder="June, 2014">
</div>
</div>
如你所见,我想让这个字段成为必需的,电子邮件输入应该是电子邮件格式,比如***@***.***
,日期字段可以是任何东西.
实现它的最佳方式是什么?我还找到了 3 个 Vue 插件,你最喜欢哪个?
感谢任何示例/片段/等
最佳答案
由于您来自后端并且不精通 JS(我也不是 :D)我建议您自己动手。你会学到更多。
我会这样做:
<input name="email" v-model="email" @keyup="validateEmail()" />
... vue component or instance ...
data: function() { // if you are doing this on Vue instance and not component then data property will look differently but if in component it has to be a function that returns an object
return {
email: ""
}
},
methods: {
validateEmail: function() {
console.log(this.email)
// here you have access to email input as it changes so you can use either regex or substring or some other string manipulation to determine if the string satisfies your criteria
}
关于css - 验证输入的最佳方式是什么(Skeleton + Vue.js)?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/42186494/
我想在我的网站页面的主要内容区域中添加一个图像和内容网格。 我有一个基本的两列模板,我想将网格放置在大内容区域中。一切正常,但是一旦我调整为纵向,我就会失去 div 之间的所有边距。我不太确定将这些项
在 https://symfony.com/doc/current/setup.html你被指示运行: composer create-project symfony/website-skeleton
1. 效果图 自己画一张图,原图 VS 骨架效果图如下: opencv logo原图 VS 骨架化效果图如下: 2. 源码 # 图像骨架化~import cv2import im
我正在尝试使用 Visual Studio 2015 设置一个 kinect 传感器(旧版本 - v1)。我确实下载了 SDK v2.0。 我正在尝试构建手势检测器类。我在网上找到了一些使用骨架类的源
我正在使用 Skeleton css 样板文件。我有以下 html: some content here... some bottome
我在生产环境中有一个巨大的数据库,我需要复制一份,但问题是数据超过 100Gb,下载备份是不可能的。我需要获取数据库的“骨架”图像。我所说的“骨架”是指,我需要获取数据库大纲,以便我可以通过运行 SQ
我正在查看 www.getsculpture.com。我的页眉和页脚应该跨越 100%。我可以在不“破坏”框架的情况下做到这一点吗?或者我应该将布局限制为 960px? 最佳答案 我意识到这是一篇较旧
我想为我们应该实现的对象文字声明一个“骨架”接口(interface)。 当时我们正在创建AttributeGettersSkeletonType ,我们不知道 getter 将返回什么类型 - 只知
我使用 curl | 在 Linux 上安装了 Meteor 的全新副本sh 命令,以及在 Windows 上使用 Meteor 客户端。 当我运行以下一系列命令时: $ meteor create
我广泛使用了 Bootstrap,并经常使用 css 类从移动 View 中隐藏各种元素。 Skeleton CSS 是否有类似的功能来隐藏移动设备上的内容? 最佳答案 使用下面的媒体查询示例: @m
我有这样的需求。这是我的家庭类快照。 它包含几个店铺形状。为此,我使用了这段代码: ArrayList points2 = new ArrayList(); points2.add(vertex.Ge
我喜欢Skeleton但我有几个问题: 为什么使用像素大小都可以使用相对/em 大小来实现? 这是因为它是实现 x 浏览器兼容性的唯一可靠方法吗? .. 因为使用 em 尺寸感觉更合适/面向 futu
是否可以运行 package.skeleton('pkgname')并拥有所有 .R文件最终在一个文件或一组文件中,而不是每个函数一个文件? 一位与我合作的开发人员问我为什么将每个函数放在一个单独的文
这个问题是关于 a few years ago 的没有可接受的答案。我想知道情况是否发生了变化,现在可以使用 Skeleton CSS带有固定的响应式侧边栏。最好不需要 Javascript。 我的H
尝试将子菜单项添加到导航中,但即使在导航中使用正确的 HTML,子菜单也不会显示。 它使用 Skeleton wordpress 主题,标题在需要时手动更新,但需要添加子菜单。 HTML:
我想更改 Skeleton CSS 网格中的断点。本质上,一旦浏览器达到 1000 像素,我希望右侧的列堆叠在左侧六列下方。这是我正在使用的示例代码:
现在我有两个使用“二分之一列”类的 div。 正如您在这里看到的,左侧底部的卡片仍然与右下角的卡片对齐。 我想要像这样的 Pinterest 样式,但我不知道怎么做,因为它们在不同的行中。 这是我的
我真的很喜欢这个工具,因为它们简单紧凑。但有时我会遇到缺少插件/代码片段的问题(我的 JS 技能也很弱,通常我是后端开发人员),所以这是其中一种情况: 例如,我有这样一个简单的形式:
我正在使用 Skeleton CSS Framework 创建一个表格,如下所示: V1504 Currently Active Jobs
我需要一个干净的框架,没有默认的演示和配置,以了解所有配置过程,从零开始,以及为 Symfony 2 打包创建。 谢谢! 最佳答案 下载 Standard Edition对于 Acme 演示,在该分发
我是一名优秀的程序员,十分优秀!