会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
忙着可爱呀~
博客园
首页
新随笔
联系
订阅
管理
上一页
1
···
6
7
8
9
10
2022年9月16日
Vue 子组件更改父组件数据
摘要: 1、callback 回调方法触发更改 父组件: <Quick @callback="callback" /> method: { callback(params) { // 逻辑处理} } 子组件: changeKey() { this.$emit('callback', // 需要传递的参数)
阅读全文
posted @ 2022-09-16 11:06 忙着可爱呀~
阅读(297)
评论(0)
推荐(0)
2022年9月14日
Nuxt 三方js使用、自定义 js 挂载到 到 Vue 实例上
摘要: 1、Vue.use形式 1)、创建文件 plugins -> vant.js import Vue from 'vue' import Vant from 'vant' Vue.use(Vant) 2)、nuxt.config.js 内引入插件 2、Vue.prototype 形式 1)、创建文件
阅读全文
posted @ 2022-09-14 16:17 忙着可爱呀~
阅读(63)
评论(0)
推荐(0)
2022年8月27日
Nuxt cookie使用
摘要: 1、使用cookie的原因 nuxt是服务端渲染,不能获取到window、 localStorage等对象,故使用cookie进行存取数据 2、安装 npm i --save cookie-universal-nuxt 3、配置 nuxt.config.js modules: [ //有参数配置的
阅读全文
posted @ 2022-08-27 12:16 忙着可爱呀~
阅读(516)
评论(0)
推荐(0)
2022年8月23日
Nuxt asyncData异步数据
摘要: 使用 asyncData 的理由: 使用 asyncData,会在服务端渲染数据,搜索引擎可以直接获取文本内容,有利于SEO 1、编写 xx.vue-> asyncData asyncData(context) { return context.$api.home.getMock().then(re
阅读全文
posted @ 2022-08-23 19:36 忙着可爱呀~
阅读(148)
评论(0)
推荐(0)
Nuxt layouts默认布局
摘要: 默认布局: 1)、新建默认文件 layouts->default.vue 2)、编写内容文件(以index.vue为例) 3)、效果图 自定义布局: 1)、新建文件layouts->HCustom.vue 2)、编写内容文件(以index.vue为例) 3)、效果图
阅读全文
posted @ 2022-08-23 17:33 忙着可爱呀~
阅读(81)
评论(0)
推荐(0)
Nuxt router 自定义
摘要: 1、根目录下新建re-router.js /** * @description 自定义页面路由 * * 字段说明: * path:页面路径 * name:名称(大驼峰命名) * component:文件路径 **/ import path from 'path' const resolve = (p
阅读全文
posted @ 2022-08-23 17:33 忙着可爱呀~
阅读(27)
评论(0)
推荐(0)
2022年8月19日
nuxt 搭建
摘要: 1、安装 npx create-nuxt-app <project name项目名称>注:npm4.0版本已内置 npx,无需重新安装 npx安装过程中按需选择所需要的插件 2、运行项目 npm run dev 3、配置本地服务(看个人需求) >>>nuxt.config.js 文件内 server
阅读全文
posted @ 2022-08-19 09:55 忙着可爱呀~
阅读(74)
评论(0)
推荐(0)
2020年12月1日
Vue-Upload(图片/视频上传)
摘要: 封装代码: <!-- * @Descripttion:上传组件 --> <template> <div class='YxkUpload'> <div :class="[{ 'YxkUpload__slot': dataBind.isSlot}]"> <el-upload :before-uploa
阅读全文
posted @ 2020-12-01 10:00 忙着可爱呀~
阅读(227)
评论(0)
推荐(0)
上一页
1
···
6
7
8
9
10
公告