require(["vue","iView"],function UserLogin(Vue,iView){
var b = {
template:`
...........//iview html
`
data: ....
mothods{....}
}
var a = new vue(.....)
});
摸索了很久使用require加载vue同时并希望加载iview
报错
: Unknown custom element: <form-Item> - did you register the component correctly? For recursive components, make sure to provide the "name" option.
找了很久找不到办法
请指教 orz
这事我想了很久 我觉得有效的一个办法是 用webpack 把iview 打包成个 lib 通过 define 引入下面的 amdDfine 是 我定义了个全局 类似
你把这个 打包后的js 放在 requirejs 后面 使用 require(['iView'],function(iView){
})
自然会有