
Vue
vue
firstuc
这个作者很懒,什么都没留下…
展开
-
04-mybatis statement执行
statement注册org.apache.ibatis.builder.MapperBuilderAssistant#addMappedStatement//namespace+methodnameid = applyCurrentNamespace(id, false);org.apache.ibatis.session.Configuration#addMappedStatemen...原创 2020-03-26 10:16:25 · 138 阅读 · 0 评论 -
vue事件处理机制
绑定methods上下文function initMethods (vm: Component, methods: Object) { for (const key in methods) { // 将method的this绑定为当前构建对象 vm[key] = typeof methods[key] !== 'function' ? noop : bind(methods[...原创 2020-03-20 09:37:27 · 294 阅读 · 0 评论 -
vue 响应式之data
测试案例 it('should proxy and be reactive', done => { const data = { msg: 'foo' } const vm = new Vue({ data, template: '<div>{{ msg }}</div>' }).$mount() expec...原创 2020-03-18 10:07:51 · 225 阅读 · 0 评论 -
vue异步组件原理
vue 中支持的异步组件的用法//回调函数Vue.component('async-webpack-example', function (resolve) { // 这个特殊的 `require` 语法将会告诉 webpack // 自动将你的构建代码切割成多个包,这些包 // 会通过 Ajax 请求加载 require(['./my-async-component'], r...原创 2020-03-17 16:21:26 · 2264 阅读 · 0 评论 -
vue component创建关键环节
测试Vue实例 const vm = new Vue({ template: '<test></test>', components: { test: { data () { return { a: 123 } }, template: '&l...原创 2020-03-17 15:10:31 · 281 阅读 · 0 评论 -
Vue 全局注册component&directive&filter机制
// src/shared/constants.jsexport const ASSET_TYPES = [ 'component', 'directive', 'filter']// 添加功能// src/core/global-api/assets.jsexport function initAssetRegisters (Vue: GlobalAPI) { /**...原创 2020-03-16 19:04:30 · 223 阅读 · 0 评论 -
vue $options初始化
vue实例化时,对$options进行初始化vue/src/core/instance/init.js Vue.prototype._init = function (options?: Object) { const vm: Component = this // a uid vm._uid = uid++ let startTag, endTag ...原创 2020-03-16 16:22:04 · 743 阅读 · 0 评论 -
vue $mount
触发机制自动方式new Vue({ data: { msg: 'hi' }, template: '<div>{{ msg }}</div>', el: '#app' })// vue/src/core/instance/init.jsVue.prototype._init = function (optio...原创 2020-03-16 11:33:18 · 207 阅读 · 0 评论 -
vue methods&props&data 如何映射到this
vue/src/core/instance/state.jsexport function initState (vm: Component) { vm._watchers = [] const opts = vm.$options // map props to this if (opts.props) initProps(vm, opts.props) // map me...原创 2020-03-15 20:00:37 · 336 阅读 · 0 评论