Skip to content

Commit

Permalink
Release 0.2.4
Browse files Browse the repository at this point in the history
  • Loading branch information
adecrown committed Feb 16, 2020
1 parent 1a3b19f commit 705f325
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 24 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"name": "adecrown",
"url": "http://adecrown.com"
},
"version": "0.2.3",
"version": "0.2.4",
"private": false,
"scripts": {
"serve": "vue-cli-service serve",
Expand Down
8 changes: 4 additions & 4 deletions src/components/Whoosh/Card.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,13 +82,13 @@ export default class Card extends Vue {
}
switch (this.content.status) {
case status.success:
return "green";
return "#4caf50ad";
case status.warning:
return "blue";
return "#00bcd4b0";
case status.error:
return "red";
return "#ff0000";
default:
return "yellow";
return "#f7a104b5";
}
}
Expand Down
33 changes: 15 additions & 18 deletions src/components/Whoosh/Whoosh.vue
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Card from './Card.vue'
import { events } from './events'
import { generateId } from './Util'
import {DEFAULT_WIDTH,DEFAULT_HEIGHT} from './Constant'
import { Component, Prop, Vue, Watch, Emit } from "vue-property-decorator";
import { Component, Prop, Vue } from "vue-property-decorator";
import {CardContent} from '../types/index' ;
@Component({
components: {
Expand All @@ -33,9 +33,9 @@ import {CardContent} from '../types/index' ;
})
export default class Whoosh extends Vue{
show = false;
whooshList: Array<CardContent> = [];
id = 0;
show = false;
whooshList: Array<CardContent> = [];
id = 0;
@Prop({type:Number, required: false,default:5 }) private duration!: number;
@Prop({ type:Boolean, default: false }) private closeOnClick!: boolean ;
Expand All @@ -47,18 +47,18 @@ export default class Whoosh extends Vue{
events.$on('startWhoosh', this.makeAWhooshList);
}
makeAWhooshList(event: CardContent) {
event.id = generateId();
this.whooshList.push(event)
}
removeCard(event: CardContent) {
this.whooshList = this.whooshList.filter(x => x.id !== event.id)
}
actionOnClick(data: CardContent) {
if (this.closeOnClick) {
this.removeCard(data)
}
makeAWhooshList(event: CardContent) {
event.id = generateId();
this.whooshList.push(event)
}
removeCard(event: CardContent) {
this.whooshList = this.whooshList.filter(x => x.id !== event.id)
}
actionOnClick(data: CardContent) {
if (this.closeOnClick) {
this.removeCard(data)
}
}
}
</script>
Expand All @@ -75,9 +75,6 @@ export default class Whoosh extends Vue{
opacity: 1;
transform: scale(1);
}
.card-leave-active {
/*position: absolute;*/
}
.card-move {
opacity: 1;
transition: all 0.5s;
Expand Down

0 comments on commit 705f325

Please sign in to comment.