上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页
摘要: ## 组件化 -工程化 组件化 模块化命名规则:组件定义时,名称可以是短横线,也可以是驼峰式 1 假如是驼峰式命名,使用组件的时候,只能在字符串模板中用驼峰式 不能再普通的标签模板中,普通的标签模板中只能用短横线 短行线到处都可以使用基础使用——全局定义组件方式================维护自身的数据与方法======... 阅读全文
posted @ 2020-06-08 16:50 小海_macro 阅读(691) 评论(0) 推荐(0) 编辑
摘要: ## vue 响应原理# 对象 1;对象新增的属性,不具有响应式。 2:对象本存在属性,具有响应式。 3: 属性是数组,数组的普通元素通过索引修改 不会进行响应式; 但如果数组元素也是一个对象,则该对象具有响应式。 4: 属性值是数组,通过调用push\splice\shift...具有响应式,并且 阅读全文
posted @ 2020-06-08 11:58 小海_macro 阅读(996) 评论(0) 推荐(0) 编辑
摘要: //计算属性:本质上是一个函数 实现某种功能或者得到某个结果;使用的时候当作数据属性一样来用 {{reverseStr}} {{reverseStr1()}} {{reverseStr}} {{reverseStr1()}}{{result}}{{result}}{{comKey}}===================================================... 阅读全文
posted @ 2020-06-08 10:18 小海_macro 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 【1】绑定数据================================================let vm = new Vue({el: "#app",data() {return {username: 'macro' } },methods: {handle(event) {this.username = event.targe... 阅读全文
posted @ 2020-06-07 21:30 小海_macro 阅读(205) 评论(0) 推荐(0) 编辑
摘要: ## 前端三大框架 vue react angular## 学源码:更好的使用vue## vue:渐进式 1 js框架 框架 vs库 vue-core + components + vue-router + vuex[复杂项目] + vue-cli 2 mvvm框架 mvc:model view controller view... 阅读全文
posted @ 2020-06-07 19:30 小海_macro 阅读(158) 评论(0) 推荐(0) 编辑
摘要: let Promise = require('./myPromise'); //导入自己实现的类【1】简单resolve() reject() throw new Error(‘error’)// 构造函数中核心步骤try {executorCallback(resolve, reject); } catch (e) {//executorCallback执行发生异常... 阅读全文
posted @ 2020-06-07 18:02 小海_macro 阅读(118) 评论(0) 推荐(0) 编辑
摘要: 【1】基础应用——单次调用const fs = require('fs');//Promise初始化为:等待状态 pendinglet promise = new Promise((resolve, reject) => {console.log('start...');//异步任务fs.readFile('./callback/a.txt', 'utf-8', function(err, dat... 阅读全文
posted @ 2020-06-07 10:30 小海_macro 阅读(127) 评论(0) 推荐(0) 编辑
摘要: 异步发展流程 高阶函数解决异步问题 发布订阅和观察者模式 Promise核心应用、实现{ 主要核心:解决异步问题 } generator async + awaitAOPfunction say(who) {console.log(who + " is saying...");};Function.prototype.before = functi... 阅读全文
posted @ 2020-06-06 23:34 小海_macro 阅读(106) 评论(0) 推荐(0) 编辑
摘要: baseurl.parse():将url字符串转换为url对象 =第二个参数为true, query被转换为了一个对象url.format():将url对象格式化为url 字符串url.resolve():用于解析,接受两个参数,拼接简单用户管理系统剖析:【1】单独封装操作数据库js文件//监听请求事件require('./model/index.js');const Student = r... 阅读全文
posted @ 2020-06-06 18:10 小海_macro 阅读(298) 评论(0) 推荐(0) 编辑
摘要: art-template:解决拼接字符串更加方便【1】简单字符串应用str = ` ${student[index].name} ${student[index].sex} `;【2】与文件内容关联const template = require('art-template');const path = requir... 阅读全文
posted @ 2020-06-06 14:52 小海_macro 阅读(212) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 16 下一页