我一直在使用jquery输入掩码,通过更新到最新版本
最近,作者发布了最新版本3.60,这是amd
(function (factory) { if (typeof define === 'function' && define.amd) { define("jquery.inputmask", ['jquery'], factory); } else { factory(jQuery); } }(function ($) { if ($.fn.inputmask === undefined) {
当我包含已定义的路径时,在require定义中,它会抛出错误
jquery.inputmask未定义。如果有人使用过最新版本,请知道如何使用bundle amd文件,请帮助
github原始文件网址 https://rawgit.com/RobinHerbots/jquery.inputmask/3.x/dist/jquery.inputmask.bundle.min.js
由于
答案 0 :(得分:0)
https://github.com/RobinHerbots/jquery.inputmask#usage
请看本节。
<script src="jquery.js" type="text/javascript"></script>
<script src="inputmask.js" type="text/javascript"></script>
<script src="jquery.inputmask.js" type="text/javascript"></script>
and add this to re
paths: {
...
"dependencyLib": "../dist/inputmask/dependencyLib",
"inputmask": "../dist/inputmask/inputmask",
...
}
for mee this looks like this
paths: {
inputmask : 'jquery.inputmask/dist/inputmask/inputmask',
dependencyLib : 'jquery.inputmask/dist/inputmask//dependencyLib',
jQueryInputmask : 'jquery.inputmask/dist/inputmask/jquery.inputmask',
}