Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.48 KB | None | 0 0
  1. props: {
  2. alertType: {
  3. validator: function (value) {
  4. return [ "success", "info", "warning", "danger" ].indexOf(value) >= 0;
  5. },
  6. default: "danger"
  7. },
  8. // Some more things
  9. computed: {
  10. classes: { //Compute the correct classes for the alert type
  11. var classesObj ={
  12. 'alert-dismissible': this.dismissable
  13. };
  14. classesObj["alert-"+this.alertType]=true; //Problem if invalid
  15. return classesObj;
  16. }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement