• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
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 阅读(679) 评论(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 阅读(292) 评论(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 阅读(1026) 评论(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 阅读(538) 评论(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 阅读(348) 评论(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 阅读(2121) 评论(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 阅读(573) 评论(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 阅读(414) 评论(0) 推荐(0)
 
 

博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3