Loading

随笔分类 -  Vue

摘要:1. 先根据用户名和密码,获取用户token,包括id,name, token const account = reactive({ name: localCache.getCache('name') ?? '', password: localCache.getCache('password') 阅读全文
posted @ 2021-12-06 17:43 顾诚的城 阅读(1109) 评论(0) 推荐(0)
摘要:1. gsap数字滚动插件 GSAP的全名是GreenSock Animation Platform,是一套脚本动画工具。 <template> <div class="number-roll">{{ showCounter }}</div> </template> <script> import 阅读全文
posted @ 2021-12-06 17:37 顾诚的城 阅读(3540) 评论(0) 推荐(3)
摘要:public 目录提供的是一个应急手段,通过绝对路径引用, 把图片放在public/img 中,并需要为你的 URL 配置 publicPath 前缀 publicPath: process.env.BASE_URL(注意:要放在 data 或者 mounted 下, computed 阶段获取不到 阅读全文
posted @ 2021-12-06 17:18 顾诚的城 阅读(184) 评论(0) 推荐(0)
摘要:/** 组件 A */ document.addEventListener('自定义事件', ev => console.log(ev)); // CustomEvent {isTrusted: false, detail: "我是 payload", type: "自定义事件", target: 阅读全文
posted @ 2021-12-06 16:08 顾诚的城 阅读(158) 评论(0) 推荐(0)
摘要:Vue2版本: computed: { watchAll() { const { a, b } from this return { a, b } } } watch: { watchAll(val) { console.log(val) // { a: ..., b: xxx } } } Vue3 阅读全文
posted @ 2021-12-06 15:14 顾诚的城 阅读(1878) 评论(0) 推荐(0)
摘要:Vue3项目搭建规范 一. 代码规范 1.1 集成editorconfig配置 EditorConfig有助于为不同IDE编辑器上维护一致的编码风格 安装插件:EditorConfig for VS Code 后会读取.editorconfig文件 # http://editorconfig.org 阅读全文
posted @ 2021-12-06 11:30 顾诚的城 阅读(878) 评论(0) 推荐(0)