摘要: vue3项目中如何配置路由 1、下载vue-router,在路由文件中引入相关依赖 import{createRouter , createWebHashHistory} from "vue-router"; 2、创建路由信息对象数组 const routes=[{path: ' /bar ' ,c 阅读全文
posted @ 2022-05-11 16:54 李小聪明 阅读(102) 评论(0) 推荐(0)
摘要: 搜索页面 api 搜索页面的封装接口api/index.js //搜索接口//模糊查询// /biz/ queryCommodityByNameexport function getSousuo(name) { return axios.get(`${baseUrl}/biz/queryCommod 阅读全文
posted @ 2022-05-11 15:53 李小聪明 阅读(675) 评论(0) 推荐(0)
摘要: 热门商品 热门商品数据 api 获取热门商品的封装接口api/index.js //首页热门商品列表接口// /biz/ queryAllCommoditexport function getDetail(){ return axios.get(`${baseUrl}/biz/queryAllCom 阅读全文
posted @ 2022-05-11 15:52 李小聪明 阅读(400) 评论(0) 推荐(0)
摘要: 构建歌曲详情页面 1.playController.vue传参 <playMusicv :play="play" :paused="paused" :playDetail="playlist[playCurrentIndex]" v-show="show" @myback="show=!show"> 阅读全文
posted @ 2022-05-11 15:49 李小聪明 阅读(199) 评论(0) 推荐(0)
摘要: 点击底下的歌曲播放头像,会显示歌单详情 1.新建playMusic组件 2.在playcontroller引入组件,注册及使用 3.默认歌单详情不显示 <playMusic v-show="show"></playMusic> data() { return { paused: true, show 阅读全文
posted @ 2022-05-11 15:48 李小聪明 阅读(176) 评论(0) 推荐(0)
摘要: ## 完整的播放流程 playController.vue ```vue <div class="right"> <svg v-if="paused" class="icon" aria-hidden="true" @click="play"> <!--暂停按钮--> <use xlink:href 阅读全文
posted @ 2022-05-11 15:47 李小聪明 阅读(449) 评论(0) 推荐(0)
摘要: 实现动态效果:底下音乐播放的什么图片就对应显示该歌单的图片 store/index.js <div class="left"> <img :src="playlist[playCurrentIndex].al.picUrl" alt=""> <div class="content">{{ playl 阅读全文
posted @ 2022-05-11 15:46 李小聪明 阅读(49) 评论(0) 推荐(0)
摘要: 实现播放音乐功能 1.在compontents下创建playcontroller.vue <template> <div class="playController"> <div class="left"> <img src="https://p1.music.126.net/R-Eg1aZcut8 阅读全文
posted @ 2022-05-11 15:44 李小聪明 阅读(359) 评论(0) 推荐(0)
摘要: vue基础 数据的页面展示{{}} ,v-once,v-html 数据绑定属性v-bind,简写用: 事件调用:v-on,简写:@ V-if与v-show,异同 v-for 用in和of都一样,循环数组的时候,可以有两个参数,循环对象时,可以有三个参数 style与class绑定 计算属性 表单双向 阅读全文
posted @ 2022-05-11 15:34 李小聪明 阅读(27) 评论(0) 推荐(0)
摘要: 开发背景 开发准备 开发步骤 创建一个空文件夹,取名students-system 方式一:右键新建 方式二:命令行新建(提倡) ##windows系统md students-system##mac/linuxmkdir students-system 初始化 npm init -y 执行结果:该文 阅读全文
posted @ 2022-05-11 15:30 李小聪明 阅读(136) 评论(0) 推荐(0)