Skip to content

Commit

Permalink
[merge] Merge branch 'dev'
Browse files Browse the repository at this point in the history
  • Loading branch information
jin5354 committed Jun 7, 2017
2 parents d24d573 + 9599793 commit 07fdb12
Show file tree
Hide file tree
Showing 19 changed files with 290 additions and 69 deletions.
5 changes: 3 additions & 2 deletions .travis.yml
@@ -1,9 +1,10 @@
sudo: false
language: node_js
node_js: stable
env: PHANTOMJS_BIN=./node_modules/.bin/phantomjs
node_js: 7
script:
- npm run lint
- npm run test
- npm run build
after_success:
- cat ./coverage/lcov.info | coveralls
- cat ./coverage/lcov.info | coveralls
13 changes: 12 additions & 1 deletion build/webpack.build.config.js
Expand Up @@ -5,6 +5,7 @@ const autoprefixer = require('autoprefixer')
const px2rem = require('postcss-px2rem')
const fs = require('fs')
const path = require('path')
const StatsWriterPlugin = require('webpack-stats-plugin').StatsWriterPlugin

const fileNameTransfer = fileName => fileName.match(/[A-Z][a-z]*/g).map((e) => e.toLowerCase()).join('-')

Expand Down Expand Up @@ -85,7 +86,10 @@ module.exports = {
new CleanPlugin(['lib'], {
root: path.resolve(__dirname, '../'),
})
]
],
resolve: {
modules: ['node_modules']
}
}

if(process.env.NODE_ENV === 'production') {
Expand All @@ -97,6 +101,13 @@ if(process.env.NODE_ENV === 'production') {
warnings: false
}
}))
// module.exports.plugins.push(new StatsWriterPlugin({
// filename: 'stats.json',
// transform: function(data, opts) {
// let stats = opts.compiler.getStats().toJson({chunkModules: true})
// return JSON.stringify(stats, null, 2)
// }
// }))
}else {
module.exports.devtool = 'eval-source-map'
}
6 changes: 4 additions & 2 deletions docs/website/components/App/AppHeader.vue
Expand Up @@ -8,7 +8,7 @@
<ul class="nav">
<li :class="{'active': active === ''}"><router-link to="/">首页</router-link></li>
<li :class="{'active': active === '/specifications'}"><router-link to="/specifications/intro">规范</router-link></li>
<li :class="{'active': active === '/components'}"><router-link to="/components/toast">组件</router-link></li>
<li :class="{'active': active.search(/\/components\//) !== -1}"><router-link to="/components/toast">组件</router-link></li>
<li :class="{'active': active === '/resources'}"><router-link to="/resources">资源</router-link></li>
<li>
<a href="https://github.com/wdfe/wdui">
Expand Down Expand Up @@ -121,13 +121,15 @@ export default {
}
}
@media (max-width: 500px) {
@media (max-width: 600px) {
.appheader-container {
.wrapper {
min-width: 0;
justify-content: center;
ul.nav {
margin-left: 25%;
li:nth-child(1),
li:nth-child(2),
li:nth-child(3),
Expand Down
7 changes: 6 additions & 1 deletion docs/website/components/App/UsageSidebar.vue
Expand Up @@ -37,7 +37,7 @@
</keep-alive>
</template>
</content>
<div class="phone" v-if="this.$route.matched[0].path === '/components/:component'">
<div class="phone" v-if="isPhoneShow">
<iframe :src="`/wdui/demo.html#/${active}`"></iframe>
</div>
</div>
Expand All @@ -51,6 +51,11 @@ export default {
components: {
components: Components
},
computed: {
isPhoneShow() {
return this.$route.matched[0].path === '/components/:component' && this.$route.path !== '/components/rem'
}
},
data() {
return {
active: '',
Expand Down
2 changes: 1 addition & 1 deletion docs/website/components/Index.vue
Expand Up @@ -4,7 +4,7 @@
<article class="app-content-container">
<app-content></app-content>
</article>
<footer>@weidian-h5 北京无线生活科技有限公司</footer>
<footer>@weidian-h5 北京口袋时尚科技有限公司</footer>
</div>
</template>

Expand Down
74 changes: 67 additions & 7 deletions docs/website/components/Index/Index.vue
Expand Up @@ -106,13 +106,15 @@ export default {
letter-spacing: 0;
line-height: 67px;
z-index: 1;
text-align: center;
}
.subtitle {
font-size: 20px;
color: #fff;
letter-spacing: 0;
line-height: 28px;
z-index: 1;
text-align: center;
}
.button-group {
margin-top: 66px;
Expand Down Expand Up @@ -170,11 +172,39 @@ export default {
height: 274px;
}
}
&:nth-child(even) {
content {
img {
margin-left: 50px;
}
}
}
&:nth-child(odd) {
content {
img {
margin-right: 50px;
}
}
}
}
}
}
@media (max-width: 500px) {
@media (max-width: 1400px) {
.index-container {
section {
content {
margin: 0 100px;
min-width: 0;
width: auto;
}
}
}
}
@media (max-width: 600px) {
.index-container {
section {
content {
Expand Down Expand Up @@ -215,30 +245,60 @@ export default {
}
&.feature {
height: 300px;
height: auto;
&:last-child {
content {
border-bottom: none;
}
}
content {
width: 100%;
padding: 0 20px;
margin: 0 8%;
width: auto;
height: auto;
box-sizing: border-box;
flex-direction: column;
border-bottom: 1px solid #dcdcdc;
.feature-article {
width: 100%;
.title {
text-align: center;
font-size: 24px;
}
.subtitle {
margin-top: 3vw;
margin-bottom: 10.6vw;
font-size: 18px;
line-height: 32px;
color: #737373;
}
}
img {
height: 80px;
margin-top: 12vw;
margin-bottom: 10vw;
height: 30vw;
}
}
&:nth-child(even) {
content {
img {
margin-left: 15px;
margin-left: 0;
order: -1;
}
}
}
&:nth-child(odd) {
content {
img {
margin-right: 15px;
margin-right: 0;
}
}
}
Expand Down
22 changes: 11 additions & 11 deletions docs/zh-cn/ImagePreview.md
Expand Up @@ -20,10 +20,10 @@ this.$ImagePreview({
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
]
})
Expand All @@ -49,10 +49,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
]
})
Expand All @@ -78,10 +78,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
],
autoClose: true
Expand Down Expand Up @@ -109,10 +109,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
],
showIndicator: false
Expand Down Expand Up @@ -140,10 +140,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
],
defaultIndex: 1
Expand All @@ -163,4 +163,4 @@ export default {
| showIndicator | 是否显示 indicator 指示器 | Boolean | true | |
| defaultIndex | 默认展示的图片 Index | Number | 0 | |
| onShow | 窗体出现后的回调函数 | Function | / | |
| onHide | 窗体隐藏后的回调函数 | Function | / | |
| onHide | 窗体隐藏后的回调函数 | Function | / | |
16 changes: 8 additions & 8 deletions example/components/Example/ImagePreview.vue
Expand Up @@ -28,10 +28,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
]
})
Expand All @@ -46,10 +46,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
],
autoClose: true
Expand All @@ -65,10 +65,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
],
showIndicator: false
Expand All @@ -84,10 +84,10 @@ export default {
url: 'https://si.geilicdn.com/vshop251425459-1449658110639-27839-s1.jpg?w=480&h=480'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110617-11c91-s1.jpg?w=480&h=480'
url: 'https://si.geilicdn.com/bj-vshop-251425459-1493795843545-1563709368_456_750.jpg?w=1080&h=1080'
},
{
url: 'https://si.geilicdn.com/vshop251425459-1449658110687-84627-s1.jpg?w=200&h=200'
url: 'https://si.geilicdn.com/vshop251425459-1482230983108-52066-s1.jpg?w=200&h=200&cp=1'
}
],
defaultIndex: 1
Expand Down
11 changes: 8 additions & 3 deletions example/components/Index/Index.vue
Expand Up @@ -38,8 +38,13 @@ export default {
</script>

<style lang="sass">
.iconfont.icon-zuosanjiao {
font-size: 36px;
color: #fff;
body {
font-family: Arial, "Microsoft YaHei";
.iconfont.icon-zuosanjiao {
font-size: 36px;
color: #fff;
}
}
</style>
2 changes: 1 addition & 1 deletion lib/index.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/scroller.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion lib/switch.js

Large diffs are not rendered by default.

5 changes: 3 additions & 2 deletions package.json
@@ -1,6 +1,6 @@
{
"name": "wdui",
"version": "0.6.3",
"version": "0.6.4",
"description": "Mobile UI Components Library based on Vue 2.0",
"main": "lib/index.js",
"repository": {
Expand Down Expand Up @@ -90,6 +90,7 @@
"vue-style-loader": "^2.0.5",
"vue-template-compiler": "^2.2.6",
"webpack": "^2.3.2",
"webpack-dev-server": "^2.2.0"
"webpack-dev-server": "^2.2.0",
"webpack-stats-plugin": "^0.1.5"
}
}

0 comments on commit 07fdb12

Please sign in to comment.