nuxt.config.js 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. import env from './static/domain';
  2. export default {
  3. env:{
  4. ...env
  5. },
  6. // Global page headers: https://go.nuxtjs.dev/config-head
  7. head: {
  8. title: '信息看板',
  9. htmlAttrs: {
  10. lang: 'en'
  11. },
  12. meta: [
  13. { charset: 'utf-8' },
  14. { name: 'viewport', content: 'width=device-width, initial-scale=1' },
  15. { hid: 'description', name: 'description', content: '' },
  16. { name: 'format-detection', content: 'telephone=no' }
  17. ],
  18. link: [
  19. { rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
  20. ]
  21. },
  22. loading: {
  23. color: 'blue', // 进度条的颜色
  24. failedColor: 'red', // 页面加载失败时的颜色( 当 data 或 fetch 方法返回错误时)
  25. height: '2px', // 进度条的高度(在进度条元素的 style 属性上体现)
  26. throttle: 200, // 在 ms 中, 在显示进度条之前等待指定的时间。 用于防止条形闪烁
  27. duration: 5000, // 进度条的最大显示时长, 单位毫秒。 Nuxt.js 假设页面在该时长内加载完毕
  28. continuous: false, // 当加载时间超过duration时, 保持动画进度条
  29. css: true, // 设置为 false 以删除默认进度条样式( 并添加自己的样式)
  30. rtl: false // 从右到左设置进度条的方向
  31. },
  32. // Global CSS: https://go.nuxtjs.dev/config-css
  33. css: [
  34. 'element-ui/lib/theme-chalk/index.css',
  35. 'vant/lib/index.css',
  36. '~assets/index.scss',
  37. '~assets/iconfont.css',
  38. '~assets/main.css',
  39. '~assets/quill.core.css',
  40. '~assets/quill.bubble.css',
  41. '~assets/quill.snow.css'
  42. ],
  43. // Plugins to run before rendering page: https://go.nuxtjs.dev/config-plugins
  44. plugins: [
  45. { src: '~plugins/element-ui', ssr: true },
  46. { src: '~plugins/vue-vant', ssr: true },
  47. ],
  48. // Auto import components: https://go.nuxtjs.dev/config-components
  49. components: true,
  50. // Modules for dev and build (recommended): https://go.nuxtjs.dev/config-modules
  51. buildModules: [
  52. ],
  53. // Modules: https://go.nuxtjs.dev/config-modules
  54. modules: [
  55. ],
  56. // Build Configuration: https://go.nuxtjs.dev/config-build
  57. build: {
  58. transpile: [/^element-ui/],
  59. }
  60. }