diff --git "a/\346\235\216\350\202\262\345\245\207/shop/index.html" "b/\346\235\216\350\202\262\345\245\207/shop/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..f491ee3ee1c1fa4c86cdbe2edb4ecafbfa65eea3 --- /dev/null +++ "b/\346\235\216\350\202\262\345\245\207/shop/index.html" @@ -0,0 +1,51 @@ + + + + + + + 购物车 + + + + + +
+ +
购物车为空
+
+ + + + + + \ No newline at end of file diff --git "a/\346\235\216\350\202\262\345\245\207/shop/index.js" "b/\346\235\216\350\202\262\345\245\207/shop/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..77125510011cf44d15601b97cc548d155ebde151 --- /dev/null +++ "b/\346\235\216\350\202\262\345\245\207/shop/index.js" @@ -0,0 +1,55 @@ +var app = new Vue({ + el: '#app', + data: { + list: [ + { + id: 1, + name: '苹果', + price: 1000, + count: 1 + }, + { + id: 2, + name: '小米', + price: 1928, + count: 1 + }, + { + id: 3, + name: '华为', + price: 6055, + count: 1 + }, + { + id: 1, + name: 'vivo ', + price: 2288, + count: 1 + } + ] + }, + computed: { + totalPrice: function () { + var total = 0; + for (var i = 0; i < this.list.length; i++) { + var item = this.list[i]; + total += item.price * item.count; + } + + return total.toString().replace(/\B(?=(\d{3})+$)/g,','); + } + }, + methods: { + handleReduce: function (index) { + if (this.list[index].count === 1) return; + this.list[index].count--; + }, + handleAdd: function (index) { + this.list[index].count++; + }, + handleRemove: function (index) { + this.list.splice(index, 1); + } + } + +}); \ No newline at end of file diff --git "a/\346\235\216\350\202\262\345\245\207/shop/shop.css" "b/\346\235\216\350\202\262\345\245\207/shop/shop.css" new file mode 100644 index 0000000000000000000000000000000000000000..025a7b4f61ad17833b952fbb8288f2b2d4363e45 --- /dev/null +++ "b/\346\235\216\350\202\262\345\245\207/shop/shop.css" @@ -0,0 +1,21 @@ +[v-cloak]{ + display: none; +} +table +{ + border: 1px solid #e9e9e9; + border-collapse:collapse; + border-spacing: 0; + empty-cells: show; +} +th,td{ + padding: 8px 16px; + border: 1px solid red; + text-align: left; +} +th{ + background: #f7f7f77f; + color: silver; + font-weight: 600; + white-space: nowrap; +} \ No newline at end of file diff --git "a/\346\235\216\350\202\262\345\245\207/test/15175090689_1920x1200.jpg" "b/\346\235\216\350\202\262\345\245\207/test/15175090689_1920x1200.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..68d1f9a00e0ff8b7236bc9a562a274c1430f0c5b Binary files /dev/null and "b/\346\235\216\350\202\262\345\245\207/test/15175090689_1920x1200.jpg" differ diff --git "a/\346\235\216\350\202\262\345\245\207/test/css/test.css" "b/\346\235\216\350\202\262\345\245\207/test/css/test.css" new file mode 100644 index 0000000000000000000000000000000000000000..f89566f33beb17e7b6a7dc3ffa3f04f2325d1ecb --- /dev/null +++ "b/\346\235\216\350\202\262\345\245\207/test/css/test.css" @@ -0,0 +1,18 @@ +.abc +{ + background-color: aqua; + width: 600px; + height: 300px; + +} +.num +{ + background-color: aquamarine; + width: 500px; + height: 25000Px; + color: blue; +} +.num1 +{ + background-color: chartreuse; +} \ No newline at end of file diff --git "a/\346\235\216\350\202\262\345\245\207/test/index.html" "b/\346\235\216\350\202\262\345\245\207/test/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..2ed8d39663a32c08a7fe4b3d753fd2548060be48 --- /dev/null +++ "b/\346\235\216\350\202\262\345\245\207/test/index.html" @@ -0,0 +1,187 @@ + + + + + + + Vue实战 + + + + + + + + + + +
+ +
像个开关改动 app.has no
+
拓展
+
进阶
+
+

+ 啦啦啦 +

+
+ +

今年18 + +

+

成年人

+ +

小学生

+ + + + + + + + + + + +
+ + + +
+ + {{message1 | message2}} +
+ {{newM}} + +
+ {{otherM()}} +
+
+ +
+ + 123 + + +
+ + +
+ + +
+ + + + + + + + + + + + \ No newline at end of file diff --git "a/\351\273\204\347\204\225/first_vue_project/imgs/b64543a98226cffc7a951157b8014a90f703ea9c.jpg" "b/\351\273\204\347\204\225/first_vue_project/imgs/b64543a98226cffc7a951157b8014a90f703ea9c.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..ebf15dd03f225155e66436b4bb23ff8445a6ece8 Binary files /dev/null and "b/\351\273\204\347\204\225/first_vue_project/imgs/b64543a98226cffc7a951157b8014a90f703ea9c.jpg" differ diff --git "a/\351\273\204\347\204\225/first_vue_project/index.html" "b/\351\273\204\347\204\225/first_vue_project/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..b3b4c00a731ae1676c1cb71edff9784427878ee9 --- /dev/null +++ "b/\351\273\204\347\204\225/first_vue_project/index.html" @@ -0,0 +1,123 @@ + + + + + + + + vue 示例 + + + + +
+ +

你好,{{name}}

+
+ + +
+ +
+ + +
+ {{eat}} +
+ + + +
+

现在你能看到我

+ + +

+

我隐身了

+
+ + + 百度一下,你就知道 + +
+ + + +
+ {{msg}} + + + {{msg | formatString}} + + + {{newMsg}} +
+ + + + + + + + + + + \ No newline at end of file diff --git "a/\351\273\204\347\204\225/vue-ShoppingCart/index.html" "b/\351\273\204\347\204\225/vue-ShoppingCart/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..62d36630deef2d47108fe8e2a174e64d8193c974 --- /dev/null +++ "b/\351\273\204\347\204\225/vue-ShoppingCart/index.html" @@ -0,0 +1,51 @@ + + + + + + + 购物车示例 + + + + + +
+ +
购物车为空
+
+ + + + + + \ No newline at end of file diff --git "a/\351\273\204\347\204\225/vue-ShoppingCart/index.js" "b/\351\273\204\347\204\225/vue-ShoppingCart/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..a2f0e0b683d12b9a8e1e89ac441aeb90baf3cc1b --- /dev/null +++ "b/\351\273\204\347\204\225/vue-ShoppingCart/index.js" @@ -0,0 +1,55 @@ +var app = new Vue({ + el: '#app', + data: { + list: [ + { + id: 1, + name: '苹果', + price: 68, + count: 1 + }, + { + id: 2, + name: '智能蓝牙耳机', + price: 128, + count: 1 + }, + { + id: 3, + name: '男士夏季上衣', + price: 55, + count: 1 + }, + { + id: 1, + name: 'vivo IQ00', + price: 1288, + count: 1 + } + ] + }, + computed: { + totalPrice: function () { + var total = 0; + for (var i = 0; i < this.list.length; i++) { + var item = this.list[i]; + total += item.price * item.count; + } + + return total.toString().replace(/\B(?=(\d{3})+$)/g,','); + } + }, + methods: { + handleReduce: function (index) { + if (this.list[index].count === 1) return; + this.list[index].count--; + }, + handleAdd: function (index) { + this.list[index].count++; + }, + handleRemove: function (index) { + this.list.splice(index, 1); + } + } + +}); \ No newline at end of file diff --git "a/\351\273\204\347\204\225/vue-ShoppingCart/style.css" "b/\351\273\204\347\204\225/vue-ShoppingCart/style.css" new file mode 100644 index 0000000000000000000000000000000000000000..70b0793cff6c4907aeef05ea270f5eff7e29126e --- /dev/null +++ "b/\351\273\204\347\204\225/vue-ShoppingCart/style.css" @@ -0,0 +1,20 @@ +[v-cloak]{ + display: none; +} +table{ + border:1px solid #e9e9e9; + border-collapse: collapse; + border-spacing: 0; + empty-cells: show; +} +th,td{ + padding:8px 16px; + border:1px solid #e9e9e9; + text-align:left; +} +th{ + background: #f7f7f7; + color: #5c6b77; + font-weight: 600; + white-space: nowrap; +} diff --git "a/\351\273\204\347\204\225/vue-project-lesson2/index.html" "b/\351\273\204\347\204\225/vue-project-lesson2/index.html" new file mode 100644 index 0000000000000000000000000000000000000000..f35b4205ab27ecc2a0a52edb149e699f432e458c --- /dev/null +++ "b/\351\273\204\347\204\225/vue-project-lesson2/index.html" @@ -0,0 +1,116 @@ + + + + + + + + 绑定class的几种方式 + + + + + + +
+
我是红色
+
我是绿色
+
+
+ + +
+ +
+
+

天降大任

+
+ + +
+ + +
+

你是个男生

+

你是个女生

+

你既不是个男生也不是个女生

+ + + + + + +
+ +
+ +
+ + + + + + \ No newline at end of file diff --git "a/\351\273\204\347\204\225/vue-project-lesson2/style/demo.css" "b/\351\273\204\347\204\225/vue-project-lesson2/style/demo.css" new file mode 100644 index 0000000000000000000000000000000000000000..1dc76740d8e5544cf833f4b9b0c8ecd257fe9402 --- /dev/null +++ "b/\351\273\204\347\204\225/vue-project-lesson2/style/demo.css" @@ -0,0 +1,5 @@ +.abc{ + background-color: aqua; + width: 600px; + height: 500px; +} \ No newline at end of file