diff --git a/build/webpack.dev.conf.js b/build/webpack.dev.conf.js
index 12a023b..c6e7b71 100644
--- a/build/webpack.dev.conf.js
+++ b/build/webpack.dev.conf.js
@@ -1,19 +1,20 @@
const merge = require("webpack-merge");
const path = require("path");
const baseConfig = require("./webpack.base.conf");
+
module.exports = merge(baseConfig, {
- mode: "development",
- devtool: "inline-source-map",
- module: {
- rules: [
- {
- test: /\.css$/,
- use: ["vue-style-loader", "css-loader", "postcss-loader"],
- },
- ],
- },
- devServer: {
- contentBase: path.resolve(__dirname, "../dist"),
- open: true,
- },
+ mode: "development",
+ devtool: "inline-source-map",
+ module: {
+ rules: [ // 自己拓展着玩呀
+ // {
+ // test: /\.css$/,
+ // use: ["vue-style-loader", "css-loader", "postcss-loader"],
+ // },
+ ],
+ },
+ devServer: {
+ contentBase: path.resolve(__dirname, "../dist"),
+ open: true,
+ },
});
diff --git a/build/webpack.prod.conf.js b/build/webpack.prod.conf.js
index f115f2c..5045ba3 100644
--- a/build/webpack.prod.conf.js
+++ b/build/webpack.prod.conf.js
@@ -1,30 +1,27 @@
const merge = require("webpack-merge");
const path = require("path");
const baseConfig = require("./webpack.base.conf");
-const MiniCssExtractPlugin = require('mini-css-extract-plugin')
const { CleanWebpackPlugin } = require("clean-webpack-plugin");
module.exports = merge(baseConfig, {
- mode: "production",
- devtool: "source-map",
- module: {
- rules: [
- {
- test: /\.css$/,
- use: [MiniCssExtractPlugin.loader, "css-loader", "postcss-loader"],
- },
- ],
- },
- plugins: [
- new CleanWebpackPlugin({
- root: path.resolve(__dirname, "../"),
- verbose: true,
- dry: false,
- }),
- // 抽取 CSS 到单文件
- new MiniCssExtractPlugin({
- filename: "[name].css",
- chunkFilename: "[id].css"
- })
- ],
+ mode: "production",
+ devtool: "source-map",
+ module: {
+ rules: [ // 自己拓展着玩呀
+ // {
+ // test: /\.css$/,
+ // use: [
+ // 'css-loader',
+ // 'postcss-loader',
+ // ]
+ // },
+ ],
+ },
+ plugins: [
+ new CleanWebpackPlugin({
+ root: path.resolve(__dirname, "../"),
+ verbose: true,
+ dry: false,
+ }),
+ ],
});
diff --git a/src/App.vue b/src/App.vue
index 428b3aa..b0a7500 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -18,3 +18,9 @@
}
}
+
\ No newline at end of file
diff --git a/src/components/footer.vue b/src/components/footer.vue
index d22bdc6..c417f35 100644
--- a/src/components/footer.vue
+++ b/src/components/footer.vue
@@ -3,9 +3,6 @@
index
-
- news
-
menu3
@@ -33,7 +30,7 @@
border-top: 1px solid #ccc;
display: grid;
text-align: center;
- grid-template-columns: 25% 25% 25% 25%;
+ grid-template-columns: 33% 33% 33%;
}
.fixed-bottom a {
width: 100%;
diff --git a/src/components/header.vue b/src/components/header.vue
index e1d325e..1cd9288 100644
--- a/src/components/header.vue
+++ b/src/components/header.vue
@@ -4,16 +4,13 @@
diff --git a/src/components/secondcomponent.vue b/src/components/secondcomponent.vue
index fbfc8ec..132d3c2 100644
--- a/src/components/secondcomponent.vue
+++ b/src/components/secondcomponent.vue
@@ -1,36 +1,33 @@
-
-
这是子组件
-
这是来自父组件的数据:{{myMessage}}
-
+
+
这是子组件
+
这是来自父组件的数据:{{myMessage}}
+
diff --git a/src/components/thirdcomponent.vue b/src/components/thirdcomponent.vue
index 8c95223..99d7d1f 100644
--- a/src/components/thirdcomponent.vue
+++ b/src/components/thirdcomponent.vue
@@ -1,32 +1,30 @@
-
+
\ No newline at end of file
diff --git a/src/pages/index.vue b/src/pages/index.vue
index 3e2f2eb..c8058e9 100644
--- a/src/pages/index.vue
+++ b/src/pages/index.vue
@@ -37,29 +37,32 @@ export default {
diff --git a/src/pages/news.vue b/src/pages/news.vue
deleted file mode 100644
index 2b940f0..0000000
--- a/src/pages/news.vue
+++ /dev/null
@@ -1,11 +0,0 @@
-
- 啥玩意儿?
-
-
-
diff --git a/src/pages/otherPages.vue b/src/pages/otherPages.vue
index 39ef600..c05dfd7 100644
--- a/src/pages/otherPages.vue
+++ b/src/pages/otherPages.vue
@@ -4,44 +4,41 @@
这是父组件
这是父组件正在渲染的数据:{{parentMsg}}
-
+
-
+
\ No newline at end of file
diff --git a/src/pages/otherPages2.vue b/src/pages/otherPages2.vue
index 9ad0791..3434c1c 100644
--- a/src/pages/otherPages2.vue
+++ b/src/pages/otherPages2.vue
@@ -1,10 +1,11 @@
-
+
子组件数据传递给父组件
方式:用自定义事件
-
这是父组件
+
这是父组件
+
{{ total }}
@@ -13,7 +14,7 @@
@@ -23,34 +24,32 @@
import buttonCounter from '../components/thirdcomponent.vue'
export default {
- data () {
- return {
- parentMsg: '子组件传递信息给父元素',
- total: 0
- }
- },
- methods: {
- incrementTotal: function () {
- this.total += 1
- }
- },
+ data: () => ({
+ parentMsg: '子组件传递信息给父元素',
+ total: 0,
+ }),
+ methods: {
+ incrementTotal: function () {
+ this.total += 1
+ }
+ },
components: {
- buttonCounter
+ buttonCounter
}
}
diff --git a/src/router/index.js b/src/router/index.js
index 629d6b5..afdee8f 100644
--- a/src/router/index.js
+++ b/src/router/index.js
@@ -6,7 +6,6 @@ Vue.config.debug = true
Vue.use(VueRouter);
import Index from '../pages/index'
-import News from '../pages/news'
import SecondComponent from '../pages/otherPages'
import ThirdComponent from '../pages/otherPages2'
@@ -18,10 +17,6 @@ export default new VueRouter({
path: '/index',
component: Index,
},
- {
- path: '/news',
- component: News,
- },
{
path: '/second',
component: SecondComponent,