BasicSrc.js 432 B

1234567891011121314151617181920212223
  1. export default {
  2. name: 'basic',
  3. computed: {
  4. headingClasses: function headingClasses () {
  5. return {
  6. red: this.isCrazy,
  7. blue: !this.isCrazy,
  8. shadow: this.isCrazy
  9. }
  10. }
  11. },
  12. data: function data () {
  13. return {
  14. msg: 'Welcome to Your Vue.js App',
  15. isCrazy: false
  16. }
  17. },
  18. methods: {
  19. toggleClass: function toggleClass () {
  20. this.isCrazy = !this.isCrazy
  21. }
  22. }
  23. }