Skip to content

Commit

Permalink
Merge branch 'dev-1.1.0-beta'
Browse files Browse the repository at this point in the history
# Conflicts:
#	package.json
  • Loading branch information
chuanshuoye committed Mar 27, 2018
2 parents 1166522 + 74a4ba5 commit c0625db
Show file tree
Hide file tree
Showing 62 changed files with 2,958 additions and 1,762 deletions.
10 changes: 8 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
sudo: false
language: node_js
node_js:
- 6
node_js: stable
before_install:
- export CHROME_BIN=chromium-browser
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- export TRAVIS_COMMIT_MSG="[deploy] $(git log --format='%h - %B' --no-merges -n 1)"
- export TRAVIS_COMMIT_USER="$(git log --no-merges -n 1 --format=%an)"
- export TRAVIS_COMMIT_EMAIL="$(git log --no-merges -n 1 --format=%ae)"
script:
- npm run lint
- npm run unit
Expand Down
5 changes: 0 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,6 @@
![JS gzip size](http://img.badgesize.io/https://unpkg.com/zarm-vue@latest/zarm-vue.umd.js?compression=gzip&label=gzip%20size:%20JS)
![CSS gzip size](http://img.badgesize.io/https://unpkg.com/zarm-vue@latest/zarm-vue.default.css?compression=gzip&label=gzip%20size:%20CSS)

### 更新说明

目前计划升级`1.1.x`BETA版本测试中,部分组件核心逻辑实现会做较大改动,整体API使用会基本和`1.0.x`版本保持一致,敬请关注~~


### 使用文档

[传送门](https://chuanshuoye.github.io/zarm-vue-doc/#/zh-CN)
Expand Down
11 changes: 8 additions & 3 deletions example/components/calendarPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@
<za-panel>
<za-panel-header title="时间最小最大限制"/>
<za-panel-body>
<za-cell title='选择时间范围' @click='showCal3'></za-cell>
<za-cell title='选择时间范围' @click='showCal3'>{{value3.join(',')}}</za-cell>
</za-panel-body>
</za-panel>
</div>
<za-calendar :visible.sync='visible1' @changed='changeDate' @ok='handleOk1' :selectedValue='value1' />
<za-calendar :visible.sync='visible2' @ok='handleOk2' :multiSelected='isMultiSelected' :selectedValue='value2'/>
<za-calendar :visible.sync='visible3' :min='minDate' :max='maxDate' :months="24"/>
<za-calendar :visible.sync='visible3' @ok='handleOk3' :min='minDate' :max='maxDate' :months="24" :selectedValue='value3'/>
</main>
<PageFooter />
</Container>
Expand All @@ -49,7 +49,8 @@ export default {
visible3: false,
minDate: new Date('2018-01-11'),
maxDate: new Date('2019-10-10'),
value2: ['2018-02-24','2018-03-10'],
value2: ['2018-04-24','2018-08-10'],
value3: [],
isMultiSelected: true,
}
},
Expand All @@ -73,6 +74,10 @@ export default {
handleOk2(date) {
this.value2 = date;
console.log(date); // eslint-disable-line
},
handleOk3(date) {
this.value3 = date;
console.log(date); // eslint-disable-line
}
},
};
Expand Down
141 changes: 141 additions & 0 deletions example/components/datePickerPage.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@
<template>
<Container class="picker-page">
<PageHeader title="日期选择器 DatePicker & DateSelect" />
<main>
<div>
<za-panel>
<za-panel-header title="日期选择器"/>
<za-panel-body>
<za-cell title="日期选择">
<za-button slot='description' size='xs' @click='visible1 = true'>开启</za-button>
</za-cell>
<za-cell title="年份选择">
<za-button slot='description' size='xs' @click='visible5 = true'>开启</za-button>
</za-cell>
<za-cell title="月份选择">
<za-button slot='description' size='xs' @click='visible2 = true'>开启</za-button>
</za-cell>
<za-cell title="时间选择">
<za-button slot='description' size='xs' @click='visible3 = true'>开启</za-button>
</za-cell>
<za-cell title="时间&日期">
<za-button slot='description' size='xs' @click='visible4 = true'>开启</za-button>
</za-cell>
</za-panel-body>
</za-panel>
<za-date-picker
:close-on-click-modal='false'
:visible.sync='visible1'
title="选择日期"
placeholder="请选择日期"
mode='date'
max='2030-10-25'
min='1917-02-12'
@ok='handleOk'/>
<za-date-picker
:visible.sync='visible5'
title="选择年份"
defaultValue='2015'
placeholder="请选择年份"
mode='year'
@ok='handleOk'/>
<za-date-picker
:visible.sync='visible2'
title="选择月份"
defaultValue='2018-09'
placeholder="请选择月份"
mode='month'
@ok='handleOk'/>
<za-date-picker
:visible.sync='visible3'
title="选择时间"
defaultValue='2018-09-10 09:45'
placeholder="请选择时间"
mode='time'
:minute-step='minuteStep'
@ok='handleOk'/>
<za-date-picker
:visible.sync='visible4'
title="选择"
placeholder="请选择时间和日期"
mode='datetime'
@ok='handleOk'/>
<za-panel>
<za-panel-header title="日期选择器 Select"/>
<za-panel-body>
<za-cell title="日期选择">
<za-date-select
v-model='v5'
title="选择日期"
placeholder="请选择日期"
mode='date'
format='yyyy年MM月dd日'
max='2030-10-25'
min='1917-10-25'
@ok='handleOk'/>
</za-cell>
</za-panel-body>
</za-panel>
<za-panel>
<za-panel-header title="平铺日期选择器 DatePickerView"/>
<za-panel-body>
<za-date-picker-view
title="选择年份"
placeholder="请选择年份"
mode='datetime'
min="2018-01-13"
max="2090-11-27"
:defaultValue="v6"
@change='handleChange'/>
</za-panel-body>
</za-panel>
</div>
</main>
</Container>
</template>

<script>
import Container from '../common/Container.vue';
import PageHeader from '../common/PageHeader.vue';
import PageFooter from '../common/PageFooter.vue';
export default {
components: {
Container,
PageHeader,
PageFooter,
},
data() {
return {
visible1: false,
visible2: false,
visible3: false,
visible4: false,
visible5: false,
v1:'',
v2:'',
v3:'',
v4:'',
v5:'2008-01-10',
v6:'2018-12-24 11:23',
minuteStep: 15,
}
},
methods: {
handleOk(v){
console.log('it may still scrolling when ok is clicked. so ues v-model or @change instead')
console.log(v);
this.$zaToast(v.toString())
},
handleChange(v){
console.log(v);
},
handleCancel(event){
console.log('cancelled');
},
displayGenerator(selected) {
return selected.map(item => item.name).join('/')
}
},
};
</script>
5 changes: 4 additions & 1 deletion example/components/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@
<router-link to="input" tag='div' style='width:100%'>文本框 Input</router-link>
</za-cell>
<za-cell hasArrow @click="$router.push('/picker')">
选择器 Picker
选择器 Picker & Select
</za-cell>
<za-cell hasArrow @click="$router.push('/datepicker')">
日期选择器 DatePicker & DateSelect
</za-cell>
<za-cell hasArrow @click="$router.push('/calendar')">
日历 Calendar
Expand Down
Loading

0 comments on commit c0625db

Please sign in to comment.