文章分类 -  vue

vue
摘要:vue ui 安装less、less-loader 、sass、sass-loader版本过高报错可以参考一下办法 方法一 方法二 阅读全文
posted @ 2021-11-10 15:02 onceweb 阅读(186) 评论(0) 推荐(0)
摘要:一、前端项目初始化步骤 1、安装vue脚手架 2、通过vue脚手架创建项目 3、配置vue路由 4、配置element-ui组件库 5、配置axios库 6、初始化git远程仓库 7、将本地项目托管到GitHub或者码云中 二、可视化创建项目步骤(配置上面1、2、3) 第一步,选择文件夹位置 第二步 阅读全文
posted @ 2021-11-09 22:04 onceweb 阅读(604) 评论(0) 推荐(0)
摘要:第一步、准备好以下文件 一、phpstudy20161103 二、postman汉化地址 三、vue_api_server 四、电商管理系统api接口地址 第二步 ①安装phpstudy启动,然后暂定Apache,只留MySQL启动状态 ②点击MySQL管理器导入文件夹vue_api_server/ 阅读全文
posted @ 2021-11-08 23:49 onceweb 阅读(187) 评论(0) 推荐(0)
摘要:ref reactive 阅读全文
posted @ 2021-10-20 21:06 onceweb 阅读(122) 评论(0) 推荐(0)
摘要:![](https://img2020.cnblogs.com/blog/1917830/202110/1917830-20211019221745153-1674368487.png)![](https://img2020.cnblogs.com/blog/1917830/202110/1917830-20211019221527927-1634837718.png) 阅读全文
posted @ 2021-10-19 22:18 onceweb 阅读(28) 评论(0) 推荐(0)
摘要:简化 阅读全文
posted @ 2021-10-19 22:07 onceweb 阅读(29) 评论(0) 推荐(0)
摘要:![](https://img2020.cnblogs.com/blog/1917830/202110/1917830-20211019220253128-1260659164.png)![](https://img2020.cnblogs.com/blog/1917830/202110/1917830-20211019220317815-631329111.png) 阅读全文
posted @ 2021-10-19 22:04 onceweb 阅读(38) 评论(0) 推荐(0)
摘要:第二中,对象解构 阅读全文
posted @ 2021-10-19 21:37 onceweb 阅读(18) 评论(0) 推荐(0)
摘要:![](https://img2020.cnblogs.com/blog/1917830/202108/1917830-20210815192946212-250689857.png)![](https://img2020.cnblogs.com/blog/1917830/202108/1917830-20210815193116959-1624162359.png) 阅读全文
posted @ 2021-08-15 19:31 onceweb 阅读(210) 评论(0) 推荐(0)
摘要:mutations 里面只允许写同步代码,不允许写异步代码 actions 是异步操作数据 阅读全文
posted @ 2021-08-15 19:10 onceweb 阅读(310) 评论(0) 推荐(0)
摘要:正常编写 更优雅的编写 h(参数1,参数2,参数3) 参数1代表:标签(h1) 参数2代表:标签属性(name='aa') 参数3代表:内容==>this.$slot或者获取默认里面的插槽this.$slots.default(),第三个参数可以无限嵌套 阅读全文
posted @ 2021-08-15 13:48 onceweb 阅读(99) 评论(0) 推荐(0)
摘要:传送门可以把组件里的一些dom元素直接的传送到其他的位置(id='hello')进行展示,这个是一个很神奇的功能 阅读全文
posted @ 2021-08-15 13:35 onceweb 阅读(40) 评论(0) 推荐(0)
摘要:处理自定义的mixin优先级 阅读全文
posted @ 2021-08-15 13:19 onceweb 阅读(22) 评论(0) 推荐(0)
摘要:如果涉及到一个属性要经过很多层的传递的话就用 如果要拿data里面的值要写成function,但是他的数据是一次性的,而不是响应式的 阅读全文
posted @ 2021-08-15 11:41 onceweb 阅读(44) 评论(0) 推荐(0)
摘要:动态组件 异步组件 阅读全文
posted @ 2021-08-15 09:41 onceweb 阅读(96) 评论(0) 推荐(0)
摘要:component('list',{ data(){ return { list:[1,2,3] } }, template:<div> <slot v-for='item in list' :item="item"/> </div> }) const app = Vue.createApp({ t 阅读全文
posted @ 2021-08-15 09:23 onceweb 阅读(39) 评论(0) 推荐(0)
摘要:tag="li" //标签 linkActiveClass:'active'//class const Home = () => import('../components/Home')//异步加载组件 一、在routes中添加,例如:meta添加title const routes = [ {pa 阅读全文
posted @ 2021-07-09 22:27 onceweb 阅读(4900) 评论(0) 推荐(0)
摘要:module Error (from ./node_modules/eslint-loader/index.js) error:unexpected console statement (no-console) at src/components/xxx.vue:xx:xx 在xxx.vue文件中的 阅读全文
posted @ 2021-07-09 22:05 onceweb 阅读(28) 评论(0) 推荐(0)
摘要:let obj = [10,20,30] // 创建一个代理对象 let obj2 = new Proxy(obj, { get(target, property){ // 什么时候执行?? // 获取obj2的属性的时候执行这里的代码 // target就是obj // property就是想要获 阅读全文
posted @ 2021-07-04 22:11 onceweb 阅读(190) 评论(0) 推荐(0)
摘要:Vue的双向数据绑定原理:借助Object.defineProperty()对数据进行劫持,并结合发布-订阅者模式,来实现双向数据绑定 <div id='app'> <input type="text" v-model="iptVal"> <p>{{iptVal}}</p> </div> <scri 阅读全文
posted @ 2021-07-04 22:10 onceweb 阅读(243) 评论(0) 推荐(0)