- 博客(8)
- 收藏
- 关注
原创 vue组件传值的三种方式
一:父组件给子组件传值1:这是父组件页面把actionNum数组内容传递给子页面,这里由于父组件加载的原因我们使用v-if<template> <div class="home"> <p @click="getMessage">点我把数据传递给子组件</p> <child-view v-if="showChild" v-bind:transmit="actionNum"></child-...
2022-03-14 16:54:23
1885
原创 vue中的关于返回二进制图片的处理
前端的请求接口:$get("_api/file/download/singleFileInfo/"+this.fildId).then((res) =>{//发布文章列表console.log("=====",res)});});后端传过来的数据格式这时候直接用元素img里面的src属性解决:<img class="detailImg" :src="'_api/file/download/singleFileInfo/' +fildId">fildId放
2022-01-22 20:04:14
772
原创 vue中router-view的简单使用
路由配置:{ path: '/adminDatabase',//管理端--其他资源配置--数据库管理 name: 'adminDatabase', component: () => import('@/components/manage/database/index'), redirect:'/tableData', children: [ { path: '/tableData',//管理端--其他资源配置--新增数据库 .
2022-01-15 13:42:35
720
原创 vue鼠标右击事件
在模板中:<li v-for="(item,index) in columnList" :key="index" @contextmenu.prevent="rightClick"><router-link :to="item.path">{{item.name}}</router-link></li>在script中:methods:{ rightClick(){ console...
2022-01-15 13:11:20
493
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人