vue
hst_gogogo
这个作者很懒,什么都没留下…
展开
-
vue.js:634 [Vue warn]: Failed to resolve directive: obgcolors (found in <Anonymous>)
定义了两个自定义局部指令v-color(设置文字颜色)和v-obgColors(设置背景色),结果v-color可以正常使用,v-obgColors却不行,一度以为自己少写了什么,原来是因为自定义局部指令中内部不能出现大写字母(第一个字母可以大写,如:Obgcolors,中间大写不行,如:obgColors);所以你可以写成Obgcolors也可以写成obgcolors,但是不可以写成obgC...原创 2019-07-02 17:06:01 · 3291 阅读 · 0 评论 -
Vue自定义指令
首先需要注意的是不管是自定义局部属性还是全局属性,中间的字母都不要大写(首字母可以),否则会报错具体内容如有需要请看另一篇文章:https://blog.csdn.net/hst_gogogo/article/details/94456377一、自定义全局指令自定义全局指令需在Vue.directive()中注册,需要接受两个参数,分别为'指令名称'以及钩子函数(4个:bind、i...原创 2019-07-02 17:58:34 · 237 阅读 · 0 评论 -
vue实现tab切换
<!DOCTYPE html><html> <head> <meta charset="UTF-8"> <title></title> <style> *{ margin: 0; ...原创 2019-07-03 09:25:16 · 1415 阅读 · 0 评论 -
Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_5_vuex__.a.store is not a constructor
使用Vuex时浏览器控制台报错,页面空白:Uncaught TypeError: __WEBPACK_IMPORTED_MODULE_5_vuex__.a.store is not a constructor解决:在vuex.store构造器中Store要大写原创 2019-07-11 15:41:52 · 4904 阅读 · 2 评论