• vue 引入通用 css


    1、在入口 js 文件 main.js 中引入,一些公共的样式文件,可以在这里引入。

    import Vue from 'vue'
    import App from './App' // 引入App这个组件
    import router from './router' /* 引入路由配置 */
    import axios from 'axios'
    import '../static/css/global.css' /*引入公共样式*/

    2、在 index.html 中引入,这个不说了;

    3、在 app.vue 中引入,但是这样引入有一个问题,就是在 index.html 的 HEADH 上会多出一个空的<style></style>

    <template>
      <div id="app">
        <router-view/>
      </div>
    </template>
    
    <script>
    export default {
      name: 'app'
    }
    </script>
    
    <style>
      @import './../static/css/global.css'; /*引入公共样式*/
    
    </style>

    转载:

    vue 引入公共css文件

  • 相关阅读:
    各种小知识
    基础技能
    st表
    有理数取余
    FFT加速高精度乘法
    unique
    离散化
    线段树复杂度分析
    楼房重建
    电脑装系统常用方法
  • 原文地址:https://www.cnblogs.com/xianshenglu/p/8849063.html
Copyright © 2020-2023  润新知