vue基础操作

1、安装插件
npm install --save ***

2、卸载插件
npm uninstall ***

3.清除缓存
npm clean cache
4.自动整理
npm run lint
5.打包
npm run build

eslint

1.跳过某段代码
/* eslint-disable /
111
/
eslint-enable */
2.跳过下行代码
// eslint-disable-next-line

严格模式

.eslintrc.js文件
rules: {
    'semi':'off', // 关闭分好检查
    'comma-dangle':'off' // 关闭都逗号检查
  }

反向代理

module.exports = {
    devServer: {
      proxy: {
        '/ajax': {      // '*'指所有请求,携带ajax的请求拦截下来
          target: '**********',// 代理到那此端口
          changeOrigin: true
        },
        '/+++': {	// 			/+++/引用
          target: '*************',
          changeOrigin: true
        }
      }
    }
  }
Vue路由中component || components

component可写为对象形式components

import Film from '@/views/home'
// 引入主页面,之后可以直接运用components中'../views/****'引入
// 引用通用组件
import Tabbar from '@/components/Tabbar.vue'
  components: {
      default: () => import(/* webpackChunkName: "about" */ '../views/****'),
      foot: Tabbar	// 引用底部导航不引用则不添加,APP.vue渲染router-view加name=“key”属性;例:<router-view name="foot"></router-view>
    }
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值