摘要: // 加法计算 const a1 = 2 + 2 // 4 let m1 = 5, m2 = '5' let n1 = 11, n2 = '11' let k1 = 70, k2 = '70' m1++ // 6 (等价于 m1 = m1 + 1) m1++ // 6 n1 += 1 // 12 ( 阅读全文
posted @ 2023-09-22 10:22 YINGYAN 阅读(14) 评论(0) 推荐(0) 编辑
摘要: 示例项目 <template> <div ref="wrapRef" class="screen"> <div ref="screenRef" class="screen-inner"> <div class="screen-header">{{ title }}</div> <div class= 阅读全文
posted @ 2023-07-11 10:42 YINGYAN 阅读(34) 评论(0) 推荐(0) 编辑
摘要: <template> <div v-if="show" class="command-code" :style="{ color: color }"> <div class="command-code-box" ref="boxRef" :style="{ width: contentWidth } 阅读全文
posted @ 2023-01-30 17:27 YINGYAN 阅读(10) 评论(0) 推荐(0) 编辑
摘要: 1. 文字溢出省略号 1.1 单行文字溢出: overflow: hidden; // 溢出隐藏 text-overflow: ellipsis; // 溢出用省略号显示 white-space: nowrap; // 规定段落中的文本不进行换行 1.2 多行文字溢出: overflow: hidd 阅读全文
posted @ 2022-11-23 09:20 YINGYAN 阅读(28) 评论(0) 推荐(0) 编辑
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-10-26 15:25 YINGYAN 阅读(54) 评论(0) 推荐(0) 编辑
摘要: 1、安装 lottie-web 包 npm i lottie-web -S 2、lottie动画json问价放入项目 3、在使用 lottie 动画的 .vue文件中引入 json文件及 lottie 包 import lottie from 'lottie-web' import * as anD 阅读全文
posted @ 2022-07-05 11:11 YINGYAN 阅读(1057) 评论(0) 推荐(0) 编辑
摘要: 1、在 npm 官网注册账号(一定要验证邮箱地址) 2、创建目录 helper-vue-ts,进入目录 3、初始化 npm init,并指定入口文件 ./dist/helper-vue-ts.js 4、执行 tsc --init 生成 tsconfig.json 配置文件(需全局安装 typescr 阅读全文
posted @ 2022-06-09 16:00 YINGYAN 阅读(652) 评论(0) 推荐(0) 编辑
摘要: git rm -r --cached . git add . git commit -m 'update .gitignore' 阅读全文
posted @ 2022-06-06 14:32 YINGYAN 阅读(179) 评论(0) 推荐(0) 编辑
摘要: 使用scrollIntoView方法,添加滚动行为。设置"smooth "属性实现平滑的滚动动画。 滚动到顶部 const scrollToTop = scrollEle => scrollEle.scrollIntoView({ behavior: "smooth", block: "start" 阅读全文
posted @ 2022-03-04 11:27 YINGYAN 阅读(705) 评论(0) 推荐(0) 编辑
摘要: vw、vh、vmin、vmax是相对单位。相对于视窗(viewport)的大小,单位类似百分百。 视窗:浏览器实际应用内容区域。 vw:视窗宽度百分比; vh:视窗高度百分比; vmin:vw和vh中较小的值; vmax:vw和vh中较大的值; vmin、vmax应用:移动端开发时,可让横屏和竖屏下 阅读全文
posted @ 2022-02-13 12:31 YINGYAN 阅读(528) 评论(0) 推荐(0) 编辑