diff --git a/package.json b/package.json index 9be420a4a0c9ba0a9446d134ebc9f1453da947fb..2ae5f8dcd0cc74503674abb91a0273b6014949af 100644 --- a/package.json +++ b/package.json @@ -8,8 +8,12 @@ "lint": "vue-cli-service lint" }, "dependencies": { + "echarts": "^4.2.1", "element-ui": "^2.6.1", + "stylus": "^0.54.5", + "stylus-loader": "^3.0.2", "vue": "^2.6.6", + "vue-echarts": "^4.0.1", "vue-router": "^3.0.2", "vuex": "^3.1.0" }, diff --git a/src/App.vue b/src/App.vue index 49de6475c9f11bf8ce497bfe97c19719fa3f813d..f53d4149ae8a39d138d5d630147251eae7d16e03 100755 --- a/src/App.vue +++ b/src/App.vue @@ -45,7 +45,7 @@ export default { } .el-header, .el-footer { - background-color: #409EFF; + background-color: #333; color: #fff; text-align: center; line-height: 60px; diff --git a/src/assets/images/HTML-404-Error-Page.gif b/src/assets/images/HTML-404-Error-Page.gif new file mode 100755 index 0000000000000000000000000000000000000000..6c95031cb1d160a142ecc57daeff90c9741784e5 Binary files /dev/null and b/src/assets/images/HTML-404-Error-Page.gif differ diff --git a/src/assets/style/common.styl b/src/assets/style/common.styl new file mode 100755 index 0000000000000000000000000000000000000000..becdb3164d611c1381ae174b3c6d98ac5e5e4ede --- /dev/null +++ b/src/assets/style/common.styl @@ -0,0 +1,10 @@ +* { + margin: 0; + padding: 0; +} +ul>li { + list-style: none; +} +.font16 { + font-size: 16px; +} \ No newline at end of file diff --git a/src/assets/style/element-override.styl b/src/assets/style/element-override.styl new file mode 100755 index 0000000000000000000000000000000000000000..c5336736fb3b4ec1f681bb39061a76b37b968a01 --- /dev/null +++ b/src/assets/style/element-override.styl @@ -0,0 +1,3 @@ +.el-main { + line-height: normal; +} diff --git a/src/common/api/shop.js b/src/common/api/shop.js new file mode 100755 index 0000000000000000000000000000000000000000..990be26570dce3c064d4ce85ac354375d5ac4ea6 --- /dev/null +++ b/src/common/api/shop.js @@ -0,0 +1,23 @@ +/** + * Mocking client-server processing + */ +const _products = [ + {"id": 1, "title": "华为 Mate 20", "price": 3999, "inventory": 2}, + {"id": 2, "title": "小米 9", "price": 2999, "inventory": 0}, + {"id": 3, "title": "OPPO R17", "price": 2999, "inventory": 5} +] + +export default { + getProducts (cb) { + setTimeout(() => cb(_products), 100) + }, + + buyProducts (products, cb, errorCb) { + setTimeout(() => { + // simulate random checkout failure. + Math.random() > 0.5 + ? cb() + : errorCb() + }, 100) + } +} \ No newline at end of file diff --git a/src/components/CustomHeader.vue b/src/components/CustomHeader.vue index d1674196f5f00cec9646cebc09ec23f6124e7f45..40ee14dd9590b5651910fb9e926416e88f6a9497 100755 --- a/src/components/CustomHeader.vue +++ b/src/components/CustomHeader.vue @@ -13,20 +13,6 @@ export default { } - - diff --git a/src/components/CustomSlide.vue b/src/components/CustomSlide.vue index 7960dd5fb89d356a322d4d8b58e06d425bc25816..861bcfb0b589e2be746af01a3f902192188fa414 100755 --- a/src/components/CustomSlide.vue +++ b/src/components/CustomSlide.vue @@ -3,42 +3,55 @@ - - 首页 - - - 表格 - - - 通信 - + 首页 + Element表格 + 组件通信 + + + + + + drawer + echarts + + + + + + 动态路由 + + + + + + + shopping card - - - 导航二 - - - - 导航三 - - - - 导航四 - @@ -53,6 +66,10 @@ export default { }, handleClose(key, keyPath) { console.log(key, keyPath); + }, + handleSelect(index, indexPath) { + console.log(indexPath) + this.$router.push(index) } } } diff --git a/src/components/Home.vue b/src/components/Home.vue new file mode 100755 index 0000000000000000000000000000000000000000..c489aeef4ba3242b49d97e33507bda65e4b83789 --- /dev/null +++ b/src/components/Home.vue @@ -0,0 +1,47 @@ + + + + + \ No newline at end of file diff --git a/src/components/example/parent-child/child.vue b/src/components/example/parent-child/child.vue index bfc9ef9a8d692aa17fd92cd7e7cad99a6a9a145a..eb75998271704d32c5cee859b5629c2b94d6519c 100755 --- a/src/components/example/parent-child/child.vue +++ b/src/components/example/parent-child/child.vue @@ -19,11 +19,19 @@ } }, props: { - msg: String + msg: String, + putArr: { + type: Array, + required: true, + default: [1, 5] + }, + }, + mounted: function () { + console.log(this.putArr); }, methods: { pushDataToParent: function () { - this.$emit("getChildrenData", this.childrenData) + this.$emit("getChildrenData", 1) } } } diff --git a/src/components/example/parent-child/parent.vue b/src/components/example/parent-child/parent.vue index d2cea202b531f61612291350f6ec0bf00d6831d7..d4fdeb5b18ce7b9ff6ffcdab811cda3e201a07e3 100755 --- a/src/components/example/parent-child/parent.vue +++ b/src/components/example/parent-child/parent.vue @@ -1,7 +1,13 @@