diff --git a/20_脚手架/vue_code/22.插槽/1.src_默认插槽/App.vue b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/App.vue new file mode 100644 index 0000000..035934c --- /dev/null +++ b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/App.vue @@ -0,0 +1,38 @@ + + + + + diff --git a/20_脚手架/vue_code/22.插槽/1.src_默认插槽/assets/logo.png b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/assets/logo.png new file mode 100644 index 0000000..f3d2503 Binary files /dev/null and b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/assets/logo.png differ diff --git a/20_脚手架/vue_code/22.插槽/1.src_默认插槽/components/Category.vue b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/components/Category.vue new file mode 100644 index 0000000..3f524ac --- /dev/null +++ b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/components/Category.vue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/20_脚手架/vue_code/22.插槽/1.src_默认插槽/main.js b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/main.js new file mode 100644 index 0000000..967576e --- /dev/null +++ b/20_脚手架/vue_code/22.插槽/1.src_默认插槽/main.js @@ -0,0 +1,23 @@ +// 引入Vue +import Vue from "vue"; +// 引入App +import App from "./App"; +// 引入插件 +import vueResource from "vue-resource"; + +// 设置Vue +Vue.config.productionTip = false + +// 使用插件 +Vue.use(vueResource) + +// 实例化Vue +new Vue({ + components: { + App + }, + render: h => h(App), + beforeCreate() { + Vue.prototype.$bus = this // 安装全局事件总线 + } +}).$mount('#app') diff --git a/20_脚手架/vue_code/public/index.html b/20_脚手架/vue_code/public/index.html index 9595ac5..e95a5c8 100644 --- a/20_脚手架/vue_code/public/index.html +++ b/20_脚手架/vue_code/public/index.html @@ -5,7 +5,7 @@ - + <%= htmlWebpackPlugin.options.title %> diff --git a/20_脚手架/vue_code/src/App.vue b/20_脚手架/vue_code/src/App.vue index 3a938a4..035934c 100644 --- a/20_脚手架/vue_code/src/App.vue +++ b/20_脚手架/vue_code/src/App.vue @@ -1,20 +1,38 @@ diff --git a/20_脚手架/vue_code/src/components/Category.vue b/20_脚手架/vue_code/src/components/Category.vue new file mode 100644 index 0000000..3f524ac --- /dev/null +++ b/20_脚手架/vue_code/src/components/Category.vue @@ -0,0 +1,31 @@ + + + + + \ No newline at end of file diff --git a/20_脚手架/vue_code/src/components/List.vue b/20_脚手架/vue_code/src/components/List.vue deleted file mode 100644 index 3fcf878..0000000 --- a/20_脚手架/vue_code/src/components/List.vue +++ /dev/null @@ -1,70 +0,0 @@ - - - - - \ No newline at end of file diff --git a/20_脚手架/vue_code/src/components/Search.vue b/20_脚手架/vue_code/src/components/Search.vue deleted file mode 100644 index 52d2905..0000000 --- a/20_脚手架/vue_code/src/components/Search.vue +++ /dev/null @@ -1,42 +0,0 @@ - - - - - \ No newline at end of file