随笔分类 -  vue

上一页 1 2
vue常用函数
摘要:this.$router.back(); //回退上一页面 阅读全文
posted @ 2023-03-10 18:11 鲤斌 阅读(24) 评论(0) 推荐(0)
vue星星评分
摘要:<template> <div> <div class="xx"> <div v-for="(i, index) in list" :key="index" class="xxitem"> <img :src="xing > index ? stara : starb" width="100%" : 阅读全文
posted @ 2023-03-10 14:23 鲤斌 阅读(72) 评论(0) 推荐(0)
vue 遍历的汉字显示不同的颜色
摘要:<template> <div> <div class="stars"> <span v-for="(star, index) in stars" :key="index" :class="starClass(index)" >33 </span> </div> </div> </template> 阅读全文
posted @ 2023-03-10 13:22 鲤斌 阅读(190) 评论(0) 推荐(0)
vue获取公网ip
摘要:<template> <div> <div>Your Public IP: {{publicIP}}</div> </div> </template> <script> export default { data() { return { publicIP: '' }; }, created() { 阅读全文
posted @ 2023-03-09 23:38 鲤斌 阅读(151) 评论(0) 推荐(0)
关于图片成为圆形的方法
摘要:1,在图片外的盒子中加入 border-radius: 50%; overflow: hidden; 2,(1)在图片外的盒子中加入 border-radius: 50%; (2)在图片的css中加入 border-radius: 50%; 阅读全文
posted @ 2023-03-08 10:52 鲤斌 阅读(391) 评论(0) 推荐(0)
position的属性值
摘要:(fixed的父元素永远是浏览器窗口,不会根据页面滚动而改变位置;absolute的父元素是可以设置的,他会永远跟随父元素的位置的改变而改变。) 1、position: relative;相对定位 不影响元素本身特性(无论区块元素还是内联元素会保留其原本特性) 不会使元素脱离文档流(元素原本位置会被 阅读全文
posted @ 2023-03-08 10:26 鲤斌 阅读(203) 评论(0) 推荐(0)
vue遮罩层
摘要:<template> <div class="hello"> <button @click="toggleModal">打开Modal对话框</button> <div class="modal-backdrop" v-if="showModal"> <div class="modal"> <div 阅读全文
posted @ 2023-03-07 23:21 鲤斌 阅读(126) 评论(0) 推荐(0)
elementui中对样式的修改标签
摘要:/deep/ .el-drawer.rtl { -webkit-animation: rtl-drawer-out .3s; animation: rtl-drawer-out .3s; background:rgba(253, 253, 252, 0.263); right: 0; } 报错不用管 阅读全文
posted @ 2023-03-02 22:29 鲤斌 阅读(66) 评论(0) 推荐(0)
flex布局
摘要:代码<template> <div> <div class="right3box" :style="{width: 500+'px', height:132+'px',top:200+'px',marginLeft:70+'px'}" > <div class="text3" style="flex 阅读全文
posted @ 2023-03-02 15:46 鲤斌 阅读(21) 评论(0) 推荐(0)
vue横向滑动
摘要:代码 <template> <div> <!-- 左侧的滑动模块 --> <div class="scroll-box" :style="{width: 1106*screenWidth/1920+'px', height:336.52*screeHeight/1080+'px',top:130*s 阅读全文
posted @ 2023-03-02 11:47 鲤斌 阅读(85) 评论(0) 推荐(0)
vue 纵向滑动模块
摘要:代码 <template> <div> <!-- 左侧的滑动模块 --> <div class="scroll-box" :style="{width: 410.7*screenWidth/1920+'px', height:730*screeHeight/1080+'px',top:130*scr 阅读全文
posted @ 2023-03-02 11:41 鲤斌 阅读(84) 评论(0) 推荐(0)
vue路由守卫并向后台发送token
摘要:vue代码 //全局路由首位;当路由发生异常首先执行的方法 router.beforeEach((to, from, next) => { //是否被认证 var isAuthenticated = false; //1.从localStorage获取用户的token 是否为空 this.token 阅读全文
posted @ 2023-02-26 10:40 鲤斌 阅读(97) 评论(0) 推荐(0)
vue 缓存后台获取的token
摘要:代码 localStorage.setItem("token",res.data.data);// 用localStorage缓存token值 阅读全文
posted @ 2023-02-26 00:52 鲤斌 阅读(43) 评论(0) 推荐(0)
vue点击按钮后倒计时
摘要:vue代码 <template> <div> <!-- 点击按钮后倒计时 --> <el-button @click="signUp_asd" type="success" :disabled="!show"> 获取验证码 <span v-show="!show" class="count">({{ 阅读全文
posted @ 2023-02-26 00:44 鲤斌 阅读(239) 评论(0) 推荐(0)
vue中获取网址上的参数
摘要:vue代码 <template> <div> <h4>http://localhost:8080/#/test?levels=level1-1</h4> <h4>获取levels1-1</h4> levels= {{levels}} </div> </template> <script> expor 阅读全文
posted @ 2023-02-26 00:34 鲤斌 阅读(79) 评论(0) 推荐(0)
vue遍历数据
摘要:vue代码 <template> <div class="index"> <!-- 遍历 --> <div v-for="(item, index) in catalogue" :key="index"> <!-- 页面跳转 --> <!-- <router-link :to="{path:'/bo 阅读全文
posted @ 2023-02-26 00:25 鲤斌 阅读(37) 评论(0) 推荐(0)
vue图片热区map-area定位(适应屏幕)
摘要:vue代码 <template> <div> {{screenWidth}} {{screeHeight}} <div v-for="(item, index) in book" :key="index"> <!-- 当从后台获取数据的时候可以进行替换 --> <!-- <img class="im 阅读全文
posted @ 2023-02-26 00:05 鲤斌 阅读(1464) 评论(1) 推荐(1)
vue获取屏幕长宽
摘要:vue代码 <template> <div>寬:{{screenWidth}} 高:{{screeHeight}}</div> </template> <script> export default { data() { return { screenWidth: 1000, //宽屏幕尺寸 scr 阅读全文
posted @ 2023-02-25 23:23 鲤斌 阅读(501) 评论(0) 推荐(0)
vue前端调用百度定位API进行定位
摘要:首先进入 百度地图API 申请百度定位 使用的域名必须填写,否则无法定位 vue前端代码 <template> <div>城市:{{city}}</div> </template> <script> import axios from "axios"; import { MP } from "../ 阅读全文
posted @ 2023-02-25 19:59 鲤斌 阅读(254) 评论(0) 推荐(0)
vue前端调用有道API进行翻译
摘要:进入有道API ,注册用户信息并拿到有道翻译的应用ID和应用密钥 将ID与秘钥放入代码中 vue代码 <template> <div> <div style="height: 300px; width: 100%;"> <div style="background: white;"> <p styl 阅读全文
posted @ 2023-02-25 13:36 鲤斌 阅读(896) 评论(0) 推荐(0)

上一页 1 2