前端
全年无休的IT老兵
这个作者很懒,什么都没留下…
展开
-
vue3.0 无法显示 相对路径的图片
错误方式:<img src="../../assets/img/logo.png" class="logo-title" />正确方式:<img :src="logoUrl" class="logo-title" />import logoUrl from '../../assets/img/logo.png';data() { r...原创 2019-11-26 14:50:23 · 1481 阅读 · 1 评论 -
html 图片背景 自适应
.main-div { position: absolute; top: 0; left: 0; width: 100%; min-height: 100%; height: auto; overflow-y: auto; background: url("../../...原创 2019-10-31 19:23:36 · 128 阅读 · 0 评论 -
vue 轮询操作
创建一个弹出框<div> <el-dialog :visible.sync="loadingVisible" width="30%"> <i class="fa fa-spin fa-star"></i>...原创 2019-10-21 11:44:46 · 712 阅读 · 0 评论 -
vue报错:did you register the component correctly? ……make sure to provide the name option.
在使用vue导入组件时经常出现类似错误:主要检查几个地方确认是否有填写:1)组件是否有注册在script中需要注册组件export default { name: "test", components: { 组件名称 },}2)导入的组件名称是否与组件定义的名称一致组件vue文件中:组件.vueexport defaul...原创 2019-07-05 21:22:27 · 8139 阅读 · 3 评论 -
vue如何从一个页面点击按钮跳转到另外一个页面
目的: A页面 -- 点击按钮btn ---> B页面通过改写路由的方式实现:btn的click函数如下:btnClick() { const vm = this; vm.$route.push({name: '路由名称', params: { id: 10 }})}...原创 2019-07-05 21:27:46 · 35392 阅读 · 2 评论 -
vue父子页面间参数传递
vue父子页面间参数传递是通过prop 和 emit进行传递的1) 父页面参数向 子页面传递子页面代码:export default { name: 'child', props: ['data', 'index'] methods: { getParentParams() { // 使用传递的参数方式 const vm = this; ...原创 2019-07-05 21:44:27 · 4115 阅读 · 0 评论