摘要:
axios封装: 配置代理: axios封装: axios的二次封装: 请求拦截统一token处理: 引入: 使用: 导入: 响应拦截统一错误处理: 导入: main.js: login页面: 效果:请求: 我们要请求的是: 阅读全文
posted @ 2022-11-21 20:55
Cherishe
阅读(106)
评论(0)
推荐(0)
摘要:
接口说明: postman验证: 401:(没有携带token): 需要携带token进去~通过验证 postman: 阅读全文
posted @ 2022-11-21 20:20
Cherishe
阅读(28)
评论(0)
推荐(0)
摘要:
封装校验: 用户名匹配: 登录校验封装: 导入模块:(按需导入) 使用封装名称: 封装token:设置-获取-删除 导入token: 使用token: 阅读全文
posted @ 2022-11-21 20:08
Cherishe
阅读(54)
评论(0)
推荐(0)
摘要:
登录页在全局表单验证中获取ajax数据: 200证明接口数据请求成功: 数据请求成功后就可以利用状态码200:(登录成功:200)来存储用户信息,提示成功并跳转到首页 捕获异常: 效果: 优化rules: 正则插件:方便写正则(any-rule) 使用F1+输入校验的事物+回车 校验: 规则: 密码 阅读全文
posted @ 2022-11-21 19:26
Cherishe
阅读(23)
评论(0)
推荐(0)
摘要:
登录组件: src/components/Login.vue 基本的模板 + el-card + el-form el-card的改造: el-form改造: data中准备form的基本数据字段: 密码框: src/router 登录路由: 构建路由:进行搭配: 一进到页面重定向到登录页+别人想访 阅读全文
posted @ 2022-11-21 19:01
Cherishe
阅读(31)
评论(0)
推荐(0)
摘要:
src/router 路由懒加载: 路由异步组件: 阅读全文
posted @ 2022-11-21 18:22
Cherishe
阅读(18)
评论(0)
推荐(0)
摘要:
结构: 全局样式: 动态化: 声明动态下标: 上一张+1,下一张-1: 阅读全文
posted @ 2022-11-21 17:33
Cherishe
阅读(124)
评论(0)
推荐(0)
摘要:
冒泡概念 阻止冒泡 冒泡和没有冒泡 阅读全文
posted @ 2022-11-21 17:19
Cherishe
阅读(28)
评论(0)
推荐(0)
摘要:
 阅读全文
posted @ 2022-11-21 17:08
Cherishe
阅读(16)
评论(0)
推荐(0)
摘要:
v-bind:src 简写为:src 插值语法可以渲染到行内: <组件 src="{{pic}}"></组件> 阅读全文
posted @ 2022-11-21 16:06
Cherishe
阅读(18)
评论(0)
推荐(0)
摘要:
事件: <button bindtap="fn1">摸我</button> <button bindlongtap="fn1">长按</button> JS: data:{ }, fn1(){ console.log("摸我干啥?") } <view> <text>{{msg}}</text> <b 阅读全文
posted @ 2022-11-21 15:58
Cherishe
阅读(354)
评论(0)
推荐(0)
摘要:
轮播图容器:里面只能放swiper-item 使用: <swiper>:铺满宽度 <swiper-item>:铺满宽度 //水平铺满解决方案: <image src="1"></image>:with:100% + mode="widthFix" </swiper-item> <swiper-ite 阅读全文
posted @ 2022-11-21 15:08
Cherishe
阅读(52)
评论(0)
推荐(0)
摘要:
滚动: 盒子:固定高度 overflow:auto; 容器组件: scroll-view+固定高度(wxss高度) scroll-x:横向滚动 scroll-y:纵向滚动 使用: <scroll-view scroll-x> //整个屏幕的滚动 lorem*50//放不了 //需要放容器 </scr 阅读全文
posted @ 2022-11-21 14:54
Cherishe
阅读(18)
评论(0)
推荐(0)
摘要:
text: 文本 只能放文字,放别的组件无法解析 <text></text> rich-text: 富文本 放别的组件能够被解析出来 <rich-text></rich-text> 属性: space ="ensp/emsp/nbsp" nodes: <rich-text nodes="<h3>原生 阅读全文
posted @ 2022-11-21 14:43
Cherishe
阅读(43)
评论(0)
推荐(0)
摘要:
1.安装axios: cnpm i axios -S 2.启动项目: yarn serve npm run serve 3.在全局main.js导入axios: import axios from 'axios' 4.挂载至原型(作用:全局使用): Vue.prototype.axios = axi 阅读全文
posted @ 2022-11-21 14:34
Cherishe
阅读(505)
评论(0)
推荐(0)
摘要:
1.安装图标库: cnpm i -D font-awesome 2.启动项目: yarn serve 3.在main.js导入图标库: import 'font-awesome/css/font-awesome.min.css' 4.在组件中使用: 图库地址: https://fontawesome 阅读全文
posted @ 2022-11-21 13:23
Cherishe
阅读(72)
评论(0)
推荐(0)
摘要:
scss的安装和使用: 1.安装: cnpm i sass-loader@7 node-sass@4 -S 2.使用: less的安装和使用: 1.安装: cnpm i less@3 less-loader@7 -S 2.使用: 运行: npm run serve/dev yarn serve/de 阅读全文
posted @ 2022-11-21 13:12
Cherishe
阅读(39)
评论(0)
推荐(0)
摘要:
全局配置: 1.导入: main.js全局引入element-ui: import ElementUI from "element-ui" 2.注册: 使用Vue注册element-ui: Vue.use(ElementUI) 3.使用:(任何组件中使用element-ui组件) 按钮 el-but 阅读全文
posted @ 2022-11-21 12:57
Cherishe
阅读(1155)
评论(0)
推荐(0)
摘要:
npm i webpack -g # 安装webpack npm i vue-cli -g # 安装脚手架 vue init webpack demo # 创建项目 全局安装 vue-cli 和项目创建 npm install -g @vue/cli # 用npm安装脚手架 or yarn glob 阅读全文
posted @ 2022-11-21 12:31
Cherishe
阅读(160)
评论(0)
推荐(0)
摘要:
设置需要关闭代理 容器组件-view的使用 做布局 app.json中直接创建文件 <view></view>: 容器组件 html标签无法解析:不认识标签,没写 创建文件: pages/second/second view 类似(html的div) <!--点击事件--> <!-- 指定按下去的样 阅读全文
posted @ 2022-11-21 11:44
Cherishe
阅读(158)
评论(0)
推荐(0)

浙公网安备 33010602011771号