markdown.config.js 2.3 KB

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