会员
周边
捐助
新闻
博问
闪存
赞助商
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
you1you
博客园
首页
新随笔
管理
2017年7月27日
vue.js 源代码学习笔记 ----- helpers.js
摘要: /* @flow */ import { parseFilters } from './parser/filter-parser' export function baseWarn (msg: string) { console.error(`[Vue parser]: ${msg}`) } export function pluckModuleFunction ( modules...
阅读全文
posted @ 2017-07-27 17:04 you1you
阅读(663)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- codegenEvents.js
摘要: /* @flow */ const fnExpRE = /^\s*([\w$_]+|\([^)]*?\))\s*=>|^function\s*\(/ const simplePathRE = /^\s*[A-Za-z_$][\w$]*(?:\.[A-Za-z_$][\w$]*|\['.*?']|\[".*?"]|\[\d+]|\[[A-Za-z_$][\w$]*])*\s*$/ // key...
阅读全文
posted @ 2017-07-27 17:03 you1you
阅读(283)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- codegen.js
摘要: /* @flow */ import { genHandlers } from './events' import { baseWarn, pluckModuleFunction } from '../helpers' import baseDirectives from '../directives/index' import { camelize } from 'shared/util' ...
阅读全文
posted @ 2017-07-27 17:02 you1you
阅读(1015)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- decoder
摘要: /* @flow */ let decoder export function decode (html: string): string { decoder = decoder || document.createElement('div') decoder.innerHTML = html return decoder.textContent }
阅读全文
posted @ 2017-07-27 17:01 you1you
阅读(529)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- fillter-parse.js
摘要: /* @flow */ export function parseFilters (exp: string): string { let inSingle = false let inDouble = false let inTemplateString = false let inRegex = false let curly = 0 let square = 0 ...
阅读全文
posted @ 2017-07-27 17:00 you1you
阅读(342)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- html-parse.js
摘要: /** * Not type-checking this file because it's mostly vendor code. */ /*! * HTML Parser By John Resig (ejohn.org) * Modified by Juriy "kangax" Zaytsev * Original code by Erik Arvidsson, Mozilla...
阅读全文
posted @ 2017-07-27 16:59 you1you
阅读(2102)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- text-parse.js
摘要: /* @flow */ import { cached } from 'shared/util' import { parseFilters } from './filter-parser' //找到{{abc}}这样的 const defaultTagRE = /\{\{((?:.|\n)+?)\}\}/g //.+的意义是最小匹配, 找到符合的马上结束 //正则的元字符 ^ $ . ...
阅读全文
posted @ 2017-07-27 16:58 you1you
阅读(562)
评论(0)
推荐(0)
编辑
vue.js 源代码学习笔记 ----- keep-alives
摘要: /* @flow */ import { callHook } from 'core/instance/lifecycle' import { getFirstComponentChild } from 'core/vdom/helpers/index' const patternTypes = [String, RegExp] function matches (pattern: str...
阅读全文
posted @ 2017-07-27 16:57 you1you
阅读(406)
评论(0)
推荐(0)
编辑