index.js 610 B

1234567891011121314151617181920212223242526
  1. define([
  2. 'moment',
  3. 'text!./index.html',
  4. 'css!./index.css'
  5. ], function(moment, html) {
  6. return {
  7. props: {
  8. evaluateList: {
  9. type: Array,
  10. default: function () {
  11. return [];
  12. }
  13. }
  14. },
  15. filters: {
  16. convertName: function (value) {
  17. return value.replace(/^(.).+(.)$/g, '$1**$2');
  18. },
  19. convertTime: function (value) {
  20. return moment(value).fromNow();
  21. }
  22. },
  23. methods: {},
  24. template: html
  25. };
  26. });