会员
众包
新闻
博问
闪存
赞助商
HarmonyOS
Chat2DB
所有博客
当前博客
我的博客
我的园子
账号设置
会员中心
简洁模式
...
退出登录
注册
登录
_只码农
博客园
首页
新随笔
联系
订阅
管理
上一页
1
2
3
4
5
6
下一页
2022年3月18日
elementUi upload 删除文件缩略图
摘要: HTML: <el-upload action="#" :before-upload="handleBeforeUpload" :on-change="handleFileChange" list-type="picture-card" :auto-upload="false" ref="uploa
阅读全文
posted @ 2022-03-18 14:18 _只码农
阅读(912)
评论(0)
推荐(0)
2022年2月23日
nodejs连接数据库
摘要: -- 安装mysql模块 npm i mysql -连接数据库 const mysql = require('mysql') //建立与mysql数据库的连接关系 const db = mysql.createPool({ host:'127.0.0.1',//数据库的ip地址 user:'root
阅读全文
posted @ 2022-02-23 14:17 _只码农
阅读(164)
评论(0)
推荐(0)
2022年2月18日
express中间件
摘要: -中间件概念 -中间件特指业务流程的中间处理环节 -express中间件的格式 //中间件的形参列表中,必须包含next参数,而路由处理函数中只包含req和res app.get('/',(req,res,next)=>{ next() }) -next函数的作用 next函数是实现多个中间件连续调
阅读全文
posted @ 2022-02-18 16:46 _只码农
阅读(52)
评论(0)
推荐(0)
express路由
摘要: -路由的概念 -express中的路由 在express中,路由指的是客户端请求与服务器处理函数之间的映射关系。 express中的路由由3部分组成,分别是请求的类型,请求的URL地址,处理函数,格式如下: //匹配get请求,路径为/index app.get('/index',(req,res)
阅读全文
posted @ 2022-02-18 15:43 _只码农
阅读(210)
评论(0)
推荐(0)
express初识
摘要: -express的基本使用 -下载express npm install express --save -调用 const express = require('express') const app = express() app.listen(80,()=>{ console.log('serv
阅读全文
posted @ 2022-02-18 15:11 _只码农
阅读(66)
评论(0)
推荐(0)
2022年2月16日
nodejs 创建最基本的http服务器
摘要: 1.引入http模块 const http = require('http') 2.调用createServer()创建服务器 const server = http.createServer() 3.调用on绑定request事件 server.on('request',()=>{ console
阅读全文
posted @ 2022-02-16 16:29 _只码农
阅读(346)
评论(0)
推荐(0)
nodejs path路径模块
摘要: -path.join() -作用:把多个路径片段拼接成完整的字符串 -代码示例: const path = require('path') const fs = require('fs') // ../会抵消掉前面路径 const url = path.join('/a','/b','/ab/c',
阅读全文
posted @ 2022-02-16 15:27 _只码农
阅读(107)
评论(0)
推荐(0)
nodejs fs-读取文件内容
摘要: -fs.readFile() -用来读取指定文件的内容 -语法:fs.readFile(path,options,callback) -path:必选参数,要读取的文件路径 -options:可选参数,以什么编码格式来读取文件 -callback:必选参数,读取文件后,通过回调函数拿到读取的结果 -
阅读全文
posted @ 2022-02-16 14:34 _只码农
阅读(374)
评论(0)
推荐(0)
2021年12月22日
vue3中其他的改变
摘要: 1.全局API的转移 2.x全局api(Vue) 3.x全局api(app) Vue.config.xxx app.config.xxx Vue.config.productionTip 移除 Vue.component app.component Vue.directive app.directi
阅读全文
posted @ 2021-12-22 16:13 _只码农
阅读(98)
评论(0)
推荐(0)
vue3中suspense的使用
摘要: 1.作用:suspense在等待异步组件时额外渲染一些内容,使用户拥有更好的体验。 2.使用: 引入异步组件,Child需要在components里注册 import {defineAsyncComponent} from 'vue' // import demo from './component
阅读全文
posted @ 2021-12-22 15:34 _只码农
阅读(2779)
评论(0)
推荐(0)
上一页
1
2
3
4
5
6
下一页
公告