Skip to content
This repository has been archived by the owner on May 9, 2019. It is now read-only.

Commit

Permalink
Merge pull request #4 from dayang/master
Browse files Browse the repository at this point in the history
修复显示问题, 更新readme错误 #3
  • Loading branch information
zhaokuohaha authored Dec 9, 2017
2 parents b1a2192 + 258902d commit bacd9b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ npm run build
|---|---|---|---|
|model|Array (multi = true) , Date (multi = false)|- |the model of date picker|
|multi| Boolean| true |use multi select |
|display| Array<String>|['日', '一', '二', '三', '四', '五', '六','年', '月', '取消', '确定']| the order of array must strict|
|disp| Array<String>|['日', '一', '二', '三', '四', '五', '六','年', '月', '取消', '确定']| the order of array must strict|
|

## Usage
Expand Down
3 changes: 2 additions & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
<div id="app">
<img src="./assets/logo.png" alt="" srcset="">
<div class="wrapper">
<m-date-picker v-model="date" :multi="true"></m-date-picker>
<m-date-picker v-model="date" :multi="true"
:disp="['Sun', 'Mon', 'Tus', 'Wen', 'Thu', 'Fri', 'Sat','Y', 'M', 'Cancel', 'OK']" ></m-date-picker>
<div v-for="(item, index) in date" :key="index" class="sel-dates">
{{item}}
</div>
Expand Down
6 changes: 3 additions & 3 deletions src/lib/multiDatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default {
type: Array|String| Date,
default: []
},
displays: {
disp: {
type: Array,
default: function (){ return ['日', '一', '二', '三', '四', '五', '六','年', '月', '取消', '确定']}
},
Expand All @@ -40,9 +40,9 @@ export default {
},
selected: function () { return this.value },
display: function () {
var d = this.displays
var d = this.disp
return {
days: d.slice(0,6),
days: d.slice(0,7),
year: d[7],
month: d[8],
cancel: d[9],
Expand Down

0 comments on commit bacd9b5

Please sign in to comment.