项目原始demo,不改动
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

37 lines
766 B

  1. // Directives
  2. import ripple from '../../directives/ripple'; // Types
  3. import Vue from 'vue';
  4. export default Vue.extend({
  5. name: 'rippleable',
  6. directives: {
  7. ripple
  8. },
  9. props: {
  10. ripple: {
  11. type: [Boolean, Object],
  12. default: true
  13. }
  14. },
  15. methods: {
  16. genRipple(data = {}) {
  17. if (!this.ripple) return null;
  18. data.staticClass = 'v-input--selection-controls__ripple';
  19. data.directives = data.directives || [];
  20. data.directives.push({
  21. name: 'ripple',
  22. value: {
  23. center: true
  24. }
  25. });
  26. data.on = Object.assign({
  27. click: this.onChange
  28. }, this.$listeners);
  29. return this.$createElement('div', data);
  30. },
  31. onChange() {}
  32. }
  33. });
  34. //# sourceMappingURL=index.js.map