文章分类 - vue 相关
摘要:vue 首次赋值不触发 :{ // 评论提到的首次加载 数组触发 'date':{ immediate: true, // immediate选项可以开启首次赋值监听 handler(newVal, oldVal) { console.log(newVal, oldVal) console.log(
阅读全文
摘要:vue怎样修改标题 <%= htmlWebpackPlugin.options.title %> pages: { index: { // page 的入口 entry: 'src/index/main.js', // 模板来源 template: 'public/index.html', // 在
阅读全文
摘要:beforeEnter: (to, from, next) => { const name = to.params.name if (name && name !== 'undefined') { next() } else { next({ path: '/Login/userLogin' })
阅读全文
摘要:vue3.0 ts 初始模板 <template> <!--Vue2中的html模板中必须要有一对根标签,Vue3组件的html模板中可以没有根标签--> <img alt="Vue logo" src="./assets/logo.png"> <hello-world msg="Welcome t
阅读全文
摘要:安装 npm install --save qrcode 引入 import QRCode from 'qrcode' ##使用 let opts = { errorCorrectionLevel: "H",//容错级别 type: "image/png",//生成的二维码类型 quality: 0
阅读全文
摘要:#设置打包路径 publicPath: '/' 自定义组件 v-model v-bind只能实现单向绑定 v-model(v-bind+触发的input事件)实现双向绑定
阅读全文
摘要:#2、作用域插槽 作用域插槽可以理解为带数据的插槽,因为作用域的限制,子组件在使用的过程中没法访问父组件的值, 修改一下组件,将 user 作为元素的一个 attribute 绑定上去: <span> <slot v-bind:user="user"> {{ user.lastName }} </s
阅读全文
摘要:https://www.cnblogs.com/yuanchao-blog/p/10847417.html https://developer.mozilla.org/zh-CN/docs/Web/API/DocumentFragment #DocumentFragment vue 鼠标事件 @cl
阅读全文
摘要:批量引入当前文件夹下JS 文件 const modulesFiles = require.context("./", true, /\.js$/); // you do not need `import app from './modules/app'` // it will auto requir
阅读全文
摘要:vue 中防抖和节流 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport"
阅读全文