markdown.config.js 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. /**
  2. * markdown配置
  3. */
  4. import {getAppConfigs} from '@/config/index.js'
  5. import HaloTokenConfig from '@/config/uhalo.config.js'
  6. import utils from '@/utils/index.js'
  7. export default {
  8. domain: HaloTokenConfig.BASE_API,
  9. tagStyle: {
  10. table: `
  11. table-layout: fixed;
  12. border-collapse:collapse;
  13. margin-bottom: 18px;
  14. overflow: hidden;
  15. font-size: 13px;
  16. color: var(--routine);
  17. background: #f2f6fc;
  18. border: 1px solid #dcdcdc;
  19. border-radius: 4px;
  20. `,
  21. th: `
  22. padding: 8px;
  23. border-right: 1px solid var(--classE);
  24. border-bottom: 1px solid var(--classE);
  25. `,
  26. td: `
  27. padding: 8px;
  28. border-right: 1px solid var(--classE);
  29. border-bottom: 1px solid var(--classE);
  30. `,
  31. blockquote: `
  32. padding: 8px 15px;
  33. color: #606266;
  34. background: #f2f6fc;
  35. border-left: 5px solid #50bfff;
  36. border-radius: 4px;
  37. line-height: 26px;
  38. margin-bottom: 18px;
  39. `,
  40. ul: 'padding-left: 15px;line-height: 1.85;',
  41. ol: 'padding-left: 15px;line-height: 1.85;',
  42. li: 'margin-bottom: 12px;line-height: 1.85;',
  43. h1: `
  44. margin: 30px 0 20px;
  45. color: var(--main);
  46. line-height: 24px;
  47. position: relative;
  48. font-size:1.2em;
  49. `,
  50. h2: `
  51. color: var(--main);
  52. line-height: 24px;
  53. position: relative;
  54. margin: 22px 0 16px;
  55. font-size: 1.16em;
  56. `,
  57. h3: `
  58. color: var(--main);
  59. line-height: 24px;
  60. position: relative;
  61. margin: 26px 0 18px;
  62. font-size: 1.14em;
  63. `,
  64. h4: `
  65. color: var(--main);
  66. line-height: 24px;
  67. margin-bottom: 18px;
  68. position: relative;
  69. font-size: 1.12em;
  70. `,
  71. h5: `
  72. color: var(--main);
  73. line-height: 24px;
  74. margin-bottom: 14px;
  75. position: relative;
  76. font-size: 1.1em;
  77. `,
  78. h6: `
  79. color: #303133;
  80. line-height: 24px;
  81. margin-bottom: 14px;
  82. position: relative;
  83. font-size: 14px;
  84. `,
  85. p: `
  86. line-height: 1.65;
  87. margin-bottom: 14px;
  88. font-size: 14px;
  89. `,
  90. 'code': ` `,
  91. strong: 'font-weight: 700;color: rgb(248, 57, 41);',
  92. video: 'width: 100%',
  93. },
  94. containStyle: 'font-family: Optima-Regular, Optima, PingFangSC-light, PingFangTC-light, "PingFang SC", Cambria, Cochin, Georgia, Times, "Times New Roman", serif;padding:12px;font-size: 14px;color: #606266;word-spacing: 0.8px;letter-spacing: 0.8px;border-radius: 6px;background-color:#FFFFFF;',
  95. loadingGif: utils.checkImageUrl(getAppConfigs().imagesConfig.loadingGifUrl),
  96. emptyGif: utils.checkImageUrl(getAppConfigs().imagesConfig.loadingEmptyUrl),
  97. }