Authored by 陈轩

Merge remote-tracking branch 'origin/develop' into develop

@@ -30,10 +30,12 @@ iconfont 新建项目,使用 class 控制图标样式,不要用 unicode<br> @@ -30,10 +30,12 @@ iconfont 新建项目,使用 class 控制图标样式,不要用 unicode<br>
30 30
31 <button class="button">空心</button> 31 <button class="button">空心</button>
32 <button class="button button-solid">实心</button> 32 <button class="button button-solid">实心</button>
  33 +<hr>
33 <button class="button button-round">圆角</button> 34 <button class="button button-round">圆角</button>
34 <button class="button button-round button-solid">圆角,实心</button> 35 <button class="button button-round button-solid">圆角,实心</button>
35 <hr> 36 <hr>
36 <button class="button button-large"></button> 37 <button class="button button-large"></button>
  38 +<hr>
37 <button class="button button-small"></button> 39 <button class="button button-small"></button>
38 <hr> 40 <hr>
39 <button class="button button-large button-round button-solid">大,圆角,实心</button> 41 <button class="button button-large button-round button-solid">大,圆角,实心</button>
@@ -103,8 +105,12 @@ iconfont 新建项目,使用 class 控制图标样式,不要用 unicode<br> @@ -103,8 +105,12 @@ iconfont 新建项目,使用 class 控制图标样式,不要用 unicode<br>
103 每个按钮支持自定义事件 105 每个按钮支持自定义事件
104 106
105 107
106 -<h2>Vue 示例</h2> 108 +<h2>Vue 示例(大展示,使用新路由)</h2>
107 109
108 <div id="app"> 110 <div id="app">
109 <app></app> 111 <app></app>
110 </div> 112 </div>
  113 +
  114 +<h2>Handlebars 示例</h2>
  115 +<div id="hbs-placeholder">
  116 +</div>
@@ -12,7 +12,7 @@ @@ -12,7 +12,7 @@
12 <link rel="dns-prefetch" href="//cdn.yoho.cn"> 12 <link rel="dns-prefetch" href="//cdn.yoho.cn">
13 <link rel="dns-prefetch" href="//static.yohobuy.com"> 13 <link rel="dns-prefetch" href="//static.yohobuy.com">
14 <script type="text/javascript"> 14 <script type="text/javascript">
15 - (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=640){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/640)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window); 15 + (function(d,c){var e=d.documentElement,a="orientationchange" in window?"orientationchange":"resize",b=function(){var f=e.clientWidth;if(!f){return}if(f>=750){e.style.fontSize="40px"}else{e.style.fontSize=40*(f/750)+"px"}};if(!d.addEventListener){return}b();c.addEventListener(a,b,false);d.addEventListener("DOMContentLoaded",b,false)})(document,window);
16 </script> 16 </script>
17 {{#if devEnv}} 17 {{#if devEnv}}
18 <link rel="stylesheet" href="//localhost:5004/css/index.css"> 18 <link rel="stylesheet" href="//localhost:5004/css/index.css">
  1 +<span>Hello {{text}}</span>
1 -<span>{{text}}</span>  
1 -var tpl = require('./hello.hbs');  
2 -  
3 var Vue = require('yoho-vue'); 1 var Vue = require('yoho-vue');
4 2
5 var app = require('example/home.vue'); 3 var app = require('example/home.vue');
  4 +var tpl = require('example/hello.hbs');
6 5
7 var vm = new Vue({ 6 var vm = new Vue({
8 el: '#app', 7 el: '#app',
@@ -25,6 +24,7 @@ var cookie = require('yoho-cookie'); @@ -25,6 +24,7 @@ var cookie = require('yoho-cookie');
25 24
26 console.log(cookie.all()); 25 console.log(cookie.all());
27 26
  27 +// ES6 test
28 var test = { 28 var test = {
29 data() { 29 data() {
30 return { 30 return {
1 .button { 1 .button {
2 display: inline-block; 2 display: inline-block;
3 - min-width: 100px;  
4 - height: 40px; 3 + min-width: 310px;
  4 + min-height: 100px;
5 border: 1px solid $black; 5 border: 1px solid $black;
6 background: $white; 6 background: $white;
7 color: $black; 7 color: $black;
8 font-size: 20px; 8 font-size: 20px;
  9 + padding: 0 10px;
  10 + -webkit-appearance: button;
9 11
10 &.button-solid { 12 &.button-solid {
11 background: $black; 13 background: $black;
@@ -17,11 +19,13 @@ @@ -17,11 +19,13 @@
17 } 19 }
18 20
19 &.button-small { 21 &.button-small {
20 - min-width: 50px; 22 + min-width: 180px;
  23 + min-height: 70px;
21 } 24 }
22 25
23 &.button-large { 26 &.button-large {
24 - min-width: 300px; 27 + min-width: 700px;
  28 + min-height: 100px;
25 } 29 }
26 30
27 &:disabled { 31 &:disabled {
@@ -41,6 +41,6 @@ a { @@ -41,6 +41,6 @@ a {
41 position: relative; 41 position: relative;
42 margin-right: auto; 42 margin-right: auto;
43 margin-left: auto; 43 margin-left: auto;
44 - max-width: 640px; 44 + max-width: 750px;
45 width: 100%; 45 width: 100%;
46 } 46 }
@@ -55,11 +55,10 @@ module.exports = { @@ -55,11 +55,10 @@ module.exports = {
55 loader: 'style!css?-url' 55 loader: 'style!css?-url'
56 }, { 56 }, {
57 test: /\.hbs$/, loader: 'handlebars-loader' 57 test: /\.hbs$/, loader: 'handlebars-loader'
58 - }  
59 - ] 58 + }]
60 }, 59 },
61 resolve: { 60 resolve: {
62 - modulesDirectories: ['node_modules', './vue'] 61 + modulesDirectories: ['node_modules', './vue', './hbs']
63 }, 62 },
64 plugins: [ 63 plugins: [
65 new webpack.optimize.OccurenceOrderPlugin(), 64 new webpack.optimize.OccurenceOrderPlugin(),