摘要:
混入 (mixins): 是分发 Vue 组件中可复用功能的一种方式。mixins混入对象可以包含组件的任意选项。当组件使用mixins混入对象时,所有混入对象的选项将被混入该组件本身的选项。 使用:新建mixins文件夹,再新建info.js //mixins->info.js export de 阅读全文
posted @ 2021-06-23 16:04
chicidol
阅读(130)
评论(0)
推荐(0)
摘要:
//vue.config.js const path = require('path') const resolve = (dir) => path.join(__dirname, dir) module.exports = { publicPath: './',//基本路径 assetsDir: 阅读全文
posted @ 2021-06-21 14:47
chicidol
阅读(2544)
评论(0)
推荐(0)
摘要:
nrm是一个npm源管理工具,使用它可以快速切换npm源。 主要可以用于切换npm源为taobao镜像, 由于npm是国外的,安装依赖时速度比较慢,可以切换为taobao镜像,安装速度就会比较快,也不会出错 安装:npm install -g nrm 安装完后使用nrm -V查看版本 如果报错: i 阅读全文
posted @ 2021-06-21 11:11
chicidol
阅读(209)
评论(0)
推荐(0)
摘要:
首先安装axios npm install axios --save 在src下新建utils文件夹 再新建request.js文件 //utils->request.js import axios from 'axios' const requests = axios.create({ baseU 阅读全文
posted @ 2021-06-18 17:17
chicidol
阅读(37)
评论(0)
推荐(0)
摘要:
首先安装vue-router npm install vue-router --save 在src下新建router文件夹 再新建index.js文件 //router->index.js import Vue from 'vue' import VueRouter from 'vue-router 阅读全文
posted @ 2021-06-18 16:27
chicidol
阅读(70)
评论(0)
推荐(0)
摘要:
首先安装vuex npm install vuex --save 在src下新建store文件夹 再新建index.js、state.js、getters.js、mutations.js、mutations-types.js、actions.js文件 //index.js import Vue fr 阅读全文
posted @ 2021-06-18 15:30
chicidol
阅读(31)
评论(0)
推荐(0)
摘要:
安装node.js 查看版本node -v 安装vue3.0版本之前需要先把vue-cli升级到4.0版本, 如果之前安装过vue-cli需要把2.0相关的卸载之后重新安装,npm uni -g vue-cli, 如果没有安装过不需要卸载可以直接安装,npm i -g @vue/cli 查看版本vu 阅读全文
posted @ 2021-06-18 14:52
chicidol
阅读(51)
评论(0)
推荐(0)
摘要:
//router.js { path: '/oppo-music', component: () => import('@/views/OppoMusic.vue'), meta: { title: 'OPPO音乐', keepAlive: true, }, name: 'OppoMusic', } 阅读全文
posted @ 2021-06-18 14:29
chicidol
阅读(258)
评论(0)
推荐(0)
摘要:
<audio ref="audio"></audio> import CryptoJS from "crypto-js"; import Hls from 'hls.js'; methods:{ getHls (url) { if (Hls.isSupported()) { var hls = ne 阅读全文
posted @ 2021-06-18 13:56
chicidol
阅读(189)
评论(0)
推荐(0)
摘要:
<div :style="{ color: activeColor, fontSize: fontSize + 'px' }"></div> data () { return { //初始样式 activeColor:'red', fontSize :30, }; }, //改变样式 this.ac 阅读全文
posted @ 2021-06-18 13:44
chicidol
阅读(235)
评论(0)
推荐(0)
浙公网安备 33010602011771号