摘要: 按钮 <button @click="register">登录</button> 实现跳转 在methods里面写入一下代码 register () { //跳转到上一次浏览的页面 this.$router.go(-1) //指定跳转的地址 this.$router.replace('/将要跳转的路 阅读全文
posted @ 2020-11-20 11:18 彬戈戎马 阅读(7671) 评论(0) 推荐(0) 编辑
摘要: 以下是使用vscode创建uni-app项目步骤最好跟着操作 打开vscode 点击右上角终端 在终端里输入以下代码 1丶全局安装 vue-cli 3.x(如已安装请跳过此步骤) npm install -g @vue/cli 2丶通过cli创建uniapp项目 vue create -p dclo 阅读全文
posted @ 2020-11-18 14:46 彬戈戎马 阅读(4590) 评论(0) 推荐(0) 编辑
摘要: 使用下面的代码粘贴到调试工具中运行一下,然后滚动页面,就可以看到是哪个元素产生的滚动了 function findscroller(element) { element.onscroll = function () { console.log(element) } Array.from(elemen 阅读全文
posted @ 2020-09-27 10:26 彬戈戎马 阅读(632) 评论(0) 推荐(0) 编辑
摘要: 用了这么久电脑才知道剪贴板怎么调出来 废话不多 直接看快捷键就好 Ctrl+c 复制到剪贴板 ctrl+x 剪切到剪贴板 ctrl+v 粘贴快捷键 window键+v 调出剪贴板 阅读全文
posted @ 2020-09-26 09:46 彬戈戎马 阅读(7752) 评论(0) 推荐(0) 编辑
摘要: Vue-router的使用步骤: Vue Router的使用步骤还是比较清晰的,按照步骤一步一步就能完成路由操作 A.导入js文件 B.添加路由链接 C.添加路由占位符(最后路由展示的组件就会在占位符的位置显示) D.定义路由组件 E.配置路由规则并创建路由实例 F.将路由挂载到Vue实例中; Vu 阅读全文
posted @ 2020-09-07 21:12 彬戈戎马 阅读(1110) 评论(0) 推荐(0) 编辑
摘要: 分支循环使用方法: <body> <div id="app"> <div v-if = 'score > =90'>优秀</div> <div v-else-if='score < 90 && score>=80'>良好</div> <div v-else-if='score < 80 && sco 阅读全文
posted @ 2020-08-29 19:22 彬戈戎马 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 事件修饰符的指令: .stop阻止冒泡 <a v-on:click.stop="handle">跳转</a> .prevent阻止默认行为 <a v-on:click.prevent="handle">跳转</a> 用法代码: <body> <div id="app"> <div>{{num}}</ 阅读全文
posted @ 2020-08-26 21:01 彬戈戎马 阅读(104) 评论(0) 推荐(0) 编辑
摘要: Vue模板模板语法 模板语法的概览如下: 1.插值表达式 <div id="app"> <!-- 插值表达式 用于把内容填充到标签里面 因为Vue库文件内部会进行编译过程 作用:1. 将数据填充到HTML标签中 2. 插值表达式支持基本的计算操作--> <div>{{msg}}</div> <!-- 阅读全文
posted @ 2020-08-26 20:53 彬戈戎马 阅读(166) 评论(0) 推荐(0) 编辑
摘要: 安装和配置SQL 在终端输入 npm i mysql命令安装SQL(加上-g全局安装) 配置SQL // 1.导入mysql模块 const mysql = require("mysql"); // 2.创建连接池 设置一些配置信息 const db = mysql.creatPool){ host 阅读全文
posted @ 2020-08-25 20:46 彬戈戎马 阅读(227) 评论(0) 推荐(0) 编辑
摘要: 自定义中间件为模块代码如下: // custom-body-parser.js const qs = require('querystring') const bodyParser = (req, res, next) => { // 定义中间价具体的业务逻辑 // 1. 定义一个 str 字符串, 阅读全文
posted @ 2020-08-24 21:30 彬戈戎马 阅读(118) 评论(0) 推荐(0) 编辑