React框架使用
摘要:一:使用Vite创建React项目 二:React中组件使用 import React, { Component, useState } from "react"; //使用class定义组件 export default class Modet extends Component<any,any>
阅读全文
posted @
2023-04-19 11:25
最帅爸爸
阅读(117)
推荐(0) 编辑
Vue3(十)电影院案例
摘要:效果图: 代码: <template> <div class="move_box"> <div class="move_leftbox"> <h4 style="text-align:center">屏幕</h4> <div class="img_box"> <div class="img_item
阅读全文
posted @
2022-11-25 10:01
最帅爸爸
阅读(210)
推荐(0) 编辑
Vue3学习(九)
摘要:路由学习: 1:路由传参 <template> <div class="cls">这是电影 <h2>{{ $route.params.id }}</h2> <h2>{{ $route.params.type }} - {{ $route.params}}</h2> <h2>{{ $route.que
阅读全文
posted @
2022-11-25 08:41
最帅爸爸
阅读(42)
推荐(0) 编辑
Vue3学习(八)
摘要:组件学习: 子组件: <template> <div :title="msg">{{title}}</div> <div>{{cnData}}</div> <div>{{user}}</div> </template> <!-- <script lang="ts"> import { defineC
阅读全文
posted @
2022-11-11 08:48
最帅爸爸
阅读(108)
推荐(0) 编辑
Vue3学习(七)综合实例
摘要:示图: 代码: <template> <table border="1" width="1000" cellpanding="0" cellspaing="0" style="margin:0 auto"> <tr> <th><input type="checkbox" name="checkAll
阅读全文
posted @
2022-11-01 10:10
最帅爸爸
阅读(47)
推荐(0) 编辑
Vue3学习(六)
摘要:取反,按键处理事件,鼠标左中右事件,form阻止提交,v-on,lazy,number,trim <template> <!-- .delete只在删除键上有效,还有很多,如:enter,esc,等等 --> <!-- 还可以.once指的就是点击一次有效,后面无效 --> <!-- 还可以指定两个
阅读全文
posted @
2022-11-01 10:07
最帅爸爸
阅读(90)
推荐(0) 编辑
Vue3学习(五)
摘要:设置全局参数,调用参数三种方法,阻止默认事件,阻止冒泡,capture捕获 设置全局参数 main.ts import { createApp } from 'vue' import App from './App.vue' import router from './router' let app
阅读全文
posted @
2022-11-01 10:02
最帅爸爸
阅读(40)
推荐(0) 编辑
Vue3学习(四)
摘要:连接数据库实现数据防抖 shake.js export function shake(fn,delay){ let time=null; return function(){ let parameter=arguments; if(time){ clearTimeout(time); } time=
阅读全文
posted @
2022-11-01 09:56
最帅爸爸
阅读(31)
推荐(0) 编辑
Vue3学习(三)
摘要:<template> <h2>姓名:{{user.name}}</h2> <h2>姓名:{{user.age}}</h2> <h2>姓名:{{user.job.salsry}}k</h2> <button @click="user.name+='%'">修改姓名</button> <button @
阅读全文
posted @
2022-11-01 09:54
最帅爸爸
阅读(36)
推荐(0) 编辑
Vue3学习(二)
摘要:使用方法,computed,watch,watchEffect完成加减乘除 <template> <h1>方法</h1> <input type="text" v-model="input3" @input="meth()"> + <input type="text" v-model="input4
阅读全文
posted @
2022-11-01 09:52
最帅爸爸
阅读(52)
推荐(0) 编辑
Vue3学习(一)
摘要:一:vue-cli构建第一个Vue程序 1:npm uninstall vue-cli -g (卸载Vue老版本如:Vue2...) 2:npm i -g @vue/cli (安装Vue3) 3:vue -V (查看Vue版本) 4:vue create ...(创建Vue项目<...表示项目名称>
阅读全文
posted @
2022-10-17 13:41
最帅爸爸
阅读(94)
推荐(0) 编辑
webpack打包思路与流程解析
摘要:一:创建一个新的工程,项目初始化 npm init -y 二:搭建项目框架 三:编写main.js文件内容,在index.js中引入,在把index.js引入到index.html中 例: export default()=>{ function computer(){ let h2=documen
阅读全文
posted @
2022-10-04 18:07
最帅爸爸
阅读(1696)
推荐(4) 编辑
TypeScript(一)基本使用
摘要:一:导入TypeScript npm i typescript 或者 npm i typescript -g(全局导入) 二:编译Ts文件为Js(道理跟Sass转Css一样) 在当前文件目录终端中输入:tsc 文件名称.ts 然后就会得到一个同名的.js文件 三:引用js 新建一个html的页面,在
阅读全文
posted @
2022-09-21 15:00
最帅爸爸
阅读(26)
推荐(0) 编辑
Node.js(七)MySql+ajax
摘要:Api.js const express=require("express"); const router=express.Router(); const mysql = require('mysql') const mysqlutil=require("./mysql"); let pool=my
阅读全文
posted @
2022-09-21 08:57
最帅爸爸
阅读(53)
推荐(0) 编辑
Node.js(六)MongoDB
摘要:student.js var express = require('express'); var router = express.Router(); const _=require("lodash"); const { MongoClient } = require("mongodb"); //依
阅读全文
posted @
2022-09-21 08:53
最帅爸爸
阅读(32)
推荐(0) 编辑
Node.js(六)连接MongoDB进行数据访问
摘要:npm init -y(初始化项目) npm install mongodb --save(引入MongoDB) const { MongoClient } = require("mongodb"); //依赖MongoClient let client=new MongoClient("mongo
阅读全文
posted @
2022-09-19 11:59
最帅爸爸
阅读(49)
推荐(0) 编辑
Node.js(五)学生管理CRUD
摘要:npm init -y(初始化项目) npm install express(引入express) npx express-generator -e(自动生成模板。添加对 ejs 模板引擎的支持) npm i --save lodash(引入lodash) app.js var createErro
阅读全文
posted @
2022-09-19 11:47
最帅爸爸
阅读(43)
推荐(0) 编辑
Node.js(四)json
摘要:npm init -y(初始化项目) npm install express(引入express) npx express-generator -e(自动生成模板。添加对 ejs 模板引擎的支持) npm i --save lodash(引入lodash) 路由配置carApi.js const e
阅读全文
posted @
2022-09-19 11:34
最帅爸爸
阅读(107)
推荐(0) 编辑
Node.js(三)Lodash
摘要:npm init -y(初始化项目) npm i --save lodash(引入lodash) const _=require("lodash"); let stus=[ {id:1,name:"tom",age:40}, {id:2,name:"xiao",age:28}, {id:3,name
阅读全文
posted @
2022-09-19 08:59
最帅爸爸
阅读(190)
推荐(0) 编辑
Node.js(二)express
摘要:npm init -y(初始化项目) npm install express(引入express) npx express-generator -e(自动生成模板。添加对 ejs 模板引擎的支持) app.js const express=require("express"); const path
阅读全文
posted @
2022-09-19 08:52
最帅爸爸
阅读(30)
推荐(0) 编辑