├── 10 └── vuex-study │ ├── .babelrc │ ├── dist │ └── bundle.js │ ├── package.json │ ├── src │ ├── App.vue │ ├── components │ │ ├── amount.vue │ │ └── counter.vue │ ├── index.html │ ├── lib │ │ └── mui │ │ │ ├── css │ │ │ ├── mui.css │ │ │ └── mui.min.css │ │ │ ├── fonts │ │ │ └── mui.ttf │ │ │ └── js │ │ │ ├── mui.js │ │ │ └── mui.min.js │ ├── main.js │ └── router.js │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt ├── .idea ├── .name ├── copyright │ └── profiles_settings.xml ├── encodings.xml ├── inspectionProfiles │ ├── Project_Default.xml │ └── profiles_settings.xml ├── jsLibraryMappings.xml ├── misc.xml ├── modules.xml ├── vcs.xml ├── vuePoject.iml └── workspace.xml ├── 01 └── lib │ ├── 01.Vue的基本代码.html │ ├── 02.v-cloak的学习.html │ ├── 03.跑马灯效果.html │ ├── 04.事件修饰符.html │ ├── 05.v-model指令的学习.html │ ├── 06.简易的计算器.html │ ├── 07.vue中的样式.html │ ├── 08.vue中的样式-style.html │ ├── 09.v-for循环普通数组.html │ ├── 10.v-for循环对象数组.html │ ├── 11.v-for循环对象.html │ ├── 12.v-for迭代数字.html │ ├── 13.v-for循环中key属性的使用.html │ ├── 14.v-if和v-show的使用.html │ ├── 15.今天内容的总结和回顾.html │ └── node_modules │ ├── _vue@2.6.10@vue │ ├── LICENSE │ ├── README.md │ ├── dist │ │ ├── README.md │ │ ├── vue.common.dev.js │ │ ├── vue.common.js │ │ ├── vue.common.prod.js │ │ ├── vue.esm.browser.js │ │ ├── vue.esm.browser.min.js │ │ ├── vue.esm.js │ │ ├── vue.js │ │ ├── vue.min.js │ │ ├── vue.runtime.common.dev.js │ │ ├── vue.runtime.common.js │ │ ├── vue.runtime.common.prod.js │ │ ├── vue.runtime.esm.js │ │ ├── vue.runtime.js │ │ └── vue.runtime.min.js │ ├── package.json │ ├── src │ │ ├── .DS_Store │ │ ├── compiler │ │ │ ├── .DS_Store │ │ │ ├── codeframe.js │ │ │ ├── codegen │ │ │ │ ├── events.js │ │ │ │ └── index.js │ │ │ ├── create-compiler.js │ │ │ ├── directives │ │ │ │ ├── bind.js │ │ │ │ ├── index.js │ │ │ │ ├── model.js │ │ │ │ └── on.js │ │ │ ├── error-detector.js │ │ │ ├── helpers.js │ │ │ ├── index.js │ │ │ ├── optimizer.js │ │ │ ├── parser │ │ │ │ ├── entity-decoder.js │ │ │ │ ├── filter-parser.js │ │ │ │ ├── html-parser.js │ │ │ │ ├── index.js │ │ │ │ └── text-parser.js │ │ │ └── to-function.js │ │ ├── core │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ └── keep-alive.js │ │ │ ├── config.js │ │ │ ├── global-api │ │ │ │ ├── assets.js │ │ │ │ ├── extend.js │ │ │ │ ├── index.js │ │ │ │ ├── mixin.js │ │ │ │ └── use.js │ │ │ ├── index.js │ │ │ ├── instance │ │ │ │ ├── events.js │ │ │ │ ├── index.js │ │ │ │ ├── init.js │ │ │ │ ├── inject.js │ │ │ │ ├── lifecycle.js │ │ │ │ ├── proxy.js │ │ │ │ ├── render-helpers │ │ │ │ │ ├── bind-dynamic-keys.js │ │ │ │ │ ├── bind-object-listeners.js │ │ │ │ │ ├── bind-object-props.js │ │ │ │ │ ├── check-keycodes.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── render-list.js │ │ │ │ │ ├── render-slot.js │ │ │ │ │ ├── render-static.js │ │ │ │ │ ├── resolve-filter.js │ │ │ │ │ ├── resolve-scoped-slots.js │ │ │ │ │ └── resolve-slots.js │ │ │ │ ├── render.js │ │ │ │ └── state.js │ │ │ ├── observer │ │ │ │ ├── array.js │ │ │ │ ├── dep.js │ │ │ │ ├── index.js │ │ │ │ ├── scheduler.js │ │ │ │ ├── traverse.js │ │ │ │ └── watcher.js │ │ │ ├── util │ │ │ │ ├── debug.js │ │ │ │ ├── env.js │ │ │ │ ├── error.js │ │ │ │ ├── index.js │ │ │ │ ├── lang.js │ │ │ │ ├── next-tick.js │ │ │ │ ├── options.js │ │ │ │ ├── perf.js │ │ │ │ └── props.js │ │ │ └── vdom │ │ │ │ ├── create-component.js │ │ │ │ ├── create-element.js │ │ │ │ ├── create-functional-component.js │ │ │ │ ├── helpers │ │ │ │ ├── extract-props.js │ │ │ │ ├── get-first-component-child.js │ │ │ │ ├── index.js │ │ │ │ ├── is-async-placeholder.js │ │ │ │ ├── merge-hook.js │ │ │ │ ├── normalize-children.js │ │ │ │ ├── normalize-scoped-slots.js │ │ │ │ ├── resolve-async-component.js │ │ │ │ └── update-listeners.js │ │ │ │ ├── modules │ │ │ │ ├── directives.js │ │ │ │ ├── index.js │ │ │ │ └── ref.js │ │ │ │ ├── patch.js │ │ │ │ └── vnode.js │ │ ├── platforms │ │ │ ├── .DS_Store │ │ │ ├── web │ │ │ │ ├── compiler │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── html.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── text.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── style.js │ │ │ │ │ ├── options.js │ │ │ │ │ └── util.js │ │ │ │ ├── entry-compiler.js │ │ │ │ ├── entry-runtime-with-compiler.js │ │ │ │ ├── entry-runtime.js │ │ │ │ ├── entry-server-basic-renderer.js │ │ │ │ ├── entry-server-renderer.js │ │ │ │ ├── runtime │ │ │ │ │ ├── class-util.js │ │ │ │ │ ├── components │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── transition-group.js │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── show.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ ├── events.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── style.js │ │ │ │ │ │ └── transition.js │ │ │ │ │ ├── node-ops.js │ │ │ │ │ ├── patch.js │ │ │ │ │ └── transition-util.js │ │ │ │ ├── server │ │ │ │ │ ├── compiler.js │ │ │ │ │ ├── directives │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ ├── model.js │ │ │ │ │ │ └── show.js │ │ │ │ │ ├── modules │ │ │ │ │ │ ├── attrs.js │ │ │ │ │ │ ├── class.js │ │ │ │ │ │ ├── dom-props.js │ │ │ │ │ │ ├── index.js │ │ │ │ │ │ └── style.js │ │ │ │ │ └── util.js │ │ │ │ └── util │ │ │ │ │ ├── attrs.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── compat.js │ │ │ │ │ ├── element.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── style.js │ │ │ └── weex │ │ │ │ ├── .DS_Store │ │ │ │ ├── compiler │ │ │ │ ├── .DS_Store │ │ │ │ ├── directives │ │ │ │ │ ├── index.js │ │ │ │ │ └── model.js │ │ │ │ ├── index.js │ │ │ │ └── modules │ │ │ │ │ ├── append.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── props.js │ │ │ │ │ ├── recycle-list │ │ │ │ │ ├── component-root.js │ │ │ │ │ ├── component.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── recycle-list.js │ │ │ │ │ ├── text.js │ │ │ │ │ ├── v-bind.js │ │ │ │ │ ├── v-for.js │ │ │ │ │ ├── v-if.js │ │ │ │ │ ├── v-on.js │ │ │ │ │ └── v-once.js │ │ │ │ │ └── style.js │ │ │ │ ├── entry-compiler.js │ │ │ │ ├── entry-framework.js │ │ │ │ ├── entry-runtime-factory.js │ │ │ │ ├── runtime │ │ │ │ ├── components │ │ │ │ │ ├── index.js │ │ │ │ │ ├── richtext.js │ │ │ │ │ ├── transition-group.js │ │ │ │ │ └── transition.js │ │ │ │ ├── directives │ │ │ │ │ └── index.js │ │ │ │ ├── index.js │ │ │ │ ├── modules │ │ │ │ │ ├── attrs.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── events.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── style.js │ │ │ │ │ └── transition.js │ │ │ │ ├── node-ops.js │ │ │ │ ├── patch.js │ │ │ │ ├── recycle-list │ │ │ │ │ ├── render-component-template.js │ │ │ │ │ └── virtual-component.js │ │ │ │ └── text-node.js │ │ │ │ └── util │ │ │ │ ├── element.js │ │ │ │ ├── index.js │ │ │ │ └── parser.js │ │ ├── server │ │ │ ├── bundle-renderer │ │ │ │ ├── create-bundle-renderer.js │ │ │ │ ├── create-bundle-runner.js │ │ │ │ └── source-map-support.js │ │ │ ├── create-basic-renderer.js │ │ │ ├── create-renderer.js │ │ │ ├── optimizing-compiler │ │ │ │ ├── codegen.js │ │ │ │ ├── index.js │ │ │ │ ├── modules.js │ │ │ │ ├── optimizer.js │ │ │ │ └── runtime-helpers.js │ │ │ ├── render-context.js │ │ │ ├── render-stream.js │ │ │ ├── render.js │ │ │ ├── template-renderer │ │ │ │ ├── create-async-file-mapper.js │ │ │ │ ├── index.js │ │ │ │ ├── parse-template.js │ │ │ │ └── template-stream.js │ │ │ ├── util.js │ │ │ ├── webpack-plugin │ │ │ │ ├── client.js │ │ │ │ ├── server.js │ │ │ │ └── util.js │ │ │ └── write.js │ │ ├── sfc │ │ │ └── parser.js │ │ └── shared │ │ │ ├── constants.js │ │ │ └── util.js │ └── types │ │ ├── index.d.ts │ │ ├── options.d.ts │ │ ├── plugin.d.ts │ │ ├── vnode.d.ts │ │ └── vue.d.ts │ └── vue │ ├── LICENSE │ ├── README.md │ ├── dist │ ├── README.md │ ├── vue.common.dev.js │ ├── vue.common.js │ ├── vue.common.prod.js │ ├── vue.esm.browser.js │ ├── vue.esm.browser.min.js │ ├── vue.esm.js │ ├── vue.js │ ├── vue.min.js │ ├── vue.runtime.common.dev.js │ ├── vue.runtime.common.js │ ├── vue.runtime.common.prod.js │ ├── vue.runtime.esm.js │ ├── vue.runtime.js │ └── vue.runtime.min.js │ ├── package.json │ ├── src │ ├── .DS_Store │ ├── compiler │ │ ├── .DS_Store │ │ ├── codeframe.js │ │ ├── codegen │ │ │ ├── events.js │ │ │ └── index.js │ │ ├── create-compiler.js │ │ ├── directives │ │ │ ├── bind.js │ │ │ ├── index.js │ │ │ ├── model.js │ │ │ └── on.js │ │ ├── error-detector.js │ │ ├── helpers.js │ │ ├── index.js │ │ ├── optimizer.js │ │ ├── parser │ │ │ ├── entity-decoder.js │ │ │ ├── filter-parser.js │ │ │ ├── html-parser.js │ │ │ ├── index.js │ │ │ └── text-parser.js │ │ └── to-function.js │ ├── core │ │ ├── components │ │ │ ├── index.js │ │ │ └── keep-alive.js │ │ ├── config.js │ │ ├── global-api │ │ │ ├── assets.js │ │ │ ├── extend.js │ │ │ ├── index.js │ │ │ ├── mixin.js │ │ │ └── use.js │ │ ├── index.js │ │ ├── instance │ │ │ ├── events.js │ │ │ ├── index.js │ │ │ ├── init.js │ │ │ ├── inject.js │ │ │ ├── lifecycle.js │ │ │ ├── proxy.js │ │ │ ├── render-helpers │ │ │ │ ├── bind-dynamic-keys.js │ │ │ │ ├── bind-object-listeners.js │ │ │ │ ├── bind-object-props.js │ │ │ │ ├── check-keycodes.js │ │ │ │ ├── index.js │ │ │ │ ├── render-list.js │ │ │ │ ├── render-slot.js │ │ │ │ ├── render-static.js │ │ │ │ ├── resolve-filter.js │ │ │ │ ├── resolve-scoped-slots.js │ │ │ │ └── resolve-slots.js │ │ │ ├── render.js │ │ │ └── state.js │ │ ├── observer │ │ │ ├── array.js │ │ │ ├── dep.js │ │ │ ├── index.js │ │ │ ├── scheduler.js │ │ │ ├── traverse.js │ │ │ └── watcher.js │ │ ├── util │ │ │ ├── debug.js │ │ │ ├── env.js │ │ │ ├── error.js │ │ │ ├── index.js │ │ │ ├── lang.js │ │ │ ├── next-tick.js │ │ │ ├── options.js │ │ │ ├── perf.js │ │ │ └── props.js │ │ └── vdom │ │ │ ├── create-component.js │ │ │ ├── create-element.js │ │ │ ├── create-functional-component.js │ │ │ ├── helpers │ │ │ ├── extract-props.js │ │ │ ├── get-first-component-child.js │ │ │ ├── index.js │ │ │ ├── is-async-placeholder.js │ │ │ ├── merge-hook.js │ │ │ ├── normalize-children.js │ │ │ ├── normalize-scoped-slots.js │ │ │ ├── resolve-async-component.js │ │ │ └── update-listeners.js │ │ │ ├── modules │ │ │ ├── directives.js │ │ │ ├── index.js │ │ │ └── ref.js │ │ │ ├── patch.js │ │ │ └── vnode.js │ ├── platforms │ │ ├── .DS_Store │ │ ├── web │ │ │ ├── compiler │ │ │ │ ├── directives │ │ │ │ │ ├── html.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── model.js │ │ │ │ │ └── text.js │ │ │ │ ├── index.js │ │ │ │ ├── modules │ │ │ │ │ ├── class.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── model.js │ │ │ │ │ └── style.js │ │ │ │ ├── options.js │ │ │ │ └── util.js │ │ │ ├── entry-compiler.js │ │ │ ├── entry-runtime-with-compiler.js │ │ │ ├── entry-runtime.js │ │ │ ├── entry-server-basic-renderer.js │ │ │ ├── entry-server-renderer.js │ │ │ ├── runtime │ │ │ │ ├── class-util.js │ │ │ │ ├── components │ │ │ │ │ ├── index.js │ │ │ │ │ ├── transition-group.js │ │ │ │ │ └── transition.js │ │ │ │ ├── directives │ │ │ │ │ ├── index.js │ │ │ │ │ ├── model.js │ │ │ │ │ └── show.js │ │ │ │ ├── index.js │ │ │ │ ├── modules │ │ │ │ │ ├── attrs.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── dom-props.js │ │ │ │ │ ├── events.js │ │ │ │ │ ├── index.js │ │ │ │ │ ├── style.js │ │ │ │ │ └── transition.js │ │ │ │ ├── node-ops.js │ │ │ │ ├── patch.js │ │ │ │ └── transition-util.js │ │ │ ├── server │ │ │ │ ├── compiler.js │ │ │ │ ├── directives │ │ │ │ │ ├── index.js │ │ │ │ │ ├── model.js │ │ │ │ │ └── show.js │ │ │ │ ├── modules │ │ │ │ │ ├── attrs.js │ │ │ │ │ ├── class.js │ │ │ │ │ ├── dom-props.js │ │ │ │ │ ├── index.js │ │ │ │ │ └── style.js │ │ │ │ └── util.js │ │ │ └── util │ │ │ │ ├── attrs.js │ │ │ │ ├── class.js │ │ │ │ ├── compat.js │ │ │ │ ├── element.js │ │ │ │ ├── index.js │ │ │ │ └── style.js │ │ └── weex │ │ │ ├── .DS_Store │ │ │ ├── compiler │ │ │ ├── .DS_Store │ │ │ ├── directives │ │ │ │ ├── index.js │ │ │ │ └── model.js │ │ │ ├── index.js │ │ │ └── modules │ │ │ │ ├── append.js │ │ │ │ ├── class.js │ │ │ │ ├── index.js │ │ │ │ ├── props.js │ │ │ │ ├── recycle-list │ │ │ │ ├── component-root.js │ │ │ │ ├── component.js │ │ │ │ ├── index.js │ │ │ │ ├── recycle-list.js │ │ │ │ ├── text.js │ │ │ │ ├── v-bind.js │ │ │ │ ├── v-for.js │ │ │ │ ├── v-if.js │ │ │ │ ├── v-on.js │ │ │ │ └── v-once.js │ │ │ │ └── style.js │ │ │ ├── entry-compiler.js │ │ │ ├── entry-framework.js │ │ │ ├── entry-runtime-factory.js │ │ │ ├── runtime │ │ │ ├── components │ │ │ │ ├── index.js │ │ │ │ ├── richtext.js │ │ │ │ ├── transition-group.js │ │ │ │ └── transition.js │ │ │ ├── directives │ │ │ │ └── index.js │ │ │ ├── index.js │ │ │ ├── modules │ │ │ │ ├── attrs.js │ │ │ │ ├── class.js │ │ │ │ ├── events.js │ │ │ │ ├── index.js │ │ │ │ ├── style.js │ │ │ │ └── transition.js │ │ │ ├── node-ops.js │ │ │ ├── patch.js │ │ │ ├── recycle-list │ │ │ │ ├── render-component-template.js │ │ │ │ └── virtual-component.js │ │ │ └── text-node.js │ │ │ └── util │ │ │ ├── element.js │ │ │ ├── index.js │ │ │ └── parser.js │ ├── server │ │ ├── bundle-renderer │ │ │ ├── create-bundle-renderer.js │ │ │ ├── create-bundle-runner.js │ │ │ └── source-map-support.js │ │ ├── create-basic-renderer.js │ │ ├── create-renderer.js │ │ ├── optimizing-compiler │ │ │ ├── codegen.js │ │ │ ├── index.js │ │ │ ├── modules.js │ │ │ ├── optimizer.js │ │ │ └── runtime-helpers.js │ │ ├── render-context.js │ │ ├── render-stream.js │ │ ├── render.js │ │ ├── template-renderer │ │ │ ├── create-async-file-mapper.js │ │ │ ├── index.js │ │ │ ├── parse-template.js │ │ │ └── template-stream.js │ │ ├── util.js │ │ ├── webpack-plugin │ │ │ ├── client.js │ │ │ ├── server.js │ │ │ └── util.js │ │ └── write.js │ ├── sfc │ │ └── parser.js │ └── shared │ │ ├── constants.js │ │ └── util.js │ └── types │ ├── index.d.ts │ ├── options.d.ts │ ├── plugin.d.ts │ ├── vnode.d.ts │ └── vue.d.ts ├── 02 ├── 01.品牌列表案例.html ├── 02.品牌列表案例2.html ├── 03.过滤器的基本使用.html ├── 04.生命周期函数演示.html ├── 05.vue-resource基本使用.html ├── 06.客户端JSONP页面.html └── lib │ ├── animate.css │ ├── bootstrap-3.3.7.css │ ├── vue-2.4.0.js │ ├── vue-resource-1.3.4.js │ └── vue.min.js ├── 03 ├── 01.vue-resource改造品牌列表案例.html ├── 02.动画-不使用动画.html ├── 03.动画-使用过渡类名实现动画.html ├── 04.动画-修改v-前缀.html ├── 05.动画使用第三方类实现动画.html ├── 06.动画-使用钩子函数,模拟小球半场动画.html ├── 07.动画-列表动画.html ├── 08.组件-创建组件的方式1.html ├── 09.组件-创建组件的方式2.html ├── 10.组件-创建组件的方式3.html ├── 11.组件-组件中的data和methods.html ├── 12.组件-why components data must be a function.html ├── 13.组件切换-方式1.html ├── 14.组件切换-方式2.html ├── 15.组件切换-切换动画.html └── lib │ ├── animate.css │ ├── bootstrap-3.3.7.css │ ├── vue-2.4.0.js │ └── vue-resource-1.3.4.js ├── 04 ├── 01.复习-实现小球动画.html ├── 02.复习-定义组件的方式.html ├── 03.组件-父组件向子组件传值.html ├── 04.组件-父组件把方法传递给子组件.html ├── 05.组件案例-评论列表.html ├── 06.ref获取DOM元素和组件.html ├── 07.路由-路由的基本使用.html ├── 08.路由规则中定义参数.html ├── 09.路由规则传参方式2.html ├── 10.路由-路由的嵌套.html ├── 11.路由-命名视图实现经典布局.html └── lib │ ├── animate.css │ ├── bootstrap-3.3.7.css │ ├── vue-2.4.0.js │ ├── vue-resource-1.3.4.js │ └── vue-router-3.0.1.js ├── 05 ├── code │ ├── 01.父子组件之间传值.html │ ├── 02.路由基本的使用.html │ ├── 03.名称案例.html │ ├── 04.名称案例-方式2.html │ ├── 05.watch-监视路由地址的改变.html │ ├── 06.名称案例-方式3.html │ └── lib │ │ ├── animate.css │ │ ├── bootstrap-3.3.7.css │ │ ├── vue-2.4.0.js │ │ ├── vue-resource-1.3.4.js │ │ └── vue-router-3.0.1.js └── webpack-study │ ├── package.json │ ├── src │ ├── css │ │ ├── index.css │ │ ├── index.less │ │ └── index.scss │ ├── index.html │ └── main.js │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt ├── 06 ├── 01.webpack-study │ ├── .babelrc │ ├── dist │ │ └── bundle.js │ ├── package.json │ ├── src │ │ ├── css │ │ │ ├── index.css │ │ │ └── index.scss │ │ ├── images │ │ │ └── 生小孩.jpg │ │ ├── images2 │ │ │ └── 生小孩.jpg │ │ ├── index.html │ │ └── main.js │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt ├── 02.webpack-vue1 │ ├── .babelrc │ ├── dist │ │ └── bundle.js │ ├── package.json │ ├── src │ │ ├── index.html │ │ ├── login.vue │ │ ├── main.js │ │ └── test.js │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt ├── 03.code │ ├── 01.在页面中渲染基本的组件.html │ ├── 02.在页面中使用render函数渲染组件.html │ └── lib │ │ └── vue-2.4.0.js ├── 04.webpack-vue-router │ ├── .babelrc │ ├── dist │ │ └── bundle.js │ ├── package.json │ ├── src │ │ ├── App.vue │ │ ├── index.html │ │ ├── main.js │ │ └── main │ │ │ ├── Account.vue │ │ │ └── GoodsList.vue │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt └── 05.webpack-路由嵌套 │ ├── .babelrc │ ├── dist │ └── bundle.js │ ├── package.json │ ├── src │ ├── App.vue │ ├── index.html │ ├── main.js │ ├── main │ │ ├── Account.vue │ │ └── GoodsList.vue │ ├── router.js │ └── subcom │ │ ├── login.vue │ │ └── register.vue │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt ├── 07 └── 01.webpack-UI组件使用 │ ├── .babelrc │ ├── dist │ └── bundle.js │ ├── package.json │ ├── src │ ├── App.vue │ ├── css │ │ └── app.css │ ├── index.html │ ├── lib │ │ └── mui │ │ │ ├── css │ │ │ ├── mui.css │ │ │ └── mui.min.css │ │ │ ├── fonts │ │ │ └── mui.ttf │ │ │ └── js │ │ │ ├── mui.js │ │ │ └── mui.min.js │ ├── main.js │ ├── main │ │ ├── Account.vue │ │ └── GoodsList.vue │ ├── router.js │ └── subcom │ │ ├── login.vue │ │ └── register.vue │ ├── webpack.config.js │ └── 先运行 npm install 安装依赖包.txt ├── 08 └── code │ ├── 01.封装读取文件的方法.js │ ├── 02.封装读取文件的方法-提高版.js │ ├── 03.Promise概念介绍.js │ ├── 04.使用Promise解决回调地狱.js │ ├── 05.演示Jquery中Promise.html │ ├── data.json │ ├── files │ ├── 1.txt │ ├── 2.txt │ └── 3.txt │ ├── node_modules │ ├── .npminstall.done │ └── _jquery@3.2.1@jquery │ │ ├── .npminstall.done │ │ ├── AUTHORS.txt │ │ ├── LICENSE.txt │ │ ├── README.md │ │ ├── bower.json │ │ ├── dist │ │ ├── core.js │ │ ├── jquery.js │ │ ├── jquery.min.js │ │ ├── jquery.min.map │ │ ├── jquery.slim.js │ │ ├── jquery.slim.min.js │ │ └── jquery.slim.min.map │ │ ├── external │ │ └── sizzle │ │ │ ├── LICENSE.txt │ │ │ └── dist │ │ │ ├── sizzle.js │ │ │ ├── sizzle.min.js │ │ │ └── sizzle.min.map │ │ ├── package.json │ │ └── src │ │ ├── .eslintrc.json │ │ ├── ajax.js │ │ ├── ajax │ │ ├── jsonp.js │ │ ├── load.js │ │ ├── parseXML.js │ │ ├── script.js │ │ ├── var │ │ │ ├── location.js │ │ │ ├── nonce.js │ │ │ └── rquery.js │ │ └── xhr.js │ │ ├── attributes.js │ │ ├── attributes │ │ ├── attr.js │ │ ├── classes.js │ │ ├── prop.js │ │ ├── support.js │ │ └── val.js │ │ ├── callbacks.js │ │ ├── core.js │ │ ├── core │ │ ├── DOMEval.js │ │ ├── access.js │ │ ├── init.js │ │ ├── nodeName.js │ │ ├── parseHTML.js │ │ ├── ready-no-deferred.js │ │ ├── ready.js │ │ ├── readyException.js │ │ ├── stripAndCollapse.js │ │ ├── support.js │ │ └── var │ │ │ └── rsingleTag.js │ │ ├── css.js │ │ ├── css │ │ ├── addGetHookIf.js │ │ ├── adjustCSS.js │ │ ├── curCSS.js │ │ ├── hiddenVisibleSelectors.js │ │ ├── showHide.js │ │ ├── support.js │ │ └── var │ │ │ ├── cssExpand.js │ │ │ ├── getStyles.js │ │ │ ├── isHiddenWithinTree.js │ │ │ ├── rmargin.js │ │ │ ├── rnumnonpx.js │ │ │ └── swap.js │ │ ├── data.js │ │ ├── data │ │ ├── Data.js │ │ └── var │ │ │ ├── acceptData.js │ │ │ ├── dataPriv.js │ │ │ └── dataUser.js │ │ ├── deferred.js │ │ ├── deferred │ │ └── exceptionHook.js │ │ ├── deprecated.js │ │ ├── dimensions.js │ │ ├── effects.js │ │ ├── effects │ │ ├── Tween.js │ │ └── animatedSelector.js │ │ ├── event.js │ │ ├── event │ │ ├── ajax.js │ │ ├── alias.js │ │ ├── focusin.js │ │ ├── support.js │ │ └── trigger.js │ │ ├── exports │ │ ├── amd.js │ │ └── global.js │ │ ├── jquery.js │ │ ├── manipulation.js │ │ ├── manipulation │ │ ├── _evalUrl.js │ │ ├── buildFragment.js │ │ ├── getAll.js │ │ ├── setGlobalEval.js │ │ ├── support.js │ │ ├── var │ │ │ ├── rcheckableType.js │ │ │ ├── rscriptType.js │ │ │ └── rtagName.js │ │ └── wrapMap.js │ │ ├── offset.js │ │ ├── queue.js │ │ ├── queue │ │ └── delay.js │ │ ├── selector-native.js │ │ ├── selector-sizzle.js │ │ ├── selector.js │ │ ├── serialize.js │ │ ├── traversing.js │ │ ├── traversing │ │ ├── findFilter.js │ │ └── var │ │ │ ├── dir.js │ │ │ ├── rneedsContext.js │ │ │ └── siblings.js │ │ ├── var │ │ ├── ObjectFunctionString.js │ │ ├── arr.js │ │ ├── class2type.js │ │ ├── concat.js │ │ ├── document.js │ │ ├── documentElement.js │ │ ├── fnToString.js │ │ ├── getProto.js │ │ ├── hasOwn.js │ │ ├── indexOf.js │ │ ├── pnum.js │ │ ├── push.js │ │ ├── rcssNum.js │ │ ├── rnothtmlwhite.js │ │ ├── slice.js │ │ ├── support.js │ │ └── toString.js │ │ └── wrap.js │ └── package.json └── 09 └── 演示前后端开发 ├── node_server ├── app.js ├── controller.js ├── model.js ├── package.json ├── router.js └── 先运行 npm install 安装依赖包.txt ├── vue-cms-template ├── .babelrc ├── dist │ └── bundle.js ├── package.json ├── src │ ├── App.vue │ ├── index.html │ ├── lib │ │ └── mui │ │ │ ├── css │ │ │ ├── mui(1).css │ │ │ └── mui.min(1).css │ │ │ ├── fonts │ │ │ └── mui.ttf │ │ │ └── js │ │ │ ├── mui.js │ │ │ └── mui.min.js │ ├── main.js │ └── router.js ├── webpack.config.js └── 先运行 npm install 安装依赖包.txt └── 后端接口API文档.txt /.idea/.name: -------------------------------------------------------------------------------- 1 | vuePoject -------------------------------------------------------------------------------- /.idea/copyright/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | -------------------------------------------------------------------------------- /.idea/encodings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/Project_Default.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | -------------------------------------------------------------------------------- /.idea/inspectionProfiles/profiles_settings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 7 | -------------------------------------------------------------------------------- /.idea/jsLibraryMappings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/vuePoject.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /01/lib/01.Vue的基本代码.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 |
11 |

{{ msg }}

12 |
13 | 22 | 23 | -------------------------------------------------------------------------------- /01/lib/05.v-model指令的学习.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 |

{{ msg }}

11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 33 | 34 | -------------------------------------------------------------------------------- /01/lib/08.vue中的样式-style.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 |

这还是一个h1

12 |
13 | 14 | 26 | 27 | -------------------------------------------------------------------------------- /01/lib/09.v-for循环普通数组.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 |

第{{i}}项:{{item}}

12 |
13 | 24 | 25 | -------------------------------------------------------------------------------- /01/lib/10.v-for循环对象数组.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 |

第{{ user.id }}个: {{ user.name }} 索引是:{{ i }}

11 |
12 | 29 | 30 | -------------------------------------------------------------------------------- /01/lib/11.v-for循环对象.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 |

值是: {{ val }} --- 键是: {{key}} -- 索引: {{i}}

12 |
13 | 14 | 28 | 29 | -------------------------------------------------------------------------------- /01/lib/12.v-for迭代数字.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 | 12 |

这是第{{ count }}循环

13 |
14 | 25 | 26 | -------------------------------------------------------------------------------- /01/lib/14.v-if和v-show的使用.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 |

这是用v-if控制的元素

23 |

这是用v-show控制的元素

24 |
25 | 38 | 39 | -------------------------------------------------------------------------------- /01/lib/15.今天内容的总结和回顾.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-present, Yuxi (Evan) You 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/dist/vue.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/dist/vue.runtime.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.runtime.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.runtime.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/_vue@2.6.10@vue/src/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/compiler/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/_vue@2.6.10@vue/src/compiler/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/compiler/directives/bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function bind (el: ASTElement, dir: ASTDirective) { 4 | el.wrapData = (code: string) => { 5 | return `_b(${code},'${el.tag}',${dir.value},${ 6 | dir.modifiers && dir.modifiers.prop ? 'true' : 'false' 7 | }${ 8 | dir.modifiers && dir.modifiers.sync ? ',true' : '' 9 | })` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import on from './on' 4 | import bind from './bind' 5 | import { noop } from 'shared/util' 6 | 7 | export default { 8 | on, 9 | bind, 10 | cloak: noop 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/compiler/directives/on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export default function on (el: ASTElement, dir: ASTDirective) { 6 | if (process.env.NODE_ENV !== 'production' && dir.modifiers) { 7 | warn(`v-on without argument does not support modifiers.`) 8 | } 9 | el.wrapListeners = (code: string) => `_g(${code},${dir.value})` 10 | } 11 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from './parser/index' 4 | import { optimize } from './optimizer' 5 | import { generate } from './codegen/index' 6 | import { createCompilerCreator } from './create-compiler' 7 | 8 | // `createCompilerCreator` allows creating compilers that use alternative 9 | // parser/optimizer/codegen, e.g the SSR optimizing compiler. 10 | // Here we just export a default compiler using the default parts. 11 | export const createCompiler = createCompilerCreator(function baseCompile ( 12 | template: string, 13 | options: CompilerOptions 14 | ): CompiledResult { 15 | const ast = parse(template.trim(), options) 16 | if (options.optimize !== false) { 17 | optimize(ast, options) 18 | } 19 | const code = generate(ast, options) 20 | return { 21 | ast, 22 | render: code.render, 23 | staticRenderFns: code.staticRenderFns 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/compiler/parser/entity-decoder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let decoder 4 | 5 | export default { 6 | decode (html: string): string { 7 | decoder = decoder || document.createElement('div') 8 | decoder.innerHTML = html 9 | return decoder.textContent 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/components/index.js: -------------------------------------------------------------------------------- 1 | import KeepAlive from './keep-alive' 2 | 3 | export default { 4 | KeepAlive 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/global-api/assets.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { ASSET_TYPES } from 'shared/constants' 4 | import { isPlainObject, validateComponentName } from '../util/index' 5 | 6 | export function initAssetRegisters (Vue: GlobalAPI) { 7 | /** 8 | * Create asset registration methods. 9 | */ 10 | ASSET_TYPES.forEach(type => { 11 | Vue[type] = function ( 12 | id: string, 13 | definition: Function | Object 14 | ): Function | Object | void { 15 | if (!definition) { 16 | return this.options[type + 's'][id] 17 | } else { 18 | /* istanbul ignore if */ 19 | if (process.env.NODE_ENV !== 'production' && type === 'component') { 20 | validateComponentName(id) 21 | } 22 | if (type === 'component' && isPlainObject(definition)) { 23 | definition.name = definition.name || id 24 | definition = this.options._base.extend(definition) 25 | } 26 | if (type === 'directive' && typeof definition === 'function') { 27 | definition = { bind: definition, update: definition } 28 | } 29 | this.options[type + 's'][id] = definition 30 | return definition 31 | } 32 | } 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/global-api/mixin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { mergeOptions } from '../util/index' 4 | 5 | export function initMixin (Vue: GlobalAPI) { 6 | Vue.mixin = function (mixin: Object) { 7 | this.options = mergeOptions(this.options, mixin) 8 | return this 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/global-api/use.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { toArray } from '../util/index' 4 | 5 | export function initUse (Vue: GlobalAPI) { 6 | Vue.use = function (plugin: Function | Object) { 7 | const installedPlugins = (this._installedPlugins || (this._installedPlugins = [])) 8 | if (installedPlugins.indexOf(plugin) > -1) { 9 | return this 10 | } 11 | 12 | // additional parameters 13 | const args = toArray(arguments, 1) 14 | args.unshift(this) 15 | if (typeof plugin.install === 'function') { 16 | plugin.install.apply(plugin, args) 17 | } else if (typeof plugin === 'function') { 18 | plugin.apply(null, args) 19 | } 20 | installedPlugins.push(plugin) 21 | return this 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/index.js: -------------------------------------------------------------------------------- 1 | import Vue from './instance/index' 2 | import { initGlobalAPI } from './global-api/index' 3 | import { isServerRendering } from 'core/util/env' 4 | import { FunctionalRenderContext } from 'core/vdom/create-functional-component' 5 | 6 | initGlobalAPI(Vue) 7 | 8 | Object.defineProperty(Vue.prototype, '$isServer', { 9 | get: isServerRendering 10 | }) 11 | 12 | Object.defineProperty(Vue.prototype, '$ssrContext', { 13 | get () { 14 | /* istanbul ignore next */ 15 | return this.$vnode && this.$vnode.ssrContext 16 | } 17 | }) 18 | 19 | // expose FunctionalRenderContext for ssr runtime helper installation 20 | Object.defineProperty(Vue, 'FunctionalRenderContext', { 21 | value: FunctionalRenderContext 22 | }) 23 | 24 | Vue.version = '__VERSION__' 25 | 26 | export default Vue 27 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/instance/index.js: -------------------------------------------------------------------------------- 1 | import { initMixin } from './init' 2 | import { stateMixin } from './state' 3 | import { renderMixin } from './render' 4 | import { eventsMixin } from './events' 5 | import { lifecycleMixin } from './lifecycle' 6 | import { warn } from '../util/index' 7 | 8 | function Vue (options) { 9 | if (process.env.NODE_ENV !== 'production' && 10 | !(this instanceof Vue) 11 | ) { 12 | warn('Vue is a constructor and should be called with the `new` keyword') 13 | } 14 | this._init(options) 15 | } 16 | 17 | initMixin(Vue) 18 | stateMixin(Vue) 19 | eventsMixin(Vue) 20 | lifecycleMixin(Vue) 21 | renderMixin(Vue) 22 | 23 | export default Vue 24 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/instance/render-helpers/bind-object-listeners.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn, extend, isPlainObject } from 'core/util/index' 4 | 5 | export function bindObjectListeners (data: any, value: any): VNodeData { 6 | if (value) { 7 | if (!isPlainObject(value)) { 8 | process.env.NODE_ENV !== 'production' && warn( 9 | 'v-on without argument expects an Object value', 10 | this 11 | ) 12 | } else { 13 | const on = data.on = data.on ? extend({}, data.on) : {} 14 | for (const key in value) { 15 | const existing = on[key] 16 | const ours = value[key] 17 | on[key] = existing ? [].concat(existing, ours) : ours 18 | } 19 | } 20 | } 21 | return data 22 | } 23 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/instance/render-helpers/check-keycodes.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import config from 'core/config' 4 | import { hyphenate } from 'shared/util' 5 | 6 | function isKeyNotMatch (expect: T | Array, actual: T): boolean { 7 | if (Array.isArray(expect)) { 8 | return expect.indexOf(actual) === -1 9 | } else { 10 | return expect !== actual 11 | } 12 | } 13 | 14 | /** 15 | * Runtime helper for checking keyCodes from config. 16 | * exposed as Vue.prototype._k 17 | * passing in eventKeyName as last argument separately for backwards compat 18 | */ 19 | export function checkKeyCodes ( 20 | eventKeyCode: number, 21 | key: string, 22 | builtInKeyCode?: number | Array, 23 | eventKeyName?: string, 24 | builtInKeyName?: string | Array 25 | ): ?boolean { 26 | const mappedKeyCode = config.keyCodes[key] || builtInKeyCode 27 | if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { 28 | return isKeyNotMatch(builtInKeyName, eventKeyName) 29 | } else if (mappedKeyCode) { 30 | return isKeyNotMatch(mappedKeyCode, eventKeyCode) 31 | } else if (eventKeyName) { 32 | return hyphenate(eventKeyName) !== key 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/instance/render-helpers/render-slot.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { extend, warn, isObject } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for rendering 7 | */ 8 | export function renderSlot ( 9 | name: string, 10 | fallback: ?Array, 11 | props: ?Object, 12 | bindObject: ?Object 13 | ): ?Array { 14 | const scopedSlotFn = this.$scopedSlots[name] 15 | let nodes 16 | if (scopedSlotFn) { // scoped slot 17 | props = props || {} 18 | if (bindObject) { 19 | if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) { 20 | warn( 21 | 'slot v-bind without argument expects an Object', 22 | this 23 | ) 24 | } 25 | props = extend(extend({}, bindObject), props) 26 | } 27 | nodes = scopedSlotFn(props) || fallback 28 | } else { 29 | nodes = this.$slots[name] || fallback 30 | } 31 | 32 | const target = props && props.slot 33 | if (target) { 34 | return this.$createElement('template', { slot: target }, nodes) 35 | } else { 36 | return nodes 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/instance/render-helpers/resolve-filter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { identity, resolveAsset } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for resolving filters 7 | */ 8 | export function resolveFilter (id: string): Function { 9 | return resolveAsset(this.$options, 'filters', id, true) || identity 10 | } 11 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/instance/render-helpers/resolve-scoped-slots.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function resolveScopedSlots ( 4 | fns: ScopedSlotsData, // see flow/vnode 5 | res?: Object, 6 | // the following are added in 2.6 7 | hasDynamicKeys?: boolean, 8 | contentHashKey?: number 9 | ): { [key: string]: Function, $stable: boolean } { 10 | res = res || { $stable: !hasDynamicKeys } 11 | for (let i = 0; i < fns.length; i++) { 12 | const slot = fns[i] 13 | if (Array.isArray(slot)) { 14 | resolveScopedSlots(slot, res, hasDynamicKeys) 15 | } else if (slot) { 16 | // marker for reverse proxying v-slot without scope on this.$slots 17 | if (slot.proxy) { 18 | slot.fn.proxy = true 19 | } 20 | res[slot.key] = slot.fn 21 | } 22 | } 23 | if (contentHashKey) { 24 | (res: any).$key = contentHashKey 25 | } 26 | return res 27 | } 28 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/observer/array.js: -------------------------------------------------------------------------------- 1 | /* 2 | * not type checking this file because flow doesn't play well with 3 | * dynamically accessing methods on Array prototype 4 | */ 5 | 6 | import { def } from '../util/index' 7 | 8 | const arrayProto = Array.prototype 9 | export const arrayMethods = Object.create(arrayProto) 10 | 11 | const methodsToPatch = [ 12 | 'push', 13 | 'pop', 14 | 'shift', 15 | 'unshift', 16 | 'splice', 17 | 'sort', 18 | 'reverse' 19 | ] 20 | 21 | /** 22 | * Intercept mutating methods and emit events 23 | */ 24 | methodsToPatch.forEach(function (method) { 25 | // cache original method 26 | const original = arrayProto[method] 27 | def(arrayMethods, method, function mutator (...args) { 28 | const result = original.apply(this, args) 29 | const ob = this.__ob__ 30 | let inserted 31 | switch (method) { 32 | case 'push': 33 | case 'unshift': 34 | inserted = args 35 | break 36 | case 'splice': 37 | inserted = args.slice(2) 38 | break 39 | } 40 | if (inserted) ob.observeArray(inserted) 41 | // notify change 42 | ob.dep.notify() 43 | return result 44 | }) 45 | }) 46 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/observer/traverse.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { _Set as Set, isObject } from '../util/index' 4 | import type { SimpleSet } from '../util/index' 5 | import VNode from '../vdom/vnode' 6 | 7 | const seenObjects = new Set() 8 | 9 | /** 10 | * Recursively traverse an object to evoke all converted 11 | * getters, so that every nested property inside the object 12 | * is collected as a "deep" dependency. 13 | */ 14 | export function traverse (val: any) { 15 | _traverse(val, seenObjects) 16 | seenObjects.clear() 17 | } 18 | 19 | function _traverse (val: any, seen: SimpleSet) { 20 | let i, keys 21 | const isA = Array.isArray(val) 22 | if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { 23 | return 24 | } 25 | if (val.__ob__) { 26 | const depId = val.__ob__.dep.id 27 | if (seen.has(depId)) { 28 | return 29 | } 30 | seen.add(depId) 31 | } 32 | if (isA) { 33 | i = val.length 34 | while (i--) _traverse(val[i], seen) 35 | } else { 36 | keys = Object.keys(val) 37 | i = keys.length 38 | while (i--) _traverse(val[keys[i]], seen) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from 'shared/util' 4 | export * from './lang' 5 | export * from './env' 6 | export * from './options' 7 | export * from './debug' 8 | export * from './props' 9 | export * from './error' 10 | export * from './next-tick' 11 | export { defineReactive } from '../observer/index' 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/util/perf.js: -------------------------------------------------------------------------------- 1 | import { inBrowser } from './env' 2 | 3 | export let mark 4 | export let measure 5 | 6 | if (process.env.NODE_ENV !== 'production') { 7 | const perf = inBrowser && window.performance 8 | /* istanbul ignore if */ 9 | if ( 10 | perf && 11 | perf.mark && 12 | perf.measure && 13 | perf.clearMarks && 14 | perf.clearMeasures 15 | ) { 16 | mark = tag => perf.mark(tag) 17 | measure = (name, startTag, endTag) => { 18 | perf.measure(name, startTag, endTag) 19 | perf.clearMarks(startTag) 20 | perf.clearMarks(endTag) 21 | // perf.clearMeasures(name) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/vdom/helpers/get-first-component-child.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isDef } from 'shared/util' 4 | import { isAsyncPlaceholder } from './is-async-placeholder' 5 | 6 | export function getFirstComponentChild (children: ?Array): ?VNode { 7 | if (Array.isArray(children)) { 8 | for (let i = 0; i < children.length; i++) { 9 | const c = children[i] 10 | if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 11 | return c 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/vdom/helpers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from './merge-hook' 4 | export * from './extract-props' 5 | export * from './update-listeners' 6 | export * from './normalize-children' 7 | export * from './resolve-async-component' 8 | export * from './get-first-component-child' 9 | export * from './is-async-placeholder' 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/vdom/helpers/is-async-placeholder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isAsyncPlaceholder (node: VNode): boolean { 4 | return node.isComment && node.asyncFactory 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/vdom/helpers/merge-hook.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import VNode from '../vnode' 4 | import { createFnInvoker } from './update-listeners' 5 | import { remove, isDef, isUndef, isTrue } from 'shared/util' 6 | 7 | export function mergeVNodeHook (def: Object, hookKey: string, hook: Function) { 8 | if (def instanceof VNode) { 9 | def = def.data.hook || (def.data.hook = {}) 10 | } 11 | let invoker 12 | const oldHook = def[hookKey] 13 | 14 | function wrappedHook () { 15 | hook.apply(this, arguments) 16 | // important: remove merged hook to ensure it's called only once 17 | // and prevent memory leak 18 | remove(invoker.fns, wrappedHook) 19 | } 20 | 21 | if (isUndef(oldHook)) { 22 | // no existing hook 23 | invoker = createFnInvoker([wrappedHook]) 24 | } else { 25 | /* istanbul ignore if */ 26 | if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { 27 | // already a merged invoker 28 | invoker = oldHook 29 | invoker.fns.push(wrappedHook) 30 | } else { 31 | // existing plain hook 32 | invoker = createFnInvoker([oldHook, wrappedHook]) 33 | } 34 | } 35 | 36 | invoker.merged = true 37 | def[hookKey] = invoker 38 | } 39 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/core/vdom/modules/index.js: -------------------------------------------------------------------------------- 1 | import directives from './directives' 2 | import ref from './ref' 3 | 4 | export default [ 5 | ref, 6 | directives 7 | ] 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/_vue@2.6.10@vue/src/platforms/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/directives/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function html (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'innerHTML', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import text from './text' 3 | import html from './html' 4 | 5 | export default { 6 | model, 7 | text, 8 | html 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/directives/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function text (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'textContent', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from './options' 4 | import { createCompiler } from 'compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { compile, compileToFunctions } 9 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import model from './model' 4 | 5 | export default [ 6 | klass, 7 | style, 8 | model 9 | ] 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isPreTag, 5 | mustUseProp, 6 | isReservedTag, 7 | getTagNamespace 8 | } from '../util/index' 9 | 10 | import modules from './modules/index' 11 | import directives from './directives/index' 12 | import { genStaticKeys } from 'shared/util' 13 | import { isUnaryTag, canBeLeftOpenTag } from './util' 14 | 15 | export const baseOptions: CompilerOptions = { 16 | expectHTML: true, 17 | modules, 18 | directives, 19 | isPreTag, 20 | isUnaryTag, 21 | mustUseProp, 22 | canBeLeftOpenTag, 23 | isReservedTag, 24 | getTagNamespace, 25 | staticKeys: genStaticKeys(modules) 26 | } 27 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/compiler/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | export const isUnaryTag = makeMap( 6 | 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + 7 | 'link,meta,param,source,track,wbr' 8 | ) 9 | 10 | // Elements that you can, intentionally, leave open 11 | // (and which close themselves) 12 | export const canBeLeftOpenTag = makeMap( 13 | 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' 14 | ) 15 | 16 | // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 17 | // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content 18 | export const isNonPhrasingTag = makeMap( 19 | 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + 20 | 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + 21 | 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + 22 | 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + 23 | 'title,tr,track' 24 | ) 25 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/entry-compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { parseComponent } from 'sfc/parser' 4 | export { compile, compileToFunctions } from './compiler/index' 5 | export { ssrCompile, ssrCompileToFunctions } from './server/compiler' 6 | export { generateCodeFrame } from 'compiler/codeframe' 7 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/entry-runtime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from './runtime/index' 4 | 5 | export default Vue 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/entry-server-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import modules from './server/modules/index' 4 | import directives from './server/directives/index' 5 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 6 | import { createBasicRenderer } from 'server/create-basic-renderer' 7 | 8 | export default createBasicRenderer({ 9 | modules, 10 | directives, 11 | isUnaryTag, 12 | canBeLeftOpenTag 13 | }) 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/entry-server-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | process.env.VUE_ENV = 'server' 4 | 5 | import { extend } from 'shared/util' 6 | import modules from './server/modules/index' 7 | import baseDirectives from './server/directives/index' 8 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 9 | 10 | import { createRenderer as _createRenderer } from 'server/create-renderer' 11 | import { createBundleRendererCreator } from 'server/bundle-renderer/create-bundle-renderer' 12 | 13 | export function createRenderer (options?: Object = {}): { 14 | renderToString: Function, 15 | renderToStream: Function 16 | } { 17 | return _createRenderer(extend(extend({}, options), { 18 | isUnaryTag, 19 | canBeLeftOpenTag, 20 | modules, 21 | // user can provide server-side implementations for custom directives 22 | // when creating the renderer. 23 | directives: extend(baseDirectives, options.directives) 24 | })) 25 | } 26 | 27 | export const createBundleRenderer = createBundleRendererCreator(createRenderer) 28 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Transition from './transition' 2 | import TransitionGroup from './transition-group' 3 | 4 | export default { 5 | Transition, 6 | TransitionGroup 7 | } 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import show from './show' 3 | 4 | export default { 5 | model, 6 | show 7 | } 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/runtime/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isDef, 5 | isUndef 6 | } from 'shared/util' 7 | 8 | import { 9 | concat, 10 | stringifyClass, 11 | genClassForVnode 12 | } from 'web/util/index' 13 | 14 | function updateClass (oldVnode: any, vnode: any) { 15 | const el = vnode.elm 16 | const data: VNodeData = vnode.data 17 | const oldData: VNodeData = oldVnode.data 18 | if ( 19 | isUndef(data.staticClass) && 20 | isUndef(data.class) && ( 21 | isUndef(oldData) || ( 22 | isUndef(oldData.staticClass) && 23 | isUndef(oldData.class) 24 | ) 25 | ) 26 | ) { 27 | return 28 | } 29 | 30 | let cls = genClassForVnode(vnode) 31 | 32 | // handle transition classes 33 | const transitionClass = el._transitionClasses 34 | if (isDef(transitionClass)) { 35 | cls = concat(cls, stringifyClass(transitionClass)) 36 | } 37 | 38 | // set the class 39 | if (cls !== el._prevClass) { 40 | el.setAttribute('class', cls) 41 | el._prevClass = cls 42 | } 43 | } 44 | 45 | export default { 46 | create: updateClass, 47 | update: updateClass 48 | } 49 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import domProps from './dom-props' 5 | import style from './style' 6 | import transition from './transition' 7 | 8 | export default [ 9 | attrs, 10 | klass, 11 | events, 12 | domProps, 13 | style, 14 | transition 15 | ] 16 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'web/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'web/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ nodeOps, modules }) 13 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/server/compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from '../compiler/options' 4 | import { createCompiler } from 'server/optimizing-compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { 9 | compile as ssrCompile, 10 | compileToFunctions as ssrCompileToFunctions 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/server/directives/index.js: -------------------------------------------------------------------------------- 1 | import show from './show' 2 | import model from './model' 3 | 4 | export default { 5 | show, 6 | model 7 | } 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/server/directives/show.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function show (node: VNodeWithData, dir: VNodeDirective) { 4 | if (!dir.value) { 5 | const style: any = node.data.style || (node.data.style = {}) 6 | if (Array.isArray(style)) { 7 | style.push({ display: 'none' }) 8 | } else { 9 | style.display = 'none' 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/server/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { escape } from '../util' 4 | import { genClassForVnode } from 'web/util/index' 5 | 6 | export default function renderClass (node: VNodeWithData): ?string { 7 | const classList = genClassForVnode(node) 8 | if (classList !== '') { 9 | return ` class="${escape(classList)}"` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/server/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import domProps from './dom-props' 3 | import klass from './class' 4 | import style from './style' 5 | 6 | export default [ 7 | attrs, 8 | domProps, 9 | klass, 10 | style 11 | ] 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/util/compat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { inBrowser } from 'core/util/index' 4 | 5 | // check whether current browser encodes a char inside attribute values 6 | let div 7 | function getShouldDecode (href: boolean): boolean { 8 | div = div || document.createElement('div') 9 | div.innerHTML = href ? `` : `
` 10 | return div.innerHTML.indexOf(' ') > 0 11 | } 12 | 13 | // #3663: IE encodes newlines inside attribute values while other browsers don't 14 | export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false 15 | // #6828: chrome encodes content in a[href] 16 | export const shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/web/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export * from './attrs' 6 | export * from './class' 7 | export * from './element' 8 | 9 | /** 10 | * Query an element selector if it's not an element already. 11 | */ 12 | export function query (el: string | Element): Element { 13 | if (typeof el === 'string') { 14 | const selected = document.querySelector(el) 15 | if (!selected) { 16 | process.env.NODE_ENV !== 'production' && warn( 17 | 'Cannot find element: ' + el 18 | ) 19 | return document.createElement('div') 20 | } 21 | return selected 22 | } else { 23 | return el 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | 3 | export default { 4 | model 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/directives/model.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addHandler, addAttr } from 'compiler/helpers' 4 | import { genComponentModel, genAssignmentCode } from 'compiler/directives/model' 5 | 6 | export default function model ( 7 | el: ASTElement, 8 | dir: ASTDirective 9 | ): ?boolean { 10 | if (el.tag === 'input' || el.tag === 'textarea') { 11 | genDefaultModel(el, dir.value, dir.modifiers) 12 | } else { 13 | genComponentModel(el, dir.value, dir.modifiers) 14 | } 15 | } 16 | 17 | function genDefaultModel ( 18 | el: ASTElement, 19 | value: string, 20 | modifiers: ?ASTModifiers 21 | ): ?boolean { 22 | const { lazy, trim, number } = modifiers || {} 23 | const event = lazy ? 'change' : 'input' 24 | 25 | let valueExpression = `$event.target.attr.value${trim ? '.trim()' : ''}` 26 | if (number) { 27 | valueExpression = `_n(${valueExpression})` 28 | } 29 | 30 | const code = genAssignmentCode(value, valueExpression) 31 | addAttr(el, 'value', `(${value})`) 32 | addHandler(el, event, code, null, true) 33 | } 34 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/append.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | // The "unitary tag" means that the tag node and its children 6 | // must be sent to the native together. 7 | const isUnitaryTag = makeMap('cell,header,cell-slot,recycle-list', true) 8 | 9 | function preTransformNode (el: ASTElement) { 10 | if (isUnitaryTag(el.tag) && !el.attrsList.some(item => item.name === 'append')) { 11 | el.attrsMap.append = 'tree' 12 | el.attrsList.push({ name: 'append', value: 'tree' }) 13 | } 14 | if (el.attrsMap.append === 'tree') { 15 | el.appendAsTree = true 16 | } 17 | } 18 | 19 | function genData (el: ASTElement): string { 20 | return el.appendAsTree ? `appendAsTree:true,` : '' 21 | } 22 | 23 | export default { 24 | staticKeys: ['appendAsTree'], 25 | preTransformNode, 26 | genData 27 | } 28 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import props from './props' 4 | import append from './append' 5 | import recycleList from './recycle-list/index' 6 | 7 | export default [ 8 | recycleList, 9 | klass, 10 | style, 11 | props, 12 | append 13 | ] 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/props.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { cached, camelize } from 'shared/util' 4 | 5 | const normalize = cached(camelize) 6 | 7 | function normalizeKeyName (str: string): string { 8 | if (str.match(/^v\-/)) { 9 | return str.replace(/(v-[a-z\-]+\:)([a-z\-]+)$/i, ($, directive, prop) => { 10 | return directive + normalize(prop) 11 | }) 12 | } 13 | return normalize(str) 14 | } 15 | 16 | function transformNode (el: ASTElement) { 17 | if (Array.isArray(el.attrsList)) { 18 | el.attrsList.forEach(attr => { 19 | if (attr.name && attr.name.match(/\-/)) { 20 | const realName = normalizeKeyName(attr.name) 21 | if (el.attrsMap) { 22 | el.attrsMap[realName] = el.attrsMap[attr.name] 23 | delete el.attrsMap[attr.name] 24 | } 25 | if (el.rawAttrsMap && el.rawAttrsMap[attr.name]) { 26 | el.rawAttrsMap[realName] = el.rawAttrsMap[attr.name] 27 | // $flow-disable-line 28 | delete el.rawAttrsMap[attr.name] 29 | } 30 | attr.name = realName 31 | } 32 | }) 33 | } 34 | } 35 | export default { 36 | transformNode 37 | } 38 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/component-root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | // mark component root nodes as 6 | export function postTransformComponentRoot (el: ASTElement) { 7 | if (!el.parent) { 8 | // component root 9 | addAttr(el, '@isComponentRoot', 'true') 10 | addAttr(el, '@templateId', '_uid') 11 | addAttr(el, '@componentProps', '$props || {}') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/component.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | import { RECYCLE_LIST_MARKER } from 'weex/util/index' 5 | 6 | // mark components as inside recycle-list so that we know we need to invoke 7 | // their special @render function instead of render in create-component.js 8 | export function postTransformComponent ( 9 | el: ASTElement, 10 | options: WeexCompilerOptions 11 | ) { 12 | // $flow-disable-line (we know isReservedTag is there) 13 | if (!options.isReservedTag(el.tag) && el.tag !== 'cell-slot') { 14 | addAttr(el, RECYCLE_LIST_MARKER, 'true') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | function genText (node: ASTNode) { 6 | const value = node.type === 3 7 | ? node.text 8 | : node.type === 2 9 | ? node.tokens.length === 1 10 | ? node.tokens[0] 11 | : node.tokens 12 | : '' 13 | return JSON.stringify(value) 14 | } 15 | 16 | export function postTransformText (el: ASTElement) { 17 | // weex can only contain text, so the parser 18 | // always generates a single child. 19 | if (el.children.length) { 20 | addAttr(el, 'value', genText(el.children[0])) 21 | el.children = [] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/v-bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { camelize } from 'shared/util' 4 | import { generateBinding } from 'weex/util/parser' 5 | import { bindRE } from 'compiler/parser/index' 6 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 7 | 8 | function parseAttrName (name: string): string { 9 | return camelize(name.replace(bindRE, '')) 10 | } 11 | 12 | export function preTransformVBind (el: ASTElement) { 13 | for (const attr in el.attrsMap) { 14 | if (bindRE.test(attr)) { 15 | const name: string = parseAttrName(attr) 16 | const value = generateBinding(getAndRemoveAttr(el, attr)) 17 | delete el.attrsMap[attr] 18 | addRawAttr(el, name, value) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/v-for.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parseFor } from 'compiler/parser/index' 4 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 5 | 6 | export function preTransformVFor (el: ASTElement, options: WeexCompilerOptions) { 7 | const exp = getAndRemoveAttr(el, 'v-for') 8 | if (!exp) { 9 | return 10 | } 11 | 12 | const res = parseFor(exp) 13 | if (!res) { 14 | if (process.env.NODE_ENV !== 'production' && options.warn) { 15 | options.warn(`Invalid v-for expression: ${exp}`) 16 | } 17 | return 18 | } 19 | 20 | const desc: Object = { 21 | '@expression': res.for, 22 | '@alias': res.alias 23 | } 24 | if (res.iterator2) { 25 | desc['@key'] = res.iterator1 26 | desc['@index'] = res.iterator2 27 | } else { 28 | desc['@index'] = res.iterator1 29 | } 30 | 31 | delete el.attrsMap['v-for'] 32 | addRawAttr(el, '[[repeat]]', desc) 33 | } 34 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/v-on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const inlineStatementRE = /^\s*([A-Za-z_$0-9\['\."\]]+)*\s*\(\s*(([A-Za-z_$0-9\['\."\]]+)?(\s*,\s*([A-Za-z_$0-9\['\."\]]+))*)\s*\)$/ 4 | 5 | function parseHandlerParams (handler: ASTElementHandler) { 6 | const res = inlineStatementRE.exec(handler.value) 7 | if (res && res[2]) { 8 | handler.params = res[2].split(/\s*,\s*/) 9 | } 10 | } 11 | 12 | export function postTransformVOn (el: ASTElement) { 13 | const events: ASTElementHandlers | void = el.events 14 | if (!events) { 15 | return 16 | } 17 | for (const name in events) { 18 | const handler: ASTElementHandler | Array = events[name] 19 | if (Array.isArray(handler)) { 20 | handler.map(fn => parseHandlerParams(fn)) 21 | } else { 22 | parseHandlerParams(handler) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/compiler/modules/recycle-list/v-once.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 4 | 5 | function containVOnce (el: ASTElement): boolean { 6 | for (const attr in el.attrsMap) { 7 | if (/^v\-once$/i.test(attr)) { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | export function preTransformVOnce (el: ASTElement) { 15 | if (containVOnce(el)) { 16 | getAndRemoveAttr(el, 'v-once', true) 17 | addRawAttr(el, '[[once]]', true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/entry-compiler.js: -------------------------------------------------------------------------------- 1 | export { compile } from 'weex/compiler/index' 2 | export { generateCodeFrame } from 'compiler/codeframe' 3 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/entry-runtime-factory.js: -------------------------------------------------------------------------------- 1 | // this entry is built and wrapped with a factory function 2 | // used to generate a fresh copy of Vue for every Weex instance. 3 | 4 | import Vue from './runtime/index' 5 | 6 | exports.Vue = Vue 7 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Richtext from './richtext' 2 | import Transition from './transition' 3 | import TransitionGroup from './transition-group' 4 | 5 | export default { 6 | Richtext, 7 | Transition, 8 | TransitionGroup 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/components/transition.js: -------------------------------------------------------------------------------- 1 | // reuse same transition component logic from web 2 | export { 3 | transitionProps, 4 | extractTransitionData 5 | } from 'web/runtime/components/transition' 6 | 7 | import Transition from 'web/runtime/components/transition' 8 | 9 | export default Transition 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | } 3 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from 'core/index' 4 | import { patch } from 'weex/runtime/patch' 5 | import { mountComponent } from 'core/instance/lifecycle' 6 | import platformDirectives from 'weex/runtime/directives/index' 7 | import platformComponents from 'weex/runtime/components/index' 8 | 9 | import { 10 | query, 11 | mustUseProp, 12 | isReservedTag, 13 | isRuntimeComponent, 14 | isUnknownElement 15 | } from 'weex/util/element' 16 | 17 | // install platform specific utils 18 | Vue.config.mustUseProp = mustUseProp 19 | Vue.config.isReservedTag = isReservedTag 20 | Vue.config.isRuntimeComponent = isRuntimeComponent 21 | Vue.config.isUnknownElement = isUnknownElement 22 | 23 | // install platform runtime directives and components 24 | Vue.options.directives = platformDirectives 25 | Vue.options.components = platformComponents 26 | 27 | // install platform patch function 28 | Vue.prototype.__patch__ = patch 29 | 30 | // wrap mount 31 | Vue.prototype.$mount = function ( 32 | el?: any, 33 | hydrating?: boolean 34 | ): Component { 35 | return mountComponent( 36 | this, 37 | el && query(el, this.$document), 38 | hydrating 39 | ) 40 | } 41 | 42 | export default Vue 43 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import style from './style' 5 | import transition from './transition' 6 | 7 | export default [ 8 | attrs, 9 | klass, 10 | events, 11 | style, 12 | transition 13 | ] 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'weex/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'weex/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ 13 | nodeOps, 14 | modules, 15 | LONG_LIST_THRESHOLD: 10 16 | }) 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/platforms/weex/runtime/text-node.js: -------------------------------------------------------------------------------- 1 | let latestNodeId = 1 2 | 3 | export default function TextNode (text) { 4 | this.instanceId = '' 5 | this.nodeId = latestNodeId++ 6 | this.parentNode = null 7 | this.nodeType = 3 8 | this.text = text 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/server/create-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { createWriteFunction } from './write' 4 | import { createRenderFunction } from './render' 5 | import type { RenderOptions } from './create-renderer' 6 | 7 | export function createBasicRenderer ({ 8 | modules = [], 9 | directives = {}, 10 | isUnaryTag = (() => false), 11 | cache 12 | }: RenderOptions = {}) { 13 | const render = createRenderFunction(modules, directives, isUnaryTag, cache) 14 | 15 | return function renderToString ( 16 | component: Component, 17 | context: any, 18 | done: any 19 | ): void { 20 | if (typeof context === 'function') { 21 | done = context 22 | context = {} 23 | } 24 | let result = '' 25 | const write = createWriteFunction(text => { 26 | result += text 27 | return false 28 | }, done) 29 | try { 30 | render(component, write, context, () => { 31 | done(null, result) 32 | }) 33 | } catch (e) { 34 | done(e) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/server/optimizing-compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from 'compiler/parser/index' 4 | import { generate } from './codegen' 5 | import { optimize } from './optimizer' 6 | import { createCompilerCreator } from 'compiler/create-compiler' 7 | 8 | export const createCompiler = createCompilerCreator(function baseCompile ( 9 | template: string, 10 | options: CompilerOptions 11 | ): CompiledResult { 12 | const ast = parse(template.trim(), options) 13 | optimize(ast, options) 14 | const code = generate(ast, options) 15 | return { 16 | ast, 17 | render: code.render, 18 | staticRenderFns: code.staticRenderFns 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/server/template-renderer/parse-template.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const compile = require('lodash.template') 4 | const compileOptions = { 5 | escape: /{{([^{][\s\S]+?[^}])}}/g, 6 | interpolate: /{{{([\s\S]+?)}}}/g 7 | } 8 | 9 | export type ParsedTemplate = { 10 | head: (data: any) => string; 11 | neck: (data: any) => string; 12 | tail: (data: any) => string; 13 | }; 14 | 15 | export function parseTemplate ( 16 | template: string, 17 | contentPlaceholder?: string = '' 18 | ): ParsedTemplate { 19 | if (typeof template === 'object') { 20 | return template 21 | } 22 | 23 | let i = template.indexOf('') 24 | const j = template.indexOf(contentPlaceholder) 25 | 26 | if (j < 0) { 27 | throw new Error(`Content placeholder not found in template.`) 28 | } 29 | 30 | if (i < 0) { 31 | i = template.indexOf('') 32 | if (i < 0) { 33 | i = j 34 | } 35 | } 36 | 37 | return { 38 | head: compile(template.slice(0, i), compileOptions), 39 | neck: compile(template.slice(i, j), compileOptions), 40 | tail: compile(template.slice(j + contentPlaceholder.length), compileOptions) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/server/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file) 4 | 5 | export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file) 6 | 7 | export function createPromiseCallback () { 8 | let resolve, reject 9 | const promise: Promise = new Promise((_resolve, _reject) => { 10 | resolve = _resolve 11 | reject = _reject 12 | }) 13 | const cb = (err: Error, res?: string) => { 14 | if (err) return reject(err) 15 | resolve(res || '') 16 | } 17 | return { promise, cb } 18 | } 19 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/server/webpack-plugin/util.js: -------------------------------------------------------------------------------- 1 | const { red, yellow } = require('chalk') 2 | 3 | const prefix = `[vue-server-renderer-webpack-plugin]` 4 | const warn = exports.warn = msg => console.error(red(`${prefix} ${msg}\n`)) 5 | const tip = exports.tip = msg => console.log(yellow(`${prefix} ${msg}\n`)) 6 | 7 | export const validate = compiler => { 8 | if (compiler.options.target !== 'node') { 9 | warn('webpack config `target` should be "node".') 10 | } 11 | 12 | if (compiler.options.output && compiler.options.output.libraryTarget !== 'commonjs2') { 13 | warn('webpack config `output.libraryTarget` should be "commonjs2".') 14 | } 15 | 16 | if (!compiler.options.externals) { 17 | tip( 18 | 'It is recommended to externalize dependencies in the server build for ' + 19 | 'better build performance.' 20 | ) 21 | } 22 | } 23 | 24 | export const onEmit = (compiler, name, hook) => { 25 | if (compiler.hooks) { 26 | // Webpack >= 4.0.0 27 | compiler.hooks.emit.tapAsync(name, hook) 28 | } else { 29 | // Webpack < 4.0.0 30 | compiler.plugin('emit', hook) 31 | } 32 | } 33 | 34 | export { isJS, isCSS } from '../util' 35 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const SSR_ATTR = 'data-server-rendered' 2 | 3 | export const ASSET_TYPES = [ 4 | 'component', 5 | 'directive', 6 | 'filter' 7 | ] 8 | 9 | export const LIFECYCLE_HOOKS = [ 10 | 'beforeCreate', 11 | 'created', 12 | 'beforeMount', 13 | 'mounted', 14 | 'beforeUpdate', 15 | 'updated', 16 | 'beforeDestroy', 17 | 'destroyed', 18 | 'activated', 19 | 'deactivated', 20 | 'errorCaptured', 21 | 'serverPrefetch' 22 | ] 23 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | 3 | export default Vue; 4 | 5 | export as namespace Vue; 6 | 7 | export { 8 | CreateElement, 9 | VueConstructor 10 | } from "./vue"; 11 | 12 | export { 13 | Component, 14 | AsyncComponent, 15 | ComponentOptions, 16 | FunctionalComponentOptions, 17 | RenderContext, 18 | PropType, 19 | PropOptions, 20 | ComputedOptions, 21 | WatchHandler, 22 | WatchOptions, 23 | WatchOptionsWithHandler, 24 | DirectiveFunction, 25 | DirectiveOptions 26 | } from "./options"; 27 | 28 | export { 29 | PluginFunction, 30 | PluginObject 31 | } from "./plugin"; 32 | 33 | export { 34 | VNodeChildren, 35 | VNodeChildrenArrayContents, 36 | VNode, 37 | VNodeComponentOptions, 38 | VNodeData, 39 | VNodeDirective 40 | } from "./vnode"; 41 | -------------------------------------------------------------------------------- /01/lib/node_modules/_vue@2.6.10@vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013-present, Yuxi (Evan) You 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/dist/vue.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/dist/vue.runtime.common.js: -------------------------------------------------------------------------------- 1 | if (process.env.NODE_ENV === 'production') { 2 | module.exports = require('./vue.runtime.common.prod.js') 3 | } else { 4 | module.exports = require('./vue.runtime.common.dev.js') 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/vue/src/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/compiler/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/vue/src/compiler/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/compiler/directives/bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function bind (el: ASTElement, dir: ASTDirective) { 4 | el.wrapData = (code: string) => { 5 | return `_b(${code},'${el.tag}',${dir.value},${ 6 | dir.modifiers && dir.modifiers.prop ? 'true' : 'false' 7 | }${ 8 | dir.modifiers && dir.modifiers.sync ? ',true' : '' 9 | })` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import on from './on' 4 | import bind from './bind' 5 | import { noop } from 'shared/util' 6 | 7 | export default { 8 | on, 9 | bind, 10 | cloak: noop 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/compiler/directives/on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export default function on (el: ASTElement, dir: ASTDirective) { 6 | if (process.env.NODE_ENV !== 'production' && dir.modifiers) { 7 | warn(`v-on without argument does not support modifiers.`) 8 | } 9 | el.wrapListeners = (code: string) => `_g(${code},${dir.value})` 10 | } 11 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from './parser/index' 4 | import { optimize } from './optimizer' 5 | import { generate } from './codegen/index' 6 | import { createCompilerCreator } from './create-compiler' 7 | 8 | // `createCompilerCreator` allows creating compilers that use alternative 9 | // parser/optimizer/codegen, e.g the SSR optimizing compiler. 10 | // Here we just export a default compiler using the default parts. 11 | export const createCompiler = createCompilerCreator(function baseCompile ( 12 | template: string, 13 | options: CompilerOptions 14 | ): CompiledResult { 15 | const ast = parse(template.trim(), options) 16 | if (options.optimize !== false) { 17 | optimize(ast, options) 18 | } 19 | const code = generate(ast, options) 20 | return { 21 | ast, 22 | render: code.render, 23 | staticRenderFns: code.staticRenderFns 24 | } 25 | }) 26 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/compiler/parser/entity-decoder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | let decoder 4 | 5 | export default { 6 | decode (html: string): string { 7 | decoder = decoder || document.createElement('div') 8 | decoder.innerHTML = html 9 | return decoder.textContent 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/components/index.js: -------------------------------------------------------------------------------- 1 | import KeepAlive from './keep-alive' 2 | 3 | export default { 4 | KeepAlive 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/global-api/assets.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { ASSET_TYPES } from 'shared/constants' 4 | import { isPlainObject, validateComponentName } from '../util/index' 5 | 6 | export function initAssetRegisters (Vue: GlobalAPI) { 7 | /** 8 | * Create asset registration methods. 9 | */ 10 | ASSET_TYPES.forEach(type => { 11 | Vue[type] = function ( 12 | id: string, 13 | definition: Function | Object 14 | ): Function | Object | void { 15 | if (!definition) { 16 | return this.options[type + 's'][id] 17 | } else { 18 | /* istanbul ignore if */ 19 | if (process.env.NODE_ENV !== 'production' && type === 'component') { 20 | validateComponentName(id) 21 | } 22 | if (type === 'component' && isPlainObject(definition)) { 23 | definition.name = definition.name || id 24 | definition = this.options._base.extend(definition) 25 | } 26 | if (type === 'directive' && typeof definition === 'function') { 27 | definition = { bind: definition, update: definition } 28 | } 29 | this.options[type + 's'][id] = definition 30 | return definition 31 | } 32 | } 33 | }) 34 | } 35 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/global-api/mixin.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { mergeOptions } from '../util/index' 4 | 5 | export function initMixin (Vue: GlobalAPI) { 6 | Vue.mixin = function (mixin: Object) { 7 | this.options = mergeOptions(this.options, mixin) 8 | return this 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/global-api/use.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { toArray } from '../util/index' 4 | 5 | export function initUse (Vue: GlobalAPI) { 6 | Vue.use = function (plugin: Function | Object) { 7 | const installedPlugins = (this._installedPlugins || (this._installedPlugins = [])) 8 | if (installedPlugins.indexOf(plugin) > -1) { 9 | return this 10 | } 11 | 12 | // additional parameters 13 | const args = toArray(arguments, 1) 14 | args.unshift(this) 15 | if (typeof plugin.install === 'function') { 16 | plugin.install.apply(plugin, args) 17 | } else if (typeof plugin === 'function') { 18 | plugin.apply(null, args) 19 | } 20 | installedPlugins.push(plugin) 21 | return this 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/index.js: -------------------------------------------------------------------------------- 1 | import Vue from './instance/index' 2 | import { initGlobalAPI } from './global-api/index' 3 | import { isServerRendering } from 'core/util/env' 4 | import { FunctionalRenderContext } from 'core/vdom/create-functional-component' 5 | 6 | initGlobalAPI(Vue) 7 | 8 | Object.defineProperty(Vue.prototype, '$isServer', { 9 | get: isServerRendering 10 | }) 11 | 12 | Object.defineProperty(Vue.prototype, '$ssrContext', { 13 | get () { 14 | /* istanbul ignore next */ 15 | return this.$vnode && this.$vnode.ssrContext 16 | } 17 | }) 18 | 19 | // expose FunctionalRenderContext for ssr runtime helper installation 20 | Object.defineProperty(Vue, 'FunctionalRenderContext', { 21 | value: FunctionalRenderContext 22 | }) 23 | 24 | Vue.version = '__VERSION__' 25 | 26 | export default Vue 27 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/instance/index.js: -------------------------------------------------------------------------------- 1 | import { initMixin } from './init' 2 | import { stateMixin } from './state' 3 | import { renderMixin } from './render' 4 | import { eventsMixin } from './events' 5 | import { lifecycleMixin } from './lifecycle' 6 | import { warn } from '../util/index' 7 | 8 | function Vue (options) { 9 | if (process.env.NODE_ENV !== 'production' && 10 | !(this instanceof Vue) 11 | ) { 12 | warn('Vue is a constructor and should be called with the `new` keyword') 13 | } 14 | this._init(options) 15 | } 16 | 17 | initMixin(Vue) 18 | stateMixin(Vue) 19 | eventsMixin(Vue) 20 | lifecycleMixin(Vue) 21 | renderMixin(Vue) 22 | 23 | export default Vue 24 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/instance/render-helpers/bind-object-listeners.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn, extend, isPlainObject } from 'core/util/index' 4 | 5 | export function bindObjectListeners (data: any, value: any): VNodeData { 6 | if (value) { 7 | if (!isPlainObject(value)) { 8 | process.env.NODE_ENV !== 'production' && warn( 9 | 'v-on without argument expects an Object value', 10 | this 11 | ) 12 | } else { 13 | const on = data.on = data.on ? extend({}, data.on) : {} 14 | for (const key in value) { 15 | const existing = on[key] 16 | const ours = value[key] 17 | on[key] = existing ? [].concat(existing, ours) : ours 18 | } 19 | } 20 | } 21 | return data 22 | } 23 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/instance/render-helpers/check-keycodes.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import config from 'core/config' 4 | import { hyphenate } from 'shared/util' 5 | 6 | function isKeyNotMatch (expect: T | Array, actual: T): boolean { 7 | if (Array.isArray(expect)) { 8 | return expect.indexOf(actual) === -1 9 | } else { 10 | return expect !== actual 11 | } 12 | } 13 | 14 | /** 15 | * Runtime helper for checking keyCodes from config. 16 | * exposed as Vue.prototype._k 17 | * passing in eventKeyName as last argument separately for backwards compat 18 | */ 19 | export function checkKeyCodes ( 20 | eventKeyCode: number, 21 | key: string, 22 | builtInKeyCode?: number | Array, 23 | eventKeyName?: string, 24 | builtInKeyName?: string | Array 25 | ): ?boolean { 26 | const mappedKeyCode = config.keyCodes[key] || builtInKeyCode 27 | if (builtInKeyName && eventKeyName && !config.keyCodes[key]) { 28 | return isKeyNotMatch(builtInKeyName, eventKeyName) 29 | } else if (mappedKeyCode) { 30 | return isKeyNotMatch(mappedKeyCode, eventKeyCode) 31 | } else if (eventKeyName) { 32 | return hyphenate(eventKeyName) !== key 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/instance/render-helpers/render-slot.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { extend, warn, isObject } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for rendering 7 | */ 8 | export function renderSlot ( 9 | name: string, 10 | fallback: ?Array, 11 | props: ?Object, 12 | bindObject: ?Object 13 | ): ?Array { 14 | const scopedSlotFn = this.$scopedSlots[name] 15 | let nodes 16 | if (scopedSlotFn) { // scoped slot 17 | props = props || {} 18 | if (bindObject) { 19 | if (process.env.NODE_ENV !== 'production' && !isObject(bindObject)) { 20 | warn( 21 | 'slot v-bind without argument expects an Object', 22 | this 23 | ) 24 | } 25 | props = extend(extend({}, bindObject), props) 26 | } 27 | nodes = scopedSlotFn(props) || fallback 28 | } else { 29 | nodes = this.$slots[name] || fallback 30 | } 31 | 32 | const target = props && props.slot 33 | if (target) { 34 | return this.$createElement('template', { slot: target }, nodes) 35 | } else { 36 | return nodes 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/instance/render-helpers/resolve-filter.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { identity, resolveAsset } from 'core/util/index' 4 | 5 | /** 6 | * Runtime helper for resolving filters 7 | */ 8 | export function resolveFilter (id: string): Function { 9 | return resolveAsset(this.$options, 'filters', id, true) || identity 10 | } 11 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/instance/render-helpers/resolve-scoped-slots.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function resolveScopedSlots ( 4 | fns: ScopedSlotsData, // see flow/vnode 5 | res?: Object, 6 | // the following are added in 2.6 7 | hasDynamicKeys?: boolean, 8 | contentHashKey?: number 9 | ): { [key: string]: Function, $stable: boolean } { 10 | res = res || { $stable: !hasDynamicKeys } 11 | for (let i = 0; i < fns.length; i++) { 12 | const slot = fns[i] 13 | if (Array.isArray(slot)) { 14 | resolveScopedSlots(slot, res, hasDynamicKeys) 15 | } else if (slot) { 16 | // marker for reverse proxying v-slot without scope on this.$slots 17 | if (slot.proxy) { 18 | slot.fn.proxy = true 19 | } 20 | res[slot.key] = slot.fn 21 | } 22 | } 23 | if (contentHashKey) { 24 | (res: any).$key = contentHashKey 25 | } 26 | return res 27 | } 28 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/observer/array.js: -------------------------------------------------------------------------------- 1 | /* 2 | * not type checking this file because flow doesn't play well with 3 | * dynamically accessing methods on Array prototype 4 | */ 5 | 6 | import { def } from '../util/index' 7 | 8 | const arrayProto = Array.prototype 9 | export const arrayMethods = Object.create(arrayProto) 10 | 11 | const methodsToPatch = [ 12 | 'push', 13 | 'pop', 14 | 'shift', 15 | 'unshift', 16 | 'splice', 17 | 'sort', 18 | 'reverse' 19 | ] 20 | 21 | /** 22 | * Intercept mutating methods and emit events 23 | */ 24 | methodsToPatch.forEach(function (method) { 25 | // cache original method 26 | const original = arrayProto[method] 27 | def(arrayMethods, method, function mutator (...args) { 28 | const result = original.apply(this, args) 29 | const ob = this.__ob__ 30 | let inserted 31 | switch (method) { 32 | case 'push': 33 | case 'unshift': 34 | inserted = args 35 | break 36 | case 'splice': 37 | inserted = args.slice(2) 38 | break 39 | } 40 | if (inserted) ob.observeArray(inserted) 41 | // notify change 42 | ob.dep.notify() 43 | return result 44 | }) 45 | }) 46 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/observer/traverse.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { _Set as Set, isObject } from '../util/index' 4 | import type { SimpleSet } from '../util/index' 5 | import VNode from '../vdom/vnode' 6 | 7 | const seenObjects = new Set() 8 | 9 | /** 10 | * Recursively traverse an object to evoke all converted 11 | * getters, so that every nested property inside the object 12 | * is collected as a "deep" dependency. 13 | */ 14 | export function traverse (val: any) { 15 | _traverse(val, seenObjects) 16 | seenObjects.clear() 17 | } 18 | 19 | function _traverse (val: any, seen: SimpleSet) { 20 | let i, keys 21 | const isA = Array.isArray(val) 22 | if ((!isA && !isObject(val)) || Object.isFrozen(val) || val instanceof VNode) { 23 | return 24 | } 25 | if (val.__ob__) { 26 | const depId = val.__ob__.dep.id 27 | if (seen.has(depId)) { 28 | return 29 | } 30 | seen.add(depId) 31 | } 32 | if (isA) { 33 | i = val.length 34 | while (i--) _traverse(val[i], seen) 35 | } else { 36 | keys = Object.keys(val) 37 | i = keys.length 38 | while (i--) _traverse(val[keys[i]], seen) 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from 'shared/util' 4 | export * from './lang' 5 | export * from './env' 6 | export * from './options' 7 | export * from './debug' 8 | export * from './props' 9 | export * from './error' 10 | export * from './next-tick' 11 | export { defineReactive } from '../observer/index' 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/util/perf.js: -------------------------------------------------------------------------------- 1 | import { inBrowser } from './env' 2 | 3 | export let mark 4 | export let measure 5 | 6 | if (process.env.NODE_ENV !== 'production') { 7 | const perf = inBrowser && window.performance 8 | /* istanbul ignore if */ 9 | if ( 10 | perf && 11 | perf.mark && 12 | perf.measure && 13 | perf.clearMarks && 14 | perf.clearMeasures 15 | ) { 16 | mark = tag => perf.mark(tag) 17 | measure = (name, startTag, endTag) => { 18 | perf.measure(name, startTag, endTag) 19 | perf.clearMarks(startTag) 20 | perf.clearMarks(endTag) 21 | // perf.clearMeasures(name) 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/vdom/helpers/get-first-component-child.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { isDef } from 'shared/util' 4 | import { isAsyncPlaceholder } from './is-async-placeholder' 5 | 6 | export function getFirstComponentChild (children: ?Array): ?VNode { 7 | if (Array.isArray(children)) { 8 | for (let i = 0; i < children.length; i++) { 9 | const c = children[i] 10 | if (isDef(c) && (isDef(c.componentOptions) || isAsyncPlaceholder(c))) { 11 | return c 12 | } 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/vdom/helpers/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export * from './merge-hook' 4 | export * from './extract-props' 5 | export * from './update-listeners' 6 | export * from './normalize-children' 7 | export * from './resolve-async-component' 8 | export * from './get-first-component-child' 9 | export * from './is-async-placeholder' 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/vdom/helpers/is-async-placeholder.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export function isAsyncPlaceholder (node: VNode): boolean { 4 | return node.isComment && node.asyncFactory 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/vdom/helpers/merge-hook.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import VNode from '../vnode' 4 | import { createFnInvoker } from './update-listeners' 5 | import { remove, isDef, isUndef, isTrue } from 'shared/util' 6 | 7 | export function mergeVNodeHook (def: Object, hookKey: string, hook: Function) { 8 | if (def instanceof VNode) { 9 | def = def.data.hook || (def.data.hook = {}) 10 | } 11 | let invoker 12 | const oldHook = def[hookKey] 13 | 14 | function wrappedHook () { 15 | hook.apply(this, arguments) 16 | // important: remove merged hook to ensure it's called only once 17 | // and prevent memory leak 18 | remove(invoker.fns, wrappedHook) 19 | } 20 | 21 | if (isUndef(oldHook)) { 22 | // no existing hook 23 | invoker = createFnInvoker([wrappedHook]) 24 | } else { 25 | /* istanbul ignore if */ 26 | if (isDef(oldHook.fns) && isTrue(oldHook.merged)) { 27 | // already a merged invoker 28 | invoker = oldHook 29 | invoker.fns.push(wrappedHook) 30 | } else { 31 | // existing plain hook 32 | invoker = createFnInvoker([oldHook, wrappedHook]) 33 | } 34 | } 35 | 36 | invoker.merged = true 37 | def[hookKey] = invoker 38 | } 39 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/core/vdom/modules/index.js: -------------------------------------------------------------------------------- 1 | import directives from './directives' 2 | import ref from './ref' 3 | 4 | export default [ 5 | ref, 6 | directives 7 | ] 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/vue/src/platforms/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/directives/html.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function html (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'innerHTML', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import text from './text' 3 | import html from './html' 4 | 5 | export default { 6 | model, 7 | text, 8 | html 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/directives/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addProp } from 'compiler/helpers' 4 | 5 | export default function text (el: ASTElement, dir: ASTDirective) { 6 | if (dir.value) { 7 | addProp(el, 'textContent', `_s(${dir.value})`, dir) 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from './options' 4 | import { createCompiler } from 'compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { compile, compileToFunctions } 9 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import model from './model' 4 | 5 | export default [ 6 | klass, 7 | style, 8 | model 9 | ] 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/options.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isPreTag, 5 | mustUseProp, 6 | isReservedTag, 7 | getTagNamespace 8 | } from '../util/index' 9 | 10 | import modules from './modules/index' 11 | import directives from './directives/index' 12 | import { genStaticKeys } from 'shared/util' 13 | import { isUnaryTag, canBeLeftOpenTag } from './util' 14 | 15 | export const baseOptions: CompilerOptions = { 16 | expectHTML: true, 17 | modules, 18 | directives, 19 | isPreTag, 20 | isUnaryTag, 21 | mustUseProp, 22 | canBeLeftOpenTag, 23 | isReservedTag, 24 | getTagNamespace, 25 | staticKeys: genStaticKeys(modules) 26 | } 27 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/compiler/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | export const isUnaryTag = makeMap( 6 | 'area,base,br,col,embed,frame,hr,img,input,isindex,keygen,' + 7 | 'link,meta,param,source,track,wbr' 8 | ) 9 | 10 | // Elements that you can, intentionally, leave open 11 | // (and which close themselves) 12 | export const canBeLeftOpenTag = makeMap( 13 | 'colgroup,dd,dt,li,options,p,td,tfoot,th,thead,tr,source' 14 | ) 15 | 16 | // HTML5 tags https://html.spec.whatwg.org/multipage/indices.html#elements-3 17 | // Phrasing Content https://html.spec.whatwg.org/multipage/dom.html#phrasing-content 18 | export const isNonPhrasingTag = makeMap( 19 | 'address,article,aside,base,blockquote,body,caption,col,colgroup,dd,' + 20 | 'details,dialog,div,dl,dt,fieldset,figcaption,figure,footer,form,' + 21 | 'h1,h2,h3,h4,h5,h6,head,header,hgroup,hr,html,legend,li,menuitem,meta,' + 22 | 'optgroup,option,param,rp,rt,source,style,summary,tbody,td,tfoot,th,thead,' + 23 | 'title,tr,track' 24 | ) 25 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/entry-compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export { parseComponent } from 'sfc/parser' 4 | export { compile, compileToFunctions } from './compiler/index' 5 | export { ssrCompile, ssrCompileToFunctions } from './server/compiler' 6 | export { generateCodeFrame } from 'compiler/codeframe' 7 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/entry-runtime.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from './runtime/index' 4 | 5 | export default Vue 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/entry-server-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import modules from './server/modules/index' 4 | import directives from './server/directives/index' 5 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 6 | import { createBasicRenderer } from 'server/create-basic-renderer' 7 | 8 | export default createBasicRenderer({ 9 | modules, 10 | directives, 11 | isUnaryTag, 12 | canBeLeftOpenTag 13 | }) 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/entry-server-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | process.env.VUE_ENV = 'server' 4 | 5 | import { extend } from 'shared/util' 6 | import modules from './server/modules/index' 7 | import baseDirectives from './server/directives/index' 8 | import { isUnaryTag, canBeLeftOpenTag } from './compiler/util' 9 | 10 | import { createRenderer as _createRenderer } from 'server/create-renderer' 11 | import { createBundleRendererCreator } from 'server/bundle-renderer/create-bundle-renderer' 12 | 13 | export function createRenderer (options?: Object = {}): { 14 | renderToString: Function, 15 | renderToStream: Function 16 | } { 17 | return _createRenderer(extend(extend({}, options), { 18 | isUnaryTag, 19 | canBeLeftOpenTag, 20 | modules, 21 | // user can provide server-side implementations for custom directives 22 | // when creating the renderer. 23 | directives: extend(baseDirectives, options.directives) 24 | })) 25 | } 26 | 27 | export const createBundleRenderer = createBundleRendererCreator(createRenderer) 28 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Transition from './transition' 2 | import TransitionGroup from './transition-group' 3 | 4 | export default { 5 | Transition, 6 | TransitionGroup 7 | } 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | import show from './show' 3 | 4 | export default { 5 | model, 6 | show 7 | } 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/runtime/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { 4 | isDef, 5 | isUndef 6 | } from 'shared/util' 7 | 8 | import { 9 | concat, 10 | stringifyClass, 11 | genClassForVnode 12 | } from 'web/util/index' 13 | 14 | function updateClass (oldVnode: any, vnode: any) { 15 | const el = vnode.elm 16 | const data: VNodeData = vnode.data 17 | const oldData: VNodeData = oldVnode.data 18 | if ( 19 | isUndef(data.staticClass) && 20 | isUndef(data.class) && ( 21 | isUndef(oldData) || ( 22 | isUndef(oldData.staticClass) && 23 | isUndef(oldData.class) 24 | ) 25 | ) 26 | ) { 27 | return 28 | } 29 | 30 | let cls = genClassForVnode(vnode) 31 | 32 | // handle transition classes 33 | const transitionClass = el._transitionClasses 34 | if (isDef(transitionClass)) { 35 | cls = concat(cls, stringifyClass(transitionClass)) 36 | } 37 | 38 | // set the class 39 | if (cls !== el._prevClass) { 40 | el.setAttribute('class', cls) 41 | el._prevClass = cls 42 | } 43 | } 44 | 45 | export default { 46 | create: updateClass, 47 | update: updateClass 48 | } 49 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import domProps from './dom-props' 5 | import style from './style' 6 | import transition from './transition' 7 | 8 | export default [ 9 | attrs, 10 | klass, 11 | events, 12 | domProps, 13 | style, 14 | transition 15 | ] 16 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'web/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'web/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ nodeOps, modules }) 13 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/server/compiler.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { baseOptions } from '../compiler/options' 4 | import { createCompiler } from 'server/optimizing-compiler/index' 5 | 6 | const { compile, compileToFunctions } = createCompiler(baseOptions) 7 | 8 | export { 9 | compile as ssrCompile, 10 | compileToFunctions as ssrCompileToFunctions 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/server/directives/index.js: -------------------------------------------------------------------------------- 1 | import show from './show' 2 | import model from './model' 3 | 4 | export default { 5 | show, 6 | model 7 | } 8 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/server/directives/show.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export default function show (node: VNodeWithData, dir: VNodeDirective) { 4 | if (!dir.value) { 5 | const style: any = node.data.style || (node.data.style = {}) 6 | if (Array.isArray(style)) { 7 | style.push({ display: 'none' }) 8 | } else { 9 | style.display = 'none' 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/server/modules/class.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { escape } from '../util' 4 | import { genClassForVnode } from 'web/util/index' 5 | 6 | export default function renderClass (node: VNodeWithData): ?string { 7 | const classList = genClassForVnode(node) 8 | if (classList !== '') { 9 | return ` class="${escape(classList)}"` 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/server/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import domProps from './dom-props' 3 | import klass from './class' 4 | import style from './style' 5 | 6 | export default [ 7 | attrs, 8 | domProps, 9 | klass, 10 | style 11 | ] 12 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/util/compat.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { inBrowser } from 'core/util/index' 4 | 5 | // check whether current browser encodes a char inside attribute values 6 | let div 7 | function getShouldDecode (href: boolean): boolean { 8 | div = div || document.createElement('div') 9 | div.innerHTML = href ? `` : `
` 10 | return div.innerHTML.indexOf(' ') > 0 11 | } 12 | 13 | // #3663: IE encodes newlines inside attribute values while other browsers don't 14 | export const shouldDecodeNewlines = inBrowser ? getShouldDecode(false) : false 15 | // #6828: chrome encodes content in a[href] 16 | export const shouldDecodeNewlinesForHref = inBrowser ? getShouldDecode(true) : false 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/web/util/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { warn } from 'core/util/index' 4 | 5 | export * from './attrs' 6 | export * from './class' 7 | export * from './element' 8 | 9 | /** 10 | * Query an element selector if it's not an element already. 11 | */ 12 | export function query (el: string | Element): Element { 13 | if (typeof el === 'string') { 14 | const selected = document.querySelector(el) 15 | if (!selected) { 16 | process.env.NODE_ENV !== 'production' && warn( 17 | 'Cannot find element: ' + el 18 | ) 19 | return document.createElement('div') 20 | } 21 | return selected 22 | } else { 23 | return el 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/vue/src/platforms/weex/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/.DS_Store: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/01/lib/node_modules/vue/src/platforms/weex/compiler/.DS_Store -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/directives/index.js: -------------------------------------------------------------------------------- 1 | import model from './model' 2 | 3 | export default { 4 | model 5 | } 6 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/directives/model.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addHandler, addAttr } from 'compiler/helpers' 4 | import { genComponentModel, genAssignmentCode } from 'compiler/directives/model' 5 | 6 | export default function model ( 7 | el: ASTElement, 8 | dir: ASTDirective 9 | ): ?boolean { 10 | if (el.tag === 'input' || el.tag === 'textarea') { 11 | genDefaultModel(el, dir.value, dir.modifiers) 12 | } else { 13 | genComponentModel(el, dir.value, dir.modifiers) 14 | } 15 | } 16 | 17 | function genDefaultModel ( 18 | el: ASTElement, 19 | value: string, 20 | modifiers: ?ASTModifiers 21 | ): ?boolean { 22 | const { lazy, trim, number } = modifiers || {} 23 | const event = lazy ? 'change' : 'input' 24 | 25 | let valueExpression = `$event.target.attr.value${trim ? '.trim()' : ''}` 26 | if (number) { 27 | valueExpression = `_n(${valueExpression})` 28 | } 29 | 30 | const code = genAssignmentCode(value, valueExpression) 31 | addAttr(el, 'value', `(${value})`) 32 | addHandler(el, event, code, null, true) 33 | } 34 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/append.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { makeMap } from 'shared/util' 4 | 5 | // The "unitary tag" means that the tag node and its children 6 | // must be sent to the native together. 7 | const isUnitaryTag = makeMap('cell,header,cell-slot,recycle-list', true) 8 | 9 | function preTransformNode (el: ASTElement) { 10 | if (isUnitaryTag(el.tag) && !el.attrsList.some(item => item.name === 'append')) { 11 | el.attrsMap.append = 'tree' 12 | el.attrsList.push({ name: 'append', value: 'tree' }) 13 | } 14 | if (el.attrsMap.append === 'tree') { 15 | el.appendAsTree = true 16 | } 17 | } 18 | 19 | function genData (el: ASTElement): string { 20 | return el.appendAsTree ? `appendAsTree:true,` : '' 21 | } 22 | 23 | export default { 24 | staticKeys: ['appendAsTree'], 25 | preTransformNode, 26 | genData 27 | } 28 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/index.js: -------------------------------------------------------------------------------- 1 | import klass from './class' 2 | import style from './style' 3 | import props from './props' 4 | import append from './append' 5 | import recycleList from './recycle-list/index' 6 | 7 | export default [ 8 | recycleList, 9 | klass, 10 | style, 11 | props, 12 | append 13 | ] 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/props.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { cached, camelize } from 'shared/util' 4 | 5 | const normalize = cached(camelize) 6 | 7 | function normalizeKeyName (str: string): string { 8 | if (str.match(/^v\-/)) { 9 | return str.replace(/(v-[a-z\-]+\:)([a-z\-]+)$/i, ($, directive, prop) => { 10 | return directive + normalize(prop) 11 | }) 12 | } 13 | return normalize(str) 14 | } 15 | 16 | function transformNode (el: ASTElement) { 17 | if (Array.isArray(el.attrsList)) { 18 | el.attrsList.forEach(attr => { 19 | if (attr.name && attr.name.match(/\-/)) { 20 | const realName = normalizeKeyName(attr.name) 21 | if (el.attrsMap) { 22 | el.attrsMap[realName] = el.attrsMap[attr.name] 23 | delete el.attrsMap[attr.name] 24 | } 25 | if (el.rawAttrsMap && el.rawAttrsMap[attr.name]) { 26 | el.rawAttrsMap[realName] = el.rawAttrsMap[attr.name] 27 | // $flow-disable-line 28 | delete el.rawAttrsMap[attr.name] 29 | } 30 | attr.name = realName 31 | } 32 | }) 33 | } 34 | } 35 | export default { 36 | transformNode 37 | } 38 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component-root.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | // mark component root nodes as 6 | export function postTransformComponentRoot (el: ASTElement) { 7 | if (!el.parent) { 8 | // component root 9 | addAttr(el, '@isComponentRoot', 'true') 10 | addAttr(el, '@templateId', '_uid') 11 | addAttr(el, '@componentProps', '$props || {}') 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/component.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | import { RECYCLE_LIST_MARKER } from 'weex/util/index' 5 | 6 | // mark components as inside recycle-list so that we know we need to invoke 7 | // their special @render function instead of render in create-component.js 8 | export function postTransformComponent ( 9 | el: ASTElement, 10 | options: WeexCompilerOptions 11 | ) { 12 | // $flow-disable-line (we know isReservedTag is there) 13 | if (!options.isReservedTag(el.tag) && el.tag !== 'cell-slot') { 14 | addAttr(el, RECYCLE_LIST_MARKER, 'true') 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/text.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { addAttr } from 'compiler/helpers' 4 | 5 | function genText (node: ASTNode) { 6 | const value = node.type === 3 7 | ? node.text 8 | : node.type === 2 9 | ? node.tokens.length === 1 10 | ? node.tokens[0] 11 | : node.tokens 12 | : '' 13 | return JSON.stringify(value) 14 | } 15 | 16 | export function postTransformText (el: ASTElement) { 17 | // weex can only contain text, so the parser 18 | // always generates a single child. 19 | if (el.children.length) { 20 | addAttr(el, 'value', genText(el.children[0])) 21 | el.children = [] 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-bind.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { camelize } from 'shared/util' 4 | import { generateBinding } from 'weex/util/parser' 5 | import { bindRE } from 'compiler/parser/index' 6 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 7 | 8 | function parseAttrName (name: string): string { 9 | return camelize(name.replace(bindRE, '')) 10 | } 11 | 12 | export function preTransformVBind (el: ASTElement) { 13 | for (const attr in el.attrsMap) { 14 | if (bindRE.test(attr)) { 15 | const name: string = parseAttrName(attr) 16 | const value = generateBinding(getAndRemoveAttr(el, attr)) 17 | delete el.attrsMap[attr] 18 | addRawAttr(el, name, value) 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-for.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parseFor } from 'compiler/parser/index' 4 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 5 | 6 | export function preTransformVFor (el: ASTElement, options: WeexCompilerOptions) { 7 | const exp = getAndRemoveAttr(el, 'v-for') 8 | if (!exp) { 9 | return 10 | } 11 | 12 | const res = parseFor(exp) 13 | if (!res) { 14 | if (process.env.NODE_ENV !== 'production' && options.warn) { 15 | options.warn(`Invalid v-for expression: ${exp}`) 16 | } 17 | return 18 | } 19 | 20 | const desc: Object = { 21 | '@expression': res.for, 22 | '@alias': res.alias 23 | } 24 | if (res.iterator2) { 25 | desc['@key'] = res.iterator1 26 | desc['@index'] = res.iterator2 27 | } else { 28 | desc['@index'] = res.iterator1 29 | } 30 | 31 | delete el.attrsMap['v-for'] 32 | addRawAttr(el, '[[repeat]]', desc) 33 | } 34 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-on.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const inlineStatementRE = /^\s*([A-Za-z_$0-9\['\."\]]+)*\s*\(\s*(([A-Za-z_$0-9\['\."\]]+)?(\s*,\s*([A-Za-z_$0-9\['\."\]]+))*)\s*\)$/ 4 | 5 | function parseHandlerParams (handler: ASTElementHandler) { 6 | const res = inlineStatementRE.exec(handler.value) 7 | if (res && res[2]) { 8 | handler.params = res[2].split(/\s*,\s*/) 9 | } 10 | } 11 | 12 | export function postTransformVOn (el: ASTElement) { 13 | const events: ASTElementHandlers | void = el.events 14 | if (!events) { 15 | return 16 | } 17 | for (const name in events) { 18 | const handler: ASTElementHandler | Array = events[name] 19 | if (Array.isArray(handler)) { 20 | handler.map(fn => parseHandlerParams(fn)) 21 | } else { 22 | parseHandlerParams(handler) 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/compiler/modules/recycle-list/v-once.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { getAndRemoveAttr, addRawAttr } from 'compiler/helpers' 4 | 5 | function containVOnce (el: ASTElement): boolean { 6 | for (const attr in el.attrsMap) { 7 | if (/^v\-once$/i.test(attr)) { 8 | return true 9 | } 10 | } 11 | return false 12 | } 13 | 14 | export function preTransformVOnce (el: ASTElement) { 15 | if (containVOnce(el)) { 16 | getAndRemoveAttr(el, 'v-once', true) 17 | addRawAttr(el, '[[once]]', true) 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/entry-compiler.js: -------------------------------------------------------------------------------- 1 | export { compile } from 'weex/compiler/index' 2 | export { generateCodeFrame } from 'compiler/codeframe' 3 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/entry-runtime-factory.js: -------------------------------------------------------------------------------- 1 | // this entry is built and wrapped with a factory function 2 | // used to generate a fresh copy of Vue for every Weex instance. 3 | 4 | import Vue from './runtime/index' 5 | 6 | exports.Vue = Vue 7 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/components/index.js: -------------------------------------------------------------------------------- 1 | import Richtext from './richtext' 2 | import Transition from './transition' 3 | import TransitionGroup from './transition-group' 4 | 5 | export default { 6 | Richtext, 7 | Transition, 8 | TransitionGroup 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/components/transition.js: -------------------------------------------------------------------------------- 1 | // reuse same transition component logic from web 2 | export { 3 | transitionProps, 4 | extractTransitionData 5 | } from 'web/runtime/components/transition' 6 | 7 | import Transition from 'web/runtime/components/transition' 8 | 9 | export default Transition 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/directives/index.js: -------------------------------------------------------------------------------- 1 | export default { 2 | } 3 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import Vue from 'core/index' 4 | import { patch } from 'weex/runtime/patch' 5 | import { mountComponent } from 'core/instance/lifecycle' 6 | import platformDirectives from 'weex/runtime/directives/index' 7 | import platformComponents from 'weex/runtime/components/index' 8 | 9 | import { 10 | query, 11 | mustUseProp, 12 | isReservedTag, 13 | isRuntimeComponent, 14 | isUnknownElement 15 | } from 'weex/util/element' 16 | 17 | // install platform specific utils 18 | Vue.config.mustUseProp = mustUseProp 19 | Vue.config.isReservedTag = isReservedTag 20 | Vue.config.isRuntimeComponent = isRuntimeComponent 21 | Vue.config.isUnknownElement = isUnknownElement 22 | 23 | // install platform runtime directives and components 24 | Vue.options.directives = platformDirectives 25 | Vue.options.components = platformComponents 26 | 27 | // install platform patch function 28 | Vue.prototype.__patch__ = patch 29 | 30 | // wrap mount 31 | Vue.prototype.$mount = function ( 32 | el?: any, 33 | hydrating?: boolean 34 | ): Component { 35 | return mountComponent( 36 | this, 37 | el && query(el, this.$document), 38 | hydrating 39 | ) 40 | } 41 | 42 | export default Vue 43 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/modules/index.js: -------------------------------------------------------------------------------- 1 | import attrs from './attrs' 2 | import klass from './class' 3 | import events from './events' 4 | import style from './style' 5 | import transition from './transition' 6 | 7 | export default [ 8 | attrs, 9 | klass, 10 | events, 11 | style, 12 | transition 13 | ] 14 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/patch.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import * as nodeOps from 'weex/runtime/node-ops' 4 | import { createPatchFunction } from 'core/vdom/patch' 5 | import baseModules from 'core/vdom/modules/index' 6 | import platformModules from 'weex/runtime/modules/index' 7 | 8 | // the directive module should be applied last, after all 9 | // built-in modules have been applied. 10 | const modules = platformModules.concat(baseModules) 11 | 12 | export const patch: Function = createPatchFunction({ 13 | nodeOps, 14 | modules, 15 | LONG_LIST_THRESHOLD: 10 16 | }) 17 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/platforms/weex/runtime/text-node.js: -------------------------------------------------------------------------------- 1 | let latestNodeId = 1 2 | 3 | export default function TextNode (text) { 4 | this.instanceId = '' 5 | this.nodeId = latestNodeId++ 6 | this.parentNode = null 7 | this.nodeType = 3 8 | this.text = text 9 | } 10 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/server/create-basic-renderer.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { createWriteFunction } from './write' 4 | import { createRenderFunction } from './render' 5 | import type { RenderOptions } from './create-renderer' 6 | 7 | export function createBasicRenderer ({ 8 | modules = [], 9 | directives = {}, 10 | isUnaryTag = (() => false), 11 | cache 12 | }: RenderOptions = {}) { 13 | const render = createRenderFunction(modules, directives, isUnaryTag, cache) 14 | 15 | return function renderToString ( 16 | component: Component, 17 | context: any, 18 | done: any 19 | ): void { 20 | if (typeof context === 'function') { 21 | done = context 22 | context = {} 23 | } 24 | let result = '' 25 | const write = createWriteFunction(text => { 26 | result += text 27 | return false 28 | }, done) 29 | try { 30 | render(component, write, context, () => { 31 | done(null, result) 32 | }) 33 | } catch (e) { 34 | done(e) 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/server/optimizing-compiler/index.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | import { parse } from 'compiler/parser/index' 4 | import { generate } from './codegen' 5 | import { optimize } from './optimizer' 6 | import { createCompilerCreator } from 'compiler/create-compiler' 7 | 8 | export const createCompiler = createCompilerCreator(function baseCompile ( 9 | template: string, 10 | options: CompilerOptions 11 | ): CompiledResult { 12 | const ast = parse(template.trim(), options) 13 | optimize(ast, options) 14 | const code = generate(ast, options) 15 | return { 16 | ast, 17 | render: code.render, 18 | staticRenderFns: code.staticRenderFns 19 | } 20 | }) 21 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/server/template-renderer/parse-template.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | const compile = require('lodash.template') 4 | const compileOptions = { 5 | escape: /{{([^{][\s\S]+?[^}])}}/g, 6 | interpolate: /{{{([\s\S]+?)}}}/g 7 | } 8 | 9 | export type ParsedTemplate = { 10 | head: (data: any) => string; 11 | neck: (data: any) => string; 12 | tail: (data: any) => string; 13 | }; 14 | 15 | export function parseTemplate ( 16 | template: string, 17 | contentPlaceholder?: string = '' 18 | ): ParsedTemplate { 19 | if (typeof template === 'object') { 20 | return template 21 | } 22 | 23 | let i = template.indexOf('') 24 | const j = template.indexOf(contentPlaceholder) 25 | 26 | if (j < 0) { 27 | throw new Error(`Content placeholder not found in template.`) 28 | } 29 | 30 | if (i < 0) { 31 | i = template.indexOf('') 32 | if (i < 0) { 33 | i = j 34 | } 35 | } 36 | 37 | return { 38 | head: compile(template.slice(0, i), compileOptions), 39 | neck: compile(template.slice(i, j), compileOptions), 40 | tail: compile(template.slice(j + contentPlaceholder.length), compileOptions) 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/server/util.js: -------------------------------------------------------------------------------- 1 | /* @flow */ 2 | 3 | export const isJS = (file: string): boolean => /\.js(\?[^.]+)?$/.test(file) 4 | 5 | export const isCSS = (file: string): boolean => /\.css(\?[^.]+)?$/.test(file) 6 | 7 | export function createPromiseCallback () { 8 | let resolve, reject 9 | const promise: Promise = new Promise((_resolve, _reject) => { 10 | resolve = _resolve 11 | reject = _reject 12 | }) 13 | const cb = (err: Error, res?: string) => { 14 | if (err) return reject(err) 15 | resolve(res || '') 16 | } 17 | return { promise, cb } 18 | } 19 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/server/webpack-plugin/util.js: -------------------------------------------------------------------------------- 1 | const { red, yellow } = require('chalk') 2 | 3 | const prefix = `[vue-server-renderer-webpack-plugin]` 4 | const warn = exports.warn = msg => console.error(red(`${prefix} ${msg}\n`)) 5 | const tip = exports.tip = msg => console.log(yellow(`${prefix} ${msg}\n`)) 6 | 7 | export const validate = compiler => { 8 | if (compiler.options.target !== 'node') { 9 | warn('webpack config `target` should be "node".') 10 | } 11 | 12 | if (compiler.options.output && compiler.options.output.libraryTarget !== 'commonjs2') { 13 | warn('webpack config `output.libraryTarget` should be "commonjs2".') 14 | } 15 | 16 | if (!compiler.options.externals) { 17 | tip( 18 | 'It is recommended to externalize dependencies in the server build for ' + 19 | 'better build performance.' 20 | ) 21 | } 22 | } 23 | 24 | export const onEmit = (compiler, name, hook) => { 25 | if (compiler.hooks) { 26 | // Webpack >= 4.0.0 27 | compiler.hooks.emit.tapAsync(name, hook) 28 | } else { 29 | // Webpack < 4.0.0 30 | compiler.plugin('emit', hook) 31 | } 32 | } 33 | 34 | export { isJS, isCSS } from '../util' 35 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/src/shared/constants.js: -------------------------------------------------------------------------------- 1 | export const SSR_ATTR = 'data-server-rendered' 2 | 3 | export const ASSET_TYPES = [ 4 | 'component', 5 | 'directive', 6 | 'filter' 7 | ] 8 | 9 | export const LIFECYCLE_HOOKS = [ 10 | 'beforeCreate', 11 | 'created', 12 | 'beforeMount', 13 | 'mounted', 14 | 'beforeUpdate', 15 | 'updated', 16 | 'beforeDestroy', 17 | 'destroyed', 18 | 'activated', 19 | 'deactivated', 20 | 'errorCaptured', 21 | 'serverPrefetch' 22 | ] 23 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/types/index.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue } from "./vue"; 2 | 3 | export default Vue; 4 | 5 | export as namespace Vue; 6 | 7 | export { 8 | CreateElement, 9 | VueConstructor 10 | } from "./vue"; 11 | 12 | export { 13 | Component, 14 | AsyncComponent, 15 | ComponentOptions, 16 | FunctionalComponentOptions, 17 | RenderContext, 18 | PropType, 19 | PropOptions, 20 | ComputedOptions, 21 | WatchHandler, 22 | WatchOptions, 23 | WatchOptionsWithHandler, 24 | DirectiveFunction, 25 | DirectiveOptions 26 | } from "./options"; 27 | 28 | export { 29 | PluginFunction, 30 | PluginObject 31 | } from "./plugin"; 32 | 33 | export { 34 | VNodeChildren, 35 | VNodeChildrenArrayContents, 36 | VNode, 37 | VNodeComponentOptions, 38 | VNodeData, 39 | VNodeDirective 40 | } from "./vnode"; 41 | -------------------------------------------------------------------------------- /01/lib/node_modules/vue/types/plugin.d.ts: -------------------------------------------------------------------------------- 1 | import { Vue as _Vue } from "./vue"; 2 | 3 | export type PluginFunction = (Vue: typeof _Vue, options?: T) => void; 4 | 5 | export interface PluginObject { 6 | install: PluginFunction; 7 | [key: string]: any; 8 | } 9 | -------------------------------------------------------------------------------- /02/03.过滤器的基本使用.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 |

{{ msg | msgFormat('纳尼吖') | test}}

11 |
12 | 34 | 35 | -------------------------------------------------------------------------------- /02/06.客户端JSONP页面.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 17 | 18 | 19 | 20 | 23 | 24 | 25 | 26 | -------------------------------------------------------------------------------- /03/02.动画-不使用动画.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 | 12 |

这是一个H3

13 |
14 | 23 | 24 | -------------------------------------------------------------------------------- /03/05.动画使用第三方类实现动画.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |

这是一个H3

21 |
22 |
23 | 32 | 33 | -------------------------------------------------------------------------------- /03/08.组件-创建组件的方式1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 | 12 | 13 |
14 | 40 | 41 | -------------------------------------------------------------------------------- /03/09.组件-创建组件的方式2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 | 12 |
13 | 25 | 26 | -------------------------------------------------------------------------------- /03/11.组件-组件中的data和methods.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 11 |
12 | 32 | 33 | -------------------------------------------------------------------------------- /03/12.组件-why components data must be a function.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 |
15 | 16 |
17 | 18 | 24 | 25 | 47 | 48 | -------------------------------------------------------------------------------- /03/13.组件切换-方式1.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 登录 11 | 注册 12 | 13 | 14 |
15 | 16 | 33 | 34 | -------------------------------------------------------------------------------- /03/14.组件切换-方式2.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 |
10 | 登录 11 | 注册 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 40 | 41 | -------------------------------------------------------------------------------- /03/15.组件切换-切换动画.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 19 | 20 | 21 |
22 | 登录 23 | 注册 24 | 25 | 26 | 27 | 28 | 29 |
30 | 31 | 49 | 50 | -------------------------------------------------------------------------------- /04/02.复习-定义组件的方式.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Title 6 | 7 | 8 | 9 | 10 |
11 | 12 |
13 | 14 | 37 | 38 | -------------------------------------------------------------------------------- /05/code/03.名称案例.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | + 20 | = 21 | 22 | 23 |
24 | 25 | 41 | 42 | 43 | -------------------------------------------------------------------------------- /05/webpack-study/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev2": "webpack-dev-server --open --port 3000 --contentBase src --hot", 9 | "dev": "webpack-dev-server" 10 | }, 11 | "keywords": [], 12 | "author": "", 13 | "license": "ISC", 14 | "dependencies": { 15 | "jquery": "^3.2.1" 16 | }, 17 | "devDependencies": { 18 | "css-loader": "^0.28.7", 19 | "html-webpack-plugin": "^2.30.1", 20 | "less": "^2.7.3", 21 | "less-loader": "^4.0.5", 22 | "node-sass": "^4.5.3", 23 | "sass-loader": "^6.0.6", 24 | "style-loader": "^0.19.0", 25 | "webpack": "^3.8.1", 26 | "webpack-dev-server": "^2.9.3" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /05/webpack-study/src/css/index.css: -------------------------------------------------------------------------------- 1 | li{ 2 | list-style: none; 3 | } -------------------------------------------------------------------------------- /05/webpack-study/src/css/index.less: -------------------------------------------------------------------------------- 1 | ul{ 2 | padding: 0; 3 | margin: 0; 4 | } -------------------------------------------------------------------------------- /05/webpack-study/src/css/index.scss: -------------------------------------------------------------------------------- 1 | html, body{ 2 | margin: 0; 3 | padding: 0; 4 | 5 | li{ 6 | font-size: 12px; 7 | line-height: 30px; 8 | } 9 | } -------------------------------------------------------------------------------- /05/webpack-study/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 |
    26 |
  • 这是第1个li
  • 27 |
  • 这是第2个li
  • 28 |
  • 这是第3个li
  • 29 |
  • 这是第4个li
  • 30 |
  • 这是第5个li
  • 31 |
  • 这是第6个li
  • 32 |
  • 这是第7个li
  • 33 |
  • 这是第8个li
  • 34 |
  • 这是第9个li
  • 35 |
  • 这是第10个li
  • 36 |
37 | 38 | 39 | -------------------------------------------------------------------------------- /05/webpack-study/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/05/webpack-study/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /06/01.webpack-study/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime"] 4 | } -------------------------------------------------------------------------------- /06/01.webpack-study/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01.webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "webpack-dev-server --open --port 3000 --hot" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-loader": "^7.1.2", 16 | "babel-plugin-transform-runtime": "^6.23.0", 17 | "babel-preset-env": "^1.6.1", 18 | "babel-preset-stage-0": "^6.24.1", 19 | "css-loader": "^0.28.7", 20 | "file-loader": "^1.1.5", 21 | "html-webpack-plugin": "^2.30.1", 22 | "less": "^2.7.3", 23 | "less-loader": "^4.0.5", 24 | "node-sass": "^4.5.3", 25 | "sass-loader": "^6.0.6", 26 | "style-loader": "^0.19.0", 27 | "url-loader": "^0.6.2", 28 | "webpack": "^3.8.1", 29 | "webpack-dev-server": "^2.9.3" 30 | }, 31 | "dependencies": { 32 | "bootstrap": "^3.3.7" 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /06/01.webpack-study/src/css/index.css: -------------------------------------------------------------------------------- 1 | html, body{ 2 | margin: 0; 3 | padding: 0; 4 | background-color: cyan; 5 | } -------------------------------------------------------------------------------- /06/01.webpack-study/src/css/index.scss: -------------------------------------------------------------------------------- 1 | html, body{ 2 | .box{ 3 | width: 220px; 4 | height: 120px; 5 | // 默认情况下,webpack 无法 处理 CSS 文件中的 url 地址,不管是图片还是 字体库, 只要是 URL 地址,都处理不了 6 | background: url('../images/生小孩.jpg'); 7 | background-size: cover; 8 | } 9 | 10 | .box2{ 11 | width: 220px; 12 | height: 120px; 13 | background: url('../images2/生小孩.jpg'); 14 | background-size: cover; 15 | } 16 | } -------------------------------------------------------------------------------- /06/01.webpack-study/src/images/生小孩.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/06/01.webpack-study/src/images/生小孩.jpg -------------------------------------------------------------------------------- /06/01.webpack-study/src/images2/生小孩.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/06/01.webpack-study/src/images2/生小孩.jpg -------------------------------------------------------------------------------- /06/01.webpack-study/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 | 14 |
15 |
16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /06/01.webpack-study/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/06/01.webpack-study/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /06/02.webpack-vue1/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime"] 4 | } -------------------------------------------------------------------------------- /06/02.webpack-vue1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01.webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "webpack-dev-server --open --port 3000 --hot" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-loader": "^7.1.2", 16 | "babel-plugin-transform-runtime": "^6.23.0", 17 | "babel-preset-env": "^1.6.1", 18 | "babel-preset-stage-0": "^6.24.1", 19 | "css-loader": "^0.28.7", 20 | "file-loader": "^1.1.5", 21 | "html-webpack-plugin": "^2.30.1", 22 | "less": "^2.7.3", 23 | "less-loader": "^4.0.5", 24 | "node-sass": "^4.5.3", 25 | "sass-loader": "^6.0.6", 26 | "style-loader": "^0.19.0", 27 | "url-loader": "^0.6.2", 28 | "vue-loader": "^13.3.0", 29 | "vue-template-compiler": "^2.5.2", 30 | "webpack": "^3.8.1", 31 | "webpack-dev-server": "^2.9.3" 32 | }, 33 | "dependencies": { 34 | "bootstrap": "^3.3.7", 35 | "vue": "^2.5.2" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /06/02.webpack-vue1/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 |

{{msg}}

15 | 16 | 17 | 18 |
19 | 20 | 21 | -------------------------------------------------------------------------------- /06/02.webpack-vue1/src/login.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 22 | 23 | 26 | -------------------------------------------------------------------------------- /06/02.webpack-vue1/src/test.js: -------------------------------------------------------------------------------- 1 | // 这是 Node 中向外暴露成员的形式: 2 | // module.exports = {} 3 | 4 | // 在 ES6中,也通过 规范的形式,规定了 ES6 中如何 导入 和 导出 模块 5 | // ES6中导入模块,使用 import 模块名称 from '模块标识符' import '表示路径' 6 | 7 | // 在 ES6 中,使用 export default 和 export 向外暴露成员: 8 | var info = { 9 | name: 'zs', 10 | age: 20 11 | } 12 | 13 | export default info 14 | 15 | /* export default { 16 | address: '北京' 17 | } */ 18 | 19 | // 注意: export default 向外暴露的成员,可以使用任意的变量来接收 20 | // 注意: 在一个模块中,export default 只允许向外暴露1次 21 | // 注意: 在一个模块中,可以同时使用 export default 和 export 向外暴露成员 22 | 23 | 24 | 25 | export var title = '小星星' 26 | export var content = '哈哈哈' 27 | 28 | // 注意: 使用 export 向外暴露的成员,只能使用 { } 的形式来接收,这种形式,叫做 【按需导出】 29 | // 注意: export 可以向外暴露多个成员, 同时,如果某些成员,我们在 import 的时候,不需要,则可以 不在 {} 中定义 30 | // 注意: 使用 export 导出的成员,必须严格按照 导出时候的名称,来使用 {} 按需接收; 31 | // 注意: 使用 export 导出的成员,如果 就想 换个 名称来接收,可以使用 as 来起别名; 32 | 33 | 34 | 35 | 36 | // 在Node中 使用 var 名称 = require('模块标识符') 37 | // module.exports 和 exports 来暴露成员 -------------------------------------------------------------------------------- /06/02.webpack-vue1/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/06/02.webpack-vue1/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /06/03.code/01.在页面中渲染基本的组件.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 |

33333

15 | 16 |
17 | 18 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /06/03.code/02.在页面中使用render函数渲染组件.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 |

444444

15 |
16 | 17 | 34 | 35 | 36 | -------------------------------------------------------------------------------- /06/04.webpack-vue-router/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime"] 4 | } -------------------------------------------------------------------------------- /06/04.webpack-vue-router/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01.webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "webpack-dev-server --open --port 3000 --hot" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-loader": "^7.1.2", 16 | "babel-plugin-transform-runtime": "^6.23.0", 17 | "babel-preset-env": "^1.6.1", 18 | "babel-preset-stage-0": "^6.24.1", 19 | "css-loader": "^0.28.7", 20 | "file-loader": "^1.1.5", 21 | "html-webpack-plugin": "^2.30.1", 22 | "less": "^2.7.3", 23 | "less-loader": "^4.0.5", 24 | "node-sass": "^4.5.3", 25 | "sass-loader": "^6.0.6", 26 | "style-loader": "^0.19.0", 27 | "url-loader": "^0.6.2", 28 | "vue-loader": "^13.3.0", 29 | "vue-template-compiler": "^2.5.2", 30 | "webpack": "^3.8.1", 31 | "webpack-dev-server": "^2.9.3" 32 | }, 33 | "dependencies": { 34 | "bootstrap": "^3.3.7", 35 | "vue": "^2.5.2", 36 | "vue-router": "^3.0.1" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /06/04.webpack-vue-router/src/App.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 15 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /06/04.webpack-vue-router/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /06/04.webpack-vue-router/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | // 1. 导入 vue-router 包 3 | import VueRouter from 'vue-router' 4 | // 2. 手动安装 VueRouter 5 | Vue.use(VueRouter) 6 | 7 | // 导入 app 组件 8 | import app from './App.vue' 9 | // 导入 Account 组件 10 | import account from './main/Account.vue' 11 | import goodslist from './main/GoodsList.vue' 12 | 13 | // 3. 创建路由对象 14 | var router = new VueRouter({ 15 | routes: [ 16 | // account goodslist 17 | { path: '/account', component: account }, 18 | { path: '/goodslist', component: goodslist } 19 | ] 20 | }) 21 | 22 | var vm = new Vue({ 23 | el: '#app', 24 | render: c => c(app), // render 会把 el 指定的容器中,所有的内容都清空覆盖,所以 不要 把 路由的 router-view 和 router-link 直接写到 el 所控制的元素中 25 | router // 4. 将路由对象挂载到 vm 上 26 | }) 27 | 28 | // 注意: App 这个组件,是通过 VM 实例的 render 函数,渲染出来的, render 函数如果要渲染 组件, 渲染出来的组件,只能放到 el: '#app' 所指定的 元素中; 29 | // Account 和 GoodsList 组件, 是通过 路由匹配监听到的,所以, 这两个组件,只能展示到 属于 路由的 中去; -------------------------------------------------------------------------------- /06/04.webpack-vue-router/src/main/Account.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /06/04.webpack-vue-router/src/main/GoodsList.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /06/04.webpack-vue-router/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/06/04.webpack-vue-router/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime"] 4 | } -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01.webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "webpack-dev-server --open --port 3000 --hot" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-loader": "^7.1.2", 16 | "babel-plugin-transform-runtime": "^6.23.0", 17 | "babel-preset-env": "^1.6.1", 18 | "babel-preset-stage-0": "^6.24.1", 19 | "css-loader": "^0.28.7", 20 | "file-loader": "^1.1.5", 21 | "html-webpack-plugin": "^2.30.1", 22 | "less": "^2.7.3", 23 | "less-loader": "^4.0.5", 24 | "node-sass": "^4.5.3", 25 | "sass-loader": "^6.0.6", 26 | "style-loader": "^0.19.0", 27 | "url-loader": "^0.6.2", 28 | "vue-loader": "^13.3.0", 29 | "vue-template-compiler": "^2.5.2", 30 | "webpack": "^3.8.1", 31 | "webpack-dev-server": "^2.9.3" 32 | }, 33 | "dependencies": { 34 | "bootstrap": "^3.3.7", 35 | "vue": "^2.5.2", 36 | "vue-router": "^3.0.1" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/App.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 15 | 16 | 17 | 20 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/main.js: -------------------------------------------------------------------------------- 1 | import Vue from 'vue' 2 | // 1. 导入 vue-router 包 3 | import VueRouter from 'vue-router' 4 | // 2. 手动安装 VueRouter 5 | Vue.use(VueRouter) 6 | 7 | // 导入 app 组件 8 | import app from './App.vue' 9 | 10 | // 导入 自定义路由模块 11 | import router from './router.js' 12 | 13 | var vm = new Vue({ 14 | el: '#app', 15 | render: c => c(app), // render 会把 el 指定的容器中,所有的内容都清空覆盖,所以 不要 把 路由的 router-view 和 router-link 直接写到 el 所控制的元素中 16 | router // 4. 将路由对象挂载到 vm 上 17 | }) 18 | 19 | // 注意: App 这个组件,是通过 VM 实例的 render 函数,渲染出来的, render 函数如果要渲染 组件, 渲染出来的组件,只能放到 el: '#app' 所指定的 元素中; 20 | // Account 和 GoodsList 组件, 是通过 路由匹配监听到的,所以, 这两个组件,只能展示到 属于 路由的 中去; -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/main/Account.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 15 | 16 | 25 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/main/GoodsList.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/router.js: -------------------------------------------------------------------------------- 1 | import VueRouter from 'vue-router' 2 | 3 | // 导入 Account 组件 4 | import account from './main/Account.vue' 5 | import goodslist from './main/GoodsList.vue' 6 | 7 | // 导入Account的两个子组件 8 | import login from './subcom/login.vue' 9 | import register from './subcom/register.vue' 10 | 11 | // 3. 创建路由对象 12 | var router = new VueRouter({ 13 | routes: [ 14 | // account goodslist 15 | { 16 | path: '/account', 17 | component: account, 18 | children: [ 19 | { path: 'login', component: login }, 20 | { path: 'register', component: register } 21 | ] 22 | }, 23 | { path: '/goodslist', component: goodslist } 24 | ] 25 | }) 26 | 27 | // 把路由对象暴露出去 28 | export default router -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/subcom/login.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 16 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/src/subcom/register.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /06/05.webpack-路由嵌套/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/06/05.webpack-路由嵌套/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime", ["component", [ 4 | { 5 | "libraryName": "mint-ui", 6 | "style": true 7 | } 8 | ]]] 9 | } -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01.webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "webpack-dev-server --open --port 3000 --hot" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-loader": "^7.1.2", 16 | "babel-plugin-component": "^0.10.1", 17 | "babel-plugin-transform-runtime": "^6.23.0", 18 | "babel-preset-env": "^1.6.1", 19 | "babel-preset-stage-0": "^6.24.1", 20 | "css-loader": "^0.28.7", 21 | "file-loader": "^1.1.5", 22 | "html-webpack-plugin": "^2.30.1", 23 | "less": "^2.7.3", 24 | "less-loader": "^4.0.5", 25 | "node-sass": "^4.5.3", 26 | "sass-loader": "^6.0.6", 27 | "style-loader": "^0.19.0", 28 | "url-loader": "^0.6.2", 29 | "vue-loader": "^13.3.0", 30 | "vue-template-compiler": "^2.5.2", 31 | "webpack": "^3.8.1", 32 | "webpack-dev-server": "^2.9.3" 33 | }, 34 | "dependencies": { 35 | "bootstrap": "^3.3.7", 36 | "mint-ui": "^2.2.9", 37 | "vue": "^2.5.2", 38 | "vue-router": "^3.0.1" 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/css/app.css: -------------------------------------------------------------------------------- 1 | .mytoast i{ 2 | color:red !important; 3 | } -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 | 15 |
16 | 17 | 18 | -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/lib/mui/fonts/mui.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/07/01.webpack-UI组件使用/src/lib/mui/fonts/mui.ttf -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/main/Account.vue: -------------------------------------------------------------------------------- 1 | 11 | 12 | 13 | 15 | 16 | 25 | -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/main/GoodsList.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 8 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/router.js: -------------------------------------------------------------------------------- 1 | import VueRouter from 'vue-router' 2 | 3 | // 导入 Account 组件 4 | import account from './main/Account.vue' 5 | import goodslist from './main/GoodsList.vue' 6 | 7 | // 导入Account的两个子组件 8 | import login from './subcom/login.vue' 9 | import register from './subcom/register.vue' 10 | 11 | // 3. 创建路由对象 12 | var router = new VueRouter({ 13 | routes: [ 14 | // account goodslist 15 | { 16 | path: '/account', 17 | component: account, 18 | children: [ 19 | { path: 'login', component: login }, 20 | { path: 'register', component: register } 21 | ] 22 | }, 23 | { path: '/goodslist', component: goodslist } 24 | ] 25 | }) 26 | 27 | // 把路由对象暴露出去 28 | export default router -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/subcom/login.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 17 | -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/src/subcom/register.vue: -------------------------------------------------------------------------------- 1 | 6 | 7 | 9 | 10 | 11 | 14 | -------------------------------------------------------------------------------- /07/01.webpack-UI组件使用/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/07/01.webpack-UI组件使用/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /08/code/01.封装读取文件的方法.js: -------------------------------------------------------------------------------- 1 | // 需求:你要封装一个方法,我给你一个要读取文件的路径,你这个方法能帮我读取文件,并把内容返回给我 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | 6 | // 这是普通读取文件的方式 7 | /* fs.readFile(path.join(__dirname, './files/1.txt'), 'utf-8', (err, dataStr) => { 8 | if (err) throw err 9 | console.log(dataStr) 10 | }) */ 11 | 12 | // 初衷: 给定文件路径,返回读取到的内容 13 | // 我们可以规定一下, callback 中,有两个参数,第一个参数,是 失败的结果;第二个参数是成功的结果; 14 | // 同时,我们规定了: 如果成功后,返回的结果,应该位于 callback 参数的第二个位置,此时, 第一个位置 由于没有出错,所以,放一个 null; 如果失败了,则 第一个位置放 Error对象,第二个位置防止一个 undefined 15 | function getFileByPath(fpath, callback) { 16 | fs.readFile(fpath, 'utf-8', (err, dataStr) => { 17 | // 如果报错了,进入if分支后,if后面的代码就没有必要执行了 18 | if (err) return callback(err) 19 | // console.log(dataStr) 20 | // return dataStr 21 | callback(null, dataStr) 22 | }) 23 | } 24 | 25 | /* var result = getFileByPath(path.join(__dirname, './files/1.txt')) 26 | console.log(result) */ 27 | getFileByPath(path.join(__dirname, './files/11.txt'), (err, dataStr) => { 28 | // console.log(dataStr + '-----') 29 | if (err) return console.log(err.message) 30 | console.log(dataStr) 31 | }) -------------------------------------------------------------------------------- /08/code/02.封装读取文件的方法-提高版.js: -------------------------------------------------------------------------------- 1 | // 需求:你要封装一个方法,我给你一个要读取文件的路径,你这个方法能帮我读取文件,并把内容返回给我 2 | 3 | const fs = require('fs') 4 | const path = require('path') 5 | 6 | 7 | function getFileByPath(fpath, succCb, errCb) { 8 | fs.readFile(fpath, 'utf-8', (err, dataStr) => { 9 | if (err) return errCb(err) 10 | succCb(dataStr) 11 | }) 12 | } 13 | 14 | // getFileByPath(path.join(__dirname, './files/11.txt'), function (data) { 15 | // console.log(data + '娃哈哈,成功了!!!') 16 | // }, function (err) { 17 | // console.log('失败的结果,我们使用失败的回调处理了一下:' + err.message) 18 | // }) 19 | 20 | // 需求: 先读取文件1,再读取文件2,最后再读取文件3 21 | // 回调地狱 22 | // 使用 ES6 中的 Promise,来解决 回调地狱的问题; 23 | // 问: Promise 的本质是要干什么的:就是单纯的为了解决回调地狱问题;并不能帮我们减少代码量; 24 | getFileByPath(path.join(__dirname, './files/1.txt'), function (data) { 25 | console.log(data) 26 | 27 | getFileByPath(path.join(__dirname, './files/2.txt'), function (data) { 28 | console.log(data) 29 | 30 | getFileByPath(path.join(__dirname, './files/3.txt'), function (data) { 31 | console.log(data) 32 | }) 33 | }) 34 | }) -------------------------------------------------------------------------------- /08/code/05.演示Jquery中Promise.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /08/code/data.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "小强", 3 | "age": 18 4 | } -------------------------------------------------------------------------------- /08/code/files/1.txt: -------------------------------------------------------------------------------- 1 | 111 -------------------------------------------------------------------------------- /08/code/files/2.txt: -------------------------------------------------------------------------------- 1 | 222 -------------------------------------------------------------------------------- /08/code/files/3.txt: -------------------------------------------------------------------------------- 1 | 333 -------------------------------------------------------------------------------- /08/code/node_modules/.npminstall.done: -------------------------------------------------------------------------------- 1 | All packages installed at Sun Nov 05 2017 16:23:05 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/.npminstall.done: -------------------------------------------------------------------------------- 1 | Sun Nov 05 2017 16:23:05 GMT+0800 (中国标准时间) -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "jquery", 3 | "main": "dist/jquery.js", 4 | "license": "MIT", 5 | "ignore": [ 6 | "package.json" 7 | ], 8 | "keywords": [ 9 | "jquery", 10 | "javascript", 11 | "browser", 12 | "library" 13 | ] 14 | } -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/.eslintrc.json: -------------------------------------------------------------------------------- 1 | { 2 | "root": true, 3 | 4 | "extends": "../.eslintrc-browser.json" 5 | } 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/ajax/parseXML.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Cross-browser xml parsing 8 | jQuery.parseXML = function( data ) { 9 | var xml; 10 | if ( !data || typeof data !== "string" ) { 11 | return null; 12 | } 13 | 14 | // Support: IE 9 - 11 only 15 | // IE throws on parseFromString with invalid input. 16 | try { 17 | xml = ( new window.DOMParser() ).parseFromString( data, "text/xml" ); 18 | } catch ( e ) { 19 | xml = undefined; 20 | } 21 | 22 | if ( !xml || xml.getElementsByTagName( "parsererror" ).length ) { 23 | jQuery.error( "Invalid XML: " + data ); 24 | } 25 | return xml; 26 | }; 27 | 28 | return jQuery.parseXML; 29 | 30 | } ); 31 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/ajax/var/location.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.location; 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/ajax/var/nonce.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | "use strict"; 5 | 6 | return jQuery.now(); 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/ajax/var/rquery.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /\?/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/attributes.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./attributes/attr", 4 | "./attributes/prop", 5 | "./attributes/classes", 6 | "./attributes/val" 7 | ], function( jQuery ) { 8 | 9 | "use strict"; 10 | 11 | // Return jQuery for attributes-only inclusion 12 | return jQuery; 13 | } ); 14 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/attributes/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | ( function() { 9 | var input = document.createElement( "input" ), 10 | select = document.createElement( "select" ), 11 | opt = select.appendChild( document.createElement( "option" ) ); 12 | 13 | input.type = "checkbox"; 14 | 15 | // Support: Android <=4.3 only 16 | // Default value for a checkbox should be "on" 17 | support.checkOn = input.value !== ""; 18 | 19 | // Support: IE <=11 only 20 | // Must access selectedIndex to make default options select 21 | support.optSelected = opt.selected; 22 | 23 | // Support: IE <=11 only 24 | // An input loses its value after becoming a radio 25 | input = document.createElement( "input" ); 26 | input.value = "t"; 27 | input.type = "radio"; 28 | support.radioValue = input.value === "t"; 29 | } )(); 30 | 31 | return support; 32 | 33 | } ); 34 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/core/DOMEval.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | function DOMEval( code, doc ) { 7 | doc = doc || document; 8 | 9 | var script = doc.createElement( "script" ); 10 | 11 | script.text = code; 12 | doc.head.appendChild( script ).parentNode.removeChild( script ); 13 | } 14 | 15 | return DOMEval; 16 | } ); 17 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/core/nodeName.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | function nodeName( elem, name ) { 6 | 7 | return elem.nodeName && elem.nodeName.toLowerCase() === name.toLowerCase(); 8 | 9 | }; 10 | 11 | return nodeName; 12 | 13 | } ); 14 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/core/readyException.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery.readyException = function( error ) { 8 | window.setTimeout( function() { 9 | throw error; 10 | } ); 11 | }; 12 | 13 | } ); 14 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/core/stripAndCollapse.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/rnothtmlwhite" 3 | ], function( rnothtmlwhite ) { 4 | "use strict"; 5 | 6 | // Strip and collapse whitespace according to HTML spec 7 | // https://html.spec.whatwg.org/multipage/infrastructure.html#strip-and-collapse-whitespace 8 | function stripAndCollapse( value ) { 9 | var tokens = value.match( rnothtmlwhite ) || []; 10 | return tokens.join( " " ); 11 | } 12 | 13 | return stripAndCollapse; 14 | } ); 15 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/core/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | // Support: Safari 8 only 9 | // In Safari 8 documents created via document.implementation.createHTMLDocument 10 | // collapse sibling forms: the second one becomes a child of the first one. 11 | // Because of that, this security measure has to be disabled in Safari 8. 12 | // https://bugs.webkit.org/show_bug.cgi?id=137337 13 | support.createHTMLDocument = ( function() { 14 | var body = document.implementation.createHTMLDocument( "" ).body; 15 | body.innerHTML = "
"; 16 | return body.childNodes.length === 2; 17 | } )(); 18 | 19 | return support; 20 | } ); 21 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/core/var/rsingleTag.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // Match a standalone tag 5 | return ( /^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i ); 6 | } ); 7 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/addGetHookIf.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | function addGetHookIf( conditionFn, hookFn ) { 6 | 7 | // Define the hook, we'll check on the first run if it's really needed. 8 | return { 9 | get: function() { 10 | if ( conditionFn() ) { 11 | 12 | // Hook not needed (or it's not possible to use it due 13 | // to missing dependency), remove it. 14 | delete this.get; 15 | return; 16 | } 17 | 18 | // Hook needed; redefine it so that the support test is not executed again. 19 | return ( this.get = hookFn ).apply( this, arguments ); 20 | } 21 | }; 22 | } 23 | 24 | return addGetHookIf; 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/hiddenVisibleSelectors.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../selector" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.expr.pseudos.hidden = function( elem ) { 9 | return !jQuery.expr.pseudos.visible( elem ); 10 | }; 11 | jQuery.expr.pseudos.visible = function( elem ) { 12 | return !!( elem.offsetWidth || elem.offsetHeight || elem.getClientRects().length ); 13 | }; 14 | 15 | } ); 16 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/var/cssExpand.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return [ "Top", "Right", "Bottom", "Left" ]; 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/var/getStyles.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return function( elem ) { 5 | 6 | // Support: IE <=11 only, Firefox <=30 (#15098, #14150) 7 | // IE throws on elements created in popups 8 | // FF meanwhile throws on frame elements through "defaultView.getComputedStyle" 9 | var view = elem.ownerDocument.defaultView; 10 | 11 | if ( !view || !view.opener ) { 12 | view = window; 13 | } 14 | 15 | return view.getComputedStyle( elem ); 16 | }; 17 | } ); 18 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/var/rmargin.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^margin/ ); 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/var/rnumnonpx.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../var/pnum" 3 | ], function( pnum ) { 4 | "use strict"; 5 | 6 | return new RegExp( "^(" + pnum + ")(?!px)[a-z%]+$", "i" ); 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/css/var/swap.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | // A method for quickly swapping in/out CSS properties to get correct calculations. 6 | return function( elem, options, callback, args ) { 7 | var ret, name, 8 | old = {}; 9 | 10 | // Remember the old values, and insert the new ones 11 | for ( name in options ) { 12 | old[ name ] = elem.style[ name ]; 13 | elem.style[ name ] = options[ name ]; 14 | } 15 | 16 | ret = callback.apply( elem, args || [] ); 17 | 18 | // Revert the old values 19 | for ( name in options ) { 20 | elem.style[ name ] = old[ name ]; 21 | } 22 | 23 | return ret; 24 | }; 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/data/var/acceptData.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | /** 6 | * Determines whether an object can have data 7 | */ 8 | return function( owner ) { 9 | 10 | // Accepts only: 11 | // - Node 12 | // - Node.ELEMENT_NODE 13 | // - Node.DOCUMENT_NODE 14 | // - Object 15 | // - Any 16 | return owner.nodeType === 1 || owner.nodeType === 9 || !( +owner.nodeType ); 17 | }; 18 | 19 | } ); 20 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/data/var/dataPriv.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/data/var/dataUser.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../Data" 3 | ], function( Data ) { 4 | "use strict"; 5 | 6 | return new Data(); 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/deferred/exceptionHook.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../deferred" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | // These usually indicate a programmer mistake during development, 9 | // warn about them ASAP rather than swallowing them by default. 10 | var rerrorNames = /^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/; 11 | 12 | jQuery.Deferred.exceptionHook = function( error, stack ) { 13 | 14 | // Support: IE 8 - 9 only 15 | // Console exists when dev tools are open, which can happen at any time 16 | if ( window.console && window.console.warn && error && rerrorNames.test( error.name ) ) { 17 | window.console.warn( "jQuery.Deferred exception: " + error.message, error.stack, stack ); 18 | } 19 | }; 20 | 21 | } ); 22 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/deprecated.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./core/nodeName" 4 | ], function( jQuery, nodeName ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.fn.extend( { 9 | 10 | bind: function( types, data, fn ) { 11 | return this.on( types, null, data, fn ); 12 | }, 13 | unbind: function( types, fn ) { 14 | return this.off( types, null, fn ); 15 | }, 16 | 17 | delegate: function( selector, types, data, fn ) { 18 | return this.on( types, selector, data, fn ); 19 | }, 20 | undelegate: function( selector, types, fn ) { 21 | 22 | // ( namespace ) or ( selector, types [, fn] ) 23 | return arguments.length === 1 ? 24 | this.off( selector, "**" ) : 25 | this.off( types, selector || "**", fn ); 26 | } 27 | } ); 28 | 29 | jQuery.holdReady = function( hold ) { 30 | if ( hold ) { 31 | jQuery.readyWait++; 32 | } else { 33 | jQuery.ready( true ); 34 | } 35 | }; 36 | jQuery.isArray = Array.isArray; 37 | jQuery.parseJSON = JSON.parse; 38 | jQuery.nodeName = nodeName; 39 | 40 | } ); 41 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/effects/animatedSelector.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../selector", 4 | "../effects" 5 | ], function( jQuery ) { 6 | 7 | "use strict"; 8 | 9 | jQuery.expr.pseudos.animated = function( elem ) { 10 | return jQuery.grep( jQuery.timers, function( fn ) { 11 | return elem === fn.elem; 12 | } ).length; 13 | }; 14 | 15 | } ); 16 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/event/ajax.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../event" 4 | ], function( jQuery ) { 5 | 6 | "use strict"; 7 | 8 | // Attach a bunch of functions for handling common AJAX events 9 | jQuery.each( [ 10 | "ajaxStart", 11 | "ajaxStop", 12 | "ajaxComplete", 13 | "ajaxError", 14 | "ajaxSuccess", 15 | "ajaxSend" 16 | ], function( i, type ) { 17 | jQuery.fn[ type ] = function( fn ) { 18 | return this.on( type, fn ); 19 | }; 20 | } ); 21 | 22 | } ); 23 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/event/alias.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | 4 | "../event", 5 | "./trigger" 6 | ], function( jQuery ) { 7 | 8 | "use strict"; 9 | 10 | jQuery.each( ( "blur focus focusin focusout resize scroll click dblclick " + 11 | "mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave " + 12 | "change select submit keydown keypress keyup contextmenu" ).split( " " ), 13 | function( i, name ) { 14 | 15 | // Handle event binding 16 | jQuery.fn[ name ] = function( data, fn ) { 17 | return arguments.length > 0 ? 18 | this.on( name, null, data, fn ) : 19 | this.trigger( name ); 20 | }; 21 | } ); 22 | 23 | jQuery.fn.extend( { 24 | hover: function( fnOver, fnOut ) { 25 | return this.mouseenter( fnOver ).mouseleave( fnOut || fnOver ); 26 | } 27 | } ); 28 | 29 | } ); 30 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/event/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/support" 3 | ], function( support ) { 4 | 5 | "use strict"; 6 | 7 | support.focusin = "onfocusin" in window; 8 | 9 | return support; 10 | 11 | } ); 12 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/exports/amd.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | // Register as a named AMD module, since jQuery can be concatenated with other 8 | // files that may use define, but not via a proper concatenation script that 9 | // understands anonymous AMD modules. A named AMD is safest and most robust 10 | // way to register. Lowercase jquery is used because AMD module names are 11 | // derived from file names, and jQuery is normally delivered in a lowercase 12 | // file name. Do this after creating the global so that if an AMD module wants 13 | // to call noConflict to hide this version of jQuery, it will work. 14 | 15 | // Note that for maximum portability, libraries that are not jQuery should 16 | // declare themselves as anonymous modules, and avoid setting a global if an 17 | // AMD loader is present. jQuery is a special case. For more information, see 18 | // https://github.com/jrburke/requirejs/wiki/Updating-existing-libraries#wiki-anon 19 | 20 | if ( typeof define === "function" && define.amd ) { 21 | define( "jquery", [], function() { 22 | return jQuery; 23 | } ); 24 | } 25 | 26 | } ); 27 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/exports/global.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core" 3 | ], function( jQuery, noGlobal ) { 4 | 5 | "use strict"; 6 | 7 | var 8 | 9 | // Map over jQuery in case of overwrite 10 | _jQuery = window.jQuery, 11 | 12 | // Map over the $ in case of overwrite 13 | _$ = window.$; 14 | 15 | jQuery.noConflict = function( deep ) { 16 | if ( window.$ === jQuery ) { 17 | window.$ = _$; 18 | } 19 | 20 | if ( deep && window.jQuery === jQuery ) { 21 | window.jQuery = _jQuery; 22 | } 23 | 24 | return jQuery; 25 | }; 26 | 27 | // Expose jQuery and $ identifiers, even in AMD 28 | // (#7102#comment:10, https://github.com/jquery/jquery/pull/557) 29 | // and CommonJS for browser emulators (#13566) 30 | if ( !noGlobal ) { 31 | window.jQuery = window.$ = jQuery; 32 | } 33 | 34 | } ); 35 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/jquery.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "./selector", 4 | "./traversing", 5 | "./callbacks", 6 | "./deferred", 7 | "./deferred/exceptionHook", 8 | "./core/ready", 9 | "./data", 10 | "./queue", 11 | "./queue/delay", 12 | "./attributes", 13 | "./event", 14 | "./event/alias", 15 | "./event/focusin", 16 | "./manipulation", 17 | "./manipulation/_evalUrl", 18 | "./wrap", 19 | "./css", 20 | "./css/hiddenVisibleSelectors", 21 | "./serialize", 22 | "./ajax", 23 | "./ajax/xhr", 24 | "./ajax/script", 25 | "./ajax/jsonp", 26 | "./ajax/load", 27 | "./event/ajax", 28 | "./effects", 29 | "./effects/animatedSelector", 30 | "./offset", 31 | "./dimensions", 32 | "./deprecated", 33 | "./exports/amd", 34 | "./exports/global" 35 | ], function( jQuery ) { 36 | 37 | "use strict"; 38 | 39 | return jQuery; 40 | 41 | } ); 42 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/_evalUrl.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../ajax" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | jQuery._evalUrl = function( url ) { 8 | return jQuery.ajax( { 9 | url: url, 10 | 11 | // Make this explicit, since user can override this through ajaxSetup (#11264) 12 | type: "GET", 13 | dataType: "script", 14 | cache: true, 15 | async: false, 16 | global: false, 17 | "throws": true 18 | } ); 19 | }; 20 | 21 | return jQuery._evalUrl; 22 | 23 | } ); 24 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/getAll.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../core/nodeName" 4 | ], function( jQuery, nodeName ) { 5 | 6 | "use strict"; 7 | 8 | function getAll( context, tag ) { 9 | 10 | // Support: IE <=9 - 11 only 11 | // Use typeof to avoid zero-argument method invocation on host objects (#15151) 12 | var ret; 13 | 14 | if ( typeof context.getElementsByTagName !== "undefined" ) { 15 | ret = context.getElementsByTagName( tag || "*" ); 16 | 17 | } else if ( typeof context.querySelectorAll !== "undefined" ) { 18 | ret = context.querySelectorAll( tag || "*" ); 19 | 20 | } else { 21 | ret = []; 22 | } 23 | 24 | if ( tag === undefined || tag && nodeName( context, tag ) ) { 25 | return jQuery.merge( [ context ], ret ); 26 | } 27 | 28 | return ret; 29 | } 30 | 31 | return getAll; 32 | } ); 33 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/setGlobalEval.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../data/var/dataPriv" 3 | ], function( dataPriv ) { 4 | 5 | "use strict"; 6 | 7 | // Mark scripts as having already been evaluated 8 | function setGlobalEval( elems, refElements ) { 9 | var i = 0, 10 | l = elems.length; 11 | 12 | for ( ; i < l; i++ ) { 13 | dataPriv.set( 14 | elems[ i ], 15 | "globalEval", 16 | !refElements || dataPriv.get( refElements[ i ], "globalEval" ) 17 | ); 18 | } 19 | } 20 | 21 | return setGlobalEval; 22 | } ); 23 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/support.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/document", 3 | "../var/support" 4 | ], function( document, support ) { 5 | 6 | "use strict"; 7 | 8 | ( function() { 9 | var fragment = document.createDocumentFragment(), 10 | div = fragment.appendChild( document.createElement( "div" ) ), 11 | input = document.createElement( "input" ); 12 | 13 | // Support: Android 4.0 - 4.3 only 14 | // Check state lost if the name is set (#11217) 15 | // Support: Windows Web Apps (WWA) 16 | // `name` and `type` must use .setAttribute for WWA (#14901) 17 | input.setAttribute( "type", "radio" ); 18 | input.setAttribute( "checked", "checked" ); 19 | input.setAttribute( "name", "t" ); 20 | 21 | div.appendChild( input ); 22 | 23 | // Support: Android <=4.1 only 24 | // Older WebKit doesn't clone checked state correctly in fragments 25 | support.checkClone = div.cloneNode( true ).cloneNode( true ).lastChild.checked; 26 | 27 | // Support: IE <=11 only 28 | // Make sure textarea (and checkbox) defaultValue is properly cloned 29 | div.innerHTML = ""; 30 | support.noCloneChecked = !!div.cloneNode( true ).lastChild.defaultValue; 31 | } )(); 32 | 33 | return support; 34 | 35 | } ); 36 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/var/rcheckableType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^(?:checkbox|radio)$/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/var/rscriptType.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /^$|\/(?:java|ecma)script/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/var/rtagName.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /<([a-z][^\/\0>\x20\t\r\n\f]+)/i ); 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/manipulation/wrapMap.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | // We have to close these tags to support XHTML (#13200) 6 | var wrapMap = { 7 | 8 | // Support: IE <=9 only 9 | option: [ 1, "" ], 10 | 11 | // XHTML parsers do not magically insert elements in the 12 | // same way that tag soup parsers do. So we cannot shorten 13 | // this by omitting or other required elements. 14 | thead: [ 1, "", "
" ], 15 | col: [ 2, "", "
" ], 16 | tr: [ 2, "", "
" ], 17 | td: [ 3, "", "
" ], 18 | 19 | _default: [ 0, "", "" ] 20 | }; 21 | 22 | // Support: IE <=9 only 23 | wrapMap.optgroup = wrapMap.option; 24 | 25 | wrapMap.tbody = wrapMap.tfoot = wrapMap.colgroup = wrapMap.caption = wrapMap.thead; 26 | wrapMap.th = wrapMap.td; 27 | 28 | return wrapMap; 29 | } ); 30 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/queue/delay.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../core", 3 | "../queue", 4 | "../effects" // Delay is optional because of this dependency 5 | ], function( jQuery ) { 6 | 7 | "use strict"; 8 | 9 | // Based off of the plugin by Clint Helfers, with permission. 10 | // https://web.archive.org/web/20100324014747/http://blindsignals.com/index.php/2009/07/jquery-delay/ 11 | jQuery.fn.delay = function( time, type ) { 12 | time = jQuery.fx ? jQuery.fx.speeds[ time ] || time : time; 13 | type = type || "fx"; 14 | 15 | return this.queue( type, function( next, hooks ) { 16 | var timeout = window.setTimeout( next, time ); 17 | hooks.stop = function() { 18 | window.clearTimeout( timeout ); 19 | }; 20 | } ); 21 | }; 22 | 23 | return jQuery.fn.delay; 24 | } ); 25 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/selector-sizzle.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./core", 3 | "../external/sizzle/dist/sizzle" 4 | ], function( jQuery, Sizzle ) { 5 | 6 | "use strict"; 7 | 8 | jQuery.find = Sizzle; 9 | jQuery.expr = Sizzle.selectors; 10 | 11 | // Deprecated 12 | jQuery.expr[ ":" ] = jQuery.expr.pseudos; 13 | jQuery.uniqueSort = jQuery.unique = Sizzle.uniqueSort; 14 | jQuery.text = Sizzle.getText; 15 | jQuery.isXMLDoc = Sizzle.isXML; 16 | jQuery.contains = Sizzle.contains; 17 | jQuery.escapeSelector = Sizzle.escape; 18 | 19 | } ); 20 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/selector.js: -------------------------------------------------------------------------------- 1 | define( [ "./selector-sizzle" ], function() { 2 | "use strict"; 3 | } ); 4 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/traversing/var/dir.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core" 3 | ], function( jQuery ) { 4 | 5 | "use strict"; 6 | 7 | return function( elem, dir, until ) { 8 | var matched = [], 9 | truncate = until !== undefined; 10 | 11 | while ( ( elem = elem[ dir ] ) && elem.nodeType !== 9 ) { 12 | if ( elem.nodeType === 1 ) { 13 | if ( truncate && jQuery( elem ).is( until ) ) { 14 | break; 15 | } 16 | matched.push( elem ); 17 | } 18 | } 19 | return matched; 20 | }; 21 | 22 | } ); 23 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/traversing/var/rneedsContext.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../../core", 3 | "../../selector" 4 | ], function( jQuery ) { 5 | "use strict"; 6 | 7 | return jQuery.expr.match.needsContext; 8 | } ); 9 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/traversing/var/siblings.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | 3 | "use strict"; 4 | 5 | return function( n, elem ) { 6 | var matched = []; 7 | 8 | for ( ; n; n = n.nextSibling ) { 9 | if ( n.nodeType === 1 && n !== elem ) { 10 | matched.push( n ); 11 | } 12 | } 13 | 14 | return matched; 15 | }; 16 | 17 | } ); 18 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/ObjectFunctionString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./fnToString" 3 | ], function( fnToString ) { 4 | "use strict"; 5 | 6 | return fnToString.call( Object ); 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/arr.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return []; 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/class2type.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // [[Class]] -> type pairs 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/concat.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.concat; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/document.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return window.document; 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/documentElement.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./document" 3 | ], function( document ) { 4 | "use strict"; 5 | 6 | return document.documentElement; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/fnToString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./hasOwn" 3 | ], function( hasOwn ) { 4 | "use strict"; 5 | 6 | return hasOwn.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/getProto.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return Object.getPrototypeOf; 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/hasOwn.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.hasOwnProperty; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/indexOf.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.indexOf; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/pnum.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | return ( /[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/ ).source; 5 | } ); 6 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/push.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.push; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/rcssNum.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "../var/pnum" 3 | ], function( pnum ) { 4 | 5 | "use strict"; 6 | 7 | return new RegExp( "^(?:([+-])=|)(" + pnum + ")([a-z%]*)$", "i" ); 8 | 9 | } ); 10 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/rnothtmlwhite.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // Only count HTML whitespace 5 | // Other whitespace should count in values 6 | // https://html.spec.whatwg.org/multipage/infrastructure.html#space-character 7 | return ( /[^\x20\t\r\n\f]+/g ); 8 | } ); 9 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/slice.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./arr" 3 | ], function( arr ) { 4 | "use strict"; 5 | 6 | return arr.slice; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/support.js: -------------------------------------------------------------------------------- 1 | define( function() { 2 | "use strict"; 3 | 4 | // All support tests are defined in their respective modules. 5 | return {}; 6 | } ); 7 | -------------------------------------------------------------------------------- /08/code/node_modules/_jquery@3.2.1@jquery/src/var/toString.js: -------------------------------------------------------------------------------- 1 | define( [ 2 | "./class2type" 3 | ], function( class2type ) { 4 | "use strict"; 5 | 6 | return class2type.toString; 7 | } ); 8 | -------------------------------------------------------------------------------- /08/code/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "code", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "01.封装读取文件的方法.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1" 8 | }, 9 | "keywords": [], 10 | "author": "", 11 | "license": "ISC", 12 | "dependencies": { 13 | "jquery": "^3.2.1" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /09/演示前后端开发/node_server/app.js: -------------------------------------------------------------------------------- 1 | // 1. 创建 express 服务器 2 | const express = require('express') 3 | 4 | const app = express() 5 | 6 | 7 | //2.0 将所有api的请求响应content-type设置为application/json 8 | app.all('/api/*', (req, res, next) => { 9 | //设置允许跨域响应报文头 10 | //设置跨域 11 | // 启用 Node 服务器端的 cors 跨域 12 | res.header("Access-Control-Allow-Origin", "*"); 13 | res.header("Access-Control-Allow-Headers", "X-Requested-With"); 14 | res.header("Access-Control-Allow-Methods", "*"); 15 | 16 | res.setHeader('Content-Type', 'application/json;charset=utf-8'); 17 | next(); 18 | }); 19 | 20 | 21 | // 注册解析 表单数据的 body-parser 22 | const bodyParser = require('body-parser') 23 | // 注册 body-parser 24 | app.use(bodyParser({ extended: false })) 25 | 26 | 27 | // 注册路由 28 | const router = require('./router.js') 29 | app.use(router) 30 | 31 | 32 | app.listen(5000, function () { 33 | console.log('http://127.0.0.1:5000'); 34 | }); -------------------------------------------------------------------------------- /09/演示前后端开发/node_server/controller.js: -------------------------------------------------------------------------------- 1 | const model = require('./model.js') 2 | 3 | module.exports = { 4 | registerNewUser(req, res) { // 注册用户 5 | // 分析业务逻辑: 6 | // 1. 获取提交过来的表单 body-parser 7 | // 2. 检测用户名是否被注册 8 | // 3. 如果用户名可用,则 调用 Model 模块 来添加数据到 数据库 9 | // 4. 如果用户名不可用,则 返回 结果 { status:1, msg: '用户已被注册,请更换其他用户名' } 10 | const user = req.body 11 | model.getUserByName(user.username, function (err, results) { 12 | if (err) return res.json({ status: 1, msg: '服务器错误!' }) 13 | // 用户名可用 14 | if (results[0].count === 0) { 15 | model.register(user, (err, results) => { 16 | if (err) return res.json({ status: 1, msg: '注册失败' }) 17 | 18 | res.json({ status: 0, msg: '恭喜,注册成功!' }) 19 | }) 20 | } else { 21 | res.json({ status: 1, msg: '用户名被占用了!' }) 22 | } 23 | 24 | }) 25 | } 26 | } -------------------------------------------------------------------------------- /09/演示前后端开发/node_server/model.js: -------------------------------------------------------------------------------- 1 | const mysql = require('mysql') 2 | 3 | const conn = mysql.createConnection({ 4 | host: '127.0.0.1', 5 | database: 'sqlstudy', 6 | user: 'root', 7 | password: 'root' 8 | }) 9 | 10 | module.exports = { 11 | getUserByName(name, callback) { // 用户名查重 12 | const sql = 'select count(*) as count from users where username=?' 13 | conn.query(sql, name, callback) 14 | }, 15 | register(user, callback) { // 注册用户 16 | const sql = 'insert into users set ?' 17 | conn.query(sql, user, callback) 18 | } 19 | } -------------------------------------------------------------------------------- /09/演示前后端开发/node_server/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "dependencies": { 3 | "blueimp-md5": "^2.10.0", 4 | "body-parser": "^1.18.2", 5 | "express": "^4.16.2", 6 | "mysql": "^2.15.0" 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /09/演示前后端开发/node_server/router.js: -------------------------------------------------------------------------------- 1 | const express = require('express') 2 | 3 | const router = express.Router() 4 | // 导入业务逻辑模块 5 | const ctrl = require('./controller.js') 6 | 7 | router 8 | .get('/', (req, res) => { 9 | res.send('欢迎访问 Node 服务器数据 API 接口!') 10 | }) 11 | .post('/api/register', ctrl.registerNewUser) // 注册新用户 12 | 13 | module.exports = router -------------------------------------------------------------------------------- /09/演示前后端开发/node_server/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/09/演示前后端开发/node_server/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime", ["component", [ 4 | { 5 | "libraryName": "mint-ui", 6 | "style": true 7 | } 8 | ]]] 9 | } -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/src/App.vue: -------------------------------------------------------------------------------- 1 | 13 | 14 | 42 | 43 | 44 | 47 | -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/src/lib/mui/fonts/mui.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/09/演示前后端开发/vue-cms-template/src/lib/mui/fonts/mui.ttf -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/src/main.js: -------------------------------------------------------------------------------- 1 | // 入口文件 2 | import Vue from 'vue' 3 | import VueResource from 'vue-resource' 4 | Vue.use(VueResource) 5 | 6 | import App from './App.vue' 7 | 8 | const vm = new Vue({ 9 | el: '#app', 10 | render: c => c(App) 11 | }) -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/src/router.js: -------------------------------------------------------------------------------- 1 | import VueRouter from 'vue-router' 2 | 3 | 4 | // 3. 创建路由对象 5 | var router = new VueRouter({ 6 | routes: [ 7 | ] 8 | }) 9 | 10 | // 把路由对象暴露出去 11 | export default router -------------------------------------------------------------------------------- /09/演示前后端开发/vue-cms-template/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/09/演示前后端开发/vue-cms-template/先运行 npm install 安装依赖包.txt -------------------------------------------------------------------------------- /09/演示前后端开发/后端接口API文档.txt: -------------------------------------------------------------------------------- 1 | 1. 注册用户的接口 2 | 接口地址: /api/register 3 | 提交类型: POST 4 | 数据字段: username 用户名 password 密码 nickname 昵称 5 | 返回格式: JSON 6 | 返回数据模板: { status:0/1, msg: '' } -------------------------------------------------------------------------------- /10/vuex-study/.babelrc: -------------------------------------------------------------------------------- 1 | { 2 | "presets": ["env", "stage-0"], 3 | "plugins": ["transform-runtime", ["component", [ 4 | { 5 | "libraryName": "mint-ui", 6 | "style": true 7 | } 8 | ]]] 9 | } -------------------------------------------------------------------------------- /10/vuex-study/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "01.webpack-study", 3 | "version": "1.0.0", 4 | "description": "", 5 | "main": "index.js", 6 | "scripts": { 7 | "test": "echo \"Error: no test specified\" && exit 1", 8 | "dev": "webpack-dev-server --open --port 3000 --hot" 9 | }, 10 | "keywords": [], 11 | "author": "", 12 | "license": "ISC", 13 | "devDependencies": { 14 | "babel-core": "^6.26.0", 15 | "babel-loader": "^7.1.2", 16 | "babel-plugin-component": "^0.10.1", 17 | "babel-plugin-transform-runtime": "^6.23.0", 18 | "babel-preset-env": "^1.6.1", 19 | "babel-preset-stage-0": "^6.24.1", 20 | "css-loader": "^0.28.7", 21 | "file-loader": "^1.1.5", 22 | "html-webpack-plugin": "^2.30.1", 23 | "less": "^2.7.3", 24 | "less-loader": "^4.0.5", 25 | "node-sass": "^4.5.3", 26 | "sass-loader": "^6.0.6", 27 | "style-loader": "^0.19.0", 28 | "url-loader": "^0.6.2", 29 | "vue-loader": "^13.3.0", 30 | "vue-template-compiler": "^2.5.2", 31 | "webpack": "^3.8.1", 32 | "webpack-dev-server": "^2.9.3" 33 | }, 34 | "dependencies": { 35 | "bootstrap": "^3.3.7", 36 | "mint-ui": "^2.2.9", 37 | "vue": "^2.5.2", 38 | "vue-router": "^3.0.1", 39 | "vuex": "^3.0.1" 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /10/vuex-study/src/App.vue: -------------------------------------------------------------------------------- 1 | 12 | 13 | 27 | 28 | 29 | 32 | -------------------------------------------------------------------------------- /10/vuex-study/src/components/amount.vue: -------------------------------------------------------------------------------- 1 | 8 | 9 | 11 | 12 | 15 | -------------------------------------------------------------------------------- /10/vuex-study/src/components/counter.vue: -------------------------------------------------------------------------------- 1 | 9 | 10 | 35 | 36 | 39 | -------------------------------------------------------------------------------- /10/vuex-study/src/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | Document 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | -------------------------------------------------------------------------------- /10/vuex-study/src/lib/mui/fonts/mui.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/10/vuex-study/src/lib/mui/fonts/mui.ttf -------------------------------------------------------------------------------- /10/vuex-study/src/router.js: -------------------------------------------------------------------------------- 1 | import VueRouter from 'vue-router' 2 | 3 | 4 | // 3. 创建路由对象 5 | var router = new VueRouter({ 6 | routes: [ 7 | ] 8 | }) 9 | 10 | // 把路由对象暴露出去 11 | export default router -------------------------------------------------------------------------------- /10/vuex-study/先运行 npm install 安装依赖包.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/OYZQ/vuePoject/acebd865e5b6d860c3aaccb137629b6cef0ed958/10/vuex-study/先运行 npm install 安装依赖包.txt --------------------------------------------------------------------------------