feat: add tests && fix bugs

This commit is contained in:
jiangruowei
2017-04-06 15:11:29 +08:00
parent a85c3c2695
commit a32142c723
9 changed files with 216 additions and 46 deletions

View File

@@ -50,14 +50,14 @@ export default {
type: {
type: String,
default: 'text',
validate(value) {
validator(value) {
return TOAST_TYPES.indexOf(value) > -1;
}
},
message: {
type: String,
default: '',
validate(value) {
validator(value) {
if (this.type === 'success' || this.type === 'fail') {
return value.length <= 16;
}