fa.style.mixin.js 910 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. module.exports = {
  2. computed: {
  3. cmsTitleStyle() {
  4. return val => {
  5. let style = {};
  6. if (val && val.includes('b')) {
  7. style.fontWeight = 'bold';
  8. }
  9. if (val && val.includes('#')) {
  10. style.color = val.replace('b', '').replace('|', '');
  11. }
  12. return style;
  13. }
  14. },
  15. theme() {
  16. if (this.vuex_theme.value) {
  17. return this.vuex_theme.value;
  18. }
  19. return {};
  20. },
  21. lightColor() {
  22. let color = '#f5f5f5';
  23. if (this.vuex_theme.value) {
  24. let theme = this.vuex_theme.value;
  25. let colorArr = this.$u.colorGradient(theme.bgColor, theme.color, 10);
  26. color = colorArr[9] || '#f5f5f5';
  27. }
  28. return color;
  29. },
  30. faBorderColor() {
  31. let color = '#f5f5f5';
  32. if (this.vuex_theme.value) {
  33. let theme = this.vuex_theme.value;
  34. let colorArr = this.$u.colorGradient(theme.bgColor, theme.color, 10);
  35. color = colorArr[5] || '#f5f5f5';
  36. }
  37. return color;
  38. },
  39. },
  40. }