摘要: <div className='list_table' style={{ padding: '20px' }}> <List className="demo-loadmore-list" itemLayout="horizontal" dataSource={list} renderItem={it 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(32) 评论(0) 推荐(0)
摘要: .list_table{ width: 100%; background: #fff; height: 100%; overflow-y: scroll; &::-webkit-scrollbar { /*滚动条整体样式*/ width: 10px; height: 100%; background 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(55) 评论(0) 推荐(0)
摘要: import React, { useState, useEffect } from 'react' import './less/ListTable.less' import { Table, Button, Space, message } from 'antd'; import moment 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(47) 评论(0) 推荐(0)
摘要: <div className='list_table'> <Table showHeader={false} columns={columns} dataSource={arr} onChange={pageChange} pagination={pagination} /> </div> ) // 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: <Space size="middle"> {/* text.key就是id */} <Button type='primary' onClick={() => navigate( '/edit/' + text.key)}>编辑</Button> <Button type='danger' onC 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: return ( <div> <a className='table_title' href={"/" + props.id} target="_blank">{props.title}</a> <p style={{ color: '#999' }}>{props.subTitle}</p> </ 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(27) 评论(0) 推荐(0)
摘要: function MyTitle(props) { return ( <div> <a className='table_title' href={"xxxxx" + props.id} target="_blank">{props.title}</a> <p style={{ color: '#9 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(27) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(11) 评论(0) 推荐(0)
摘要: setPagination({ current: num, pageSize: count, total }) // 深拷贝获取到的数组 let newArr = JSON.parse(JSON.stringify(res.data.arr)); // 声明一个空数组 let myarr = [] 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(23) 评论(0) 推荐(0)
摘要: interface IPerson{ name:string, age:number, readonly id:number } let geyao:IPerson={ age:18, name:"string", id:1 } //可选属性? 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(34) 评论(0) 推荐(0)
摘要: function echo(arg:any):any{ return arg } const result=echo(123) function echo<T>(arg:T):T{ return arg } const result1=echo(123) function swap<T,U>(tup 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(26) 评论(0) 推荐(0)
摘要: enum Direction{ Up="Up", Down="Down", Left="Left", Right="Right" } console.log(Direction.Up)//0 console.log(Direction[0])//Up // 常量枚举 可以提升性能 const val 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(49) 评论(0) 推荐(0)
摘要: interface Radio{ switchRadio():void } interface Battery{ checkBatteryStatus() } interface RadioWithBattery extends Radio{ } class Car implements Radio 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: <Upload name="file" action="xxxx" onChange={handleChange} fileList={fileList} headers={{ "Authorization": getToken() || "" }} > {headPic ?"" : uploadB 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: class Animal{ protected name: string; static age=18 constructor (name:string){ this.name=name } run(){ return `${this.name}` } } const snake=new Anima 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(32) 评论(0) 推荐(0)
摘要: const downURL = window.URL.createObjectURL(new Blob([data])); // data 为获取到的二进制数据 const listNode = document.createElement("a"); // 这里注意 : 非同源a标签的downlo 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(47) 评论(0) 推荐(0)
摘要: //定义数组 let geyao:number[]=[1,2,3,4] //伪数组 function test(){ console.log(arguments) // let htmlCollection:Node=arguments } // 元祖 不能多不能少 let user:[string 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: let isDone:boolean=false let age:number=20 let num:undefined=undefined let n:null=null let notTrue:any=4 notTrue=false // 联合类型 let numgeyao:number|str 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(34) 评论(0) 推荐(0)
摘要: form.setFieldsValue({ parentId: "", code: "", name: "", contact: "", addr: "", contactNumber: "", status: "" }) 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(22) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(63) 评论(0) 推荐(0)
摘要: import java.util.Scanner; public class ValueDemo1{ public static void main(String[] args){ Scanner sc=new Scanner(System.in); int i=sc.nextInt(); Syst 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(18) 评论(0) 推荐(0)
摘要: <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="wi 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(27) 评论(0) 推荐(0)
摘要: 前言 在前端的vue的项目中 不免会安装较多的文件依赖 对于常规安装依赖 我知道的方式有两种npm和yarn 1npm 1.1定义 npm: Nodejs下的包管理器。 1.2 安装 安装node环境 直接node官网安装一下 1.3 下载地址 node地址 下载安装好之后直接下一步下一步安装 安装 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(62) 评论(0) 推荐(0)
摘要: 需求实现 1可以支持上传最多九张图片 2图片支持预览 替换 删除 3支持自定义上传文件大小 格式 未上传提示 实现效果 代码封装 UploadImage组件 * @Description: 公共上传图片 * @param {Array} type 图片格式。默认类型为png,jpeg * @para 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(272) 评论(0) 推荐(0)
摘要: <div gutter={16} style={{ width: '100%', display: 'flex', justifyContent: 'space-between', flexWrap: 'wrap ', }} > {detailMsg.imgList && detailMsg.img 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(147) 评论(0) 推荐(0)
摘要: class Animal{ name: string constructor (name:string){ this.name=name } run(){ return `${this.name}` } } const snake=new Animal("geyao") class Dog exte 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: // function add(x:number,y:number,z?:number):number{ // if(typeof z=='number'){ // return x+y+z; // }else{ // return x+y // } // } // let result=add(2 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(10) 评论(0) 推荐(0)
摘要: 零值相等 是 正0和负0相等 打印出true 相等 true undefind 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(31) 评论(0) 推荐(0)
摘要: <!-- 任何对象与undefined null不相等--> <!-- 窄对象 Narrow Objectdocument.all --> <!-- 全等对结果的预测更加清晰明确 全等在不隐式子转换下更快--> 同值相等NaN是等于NaN 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(31) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(19) 评论(0) 推荐(0)
摘要: public class ValueDemo1{ public static void main(String[] args){ String name="geyao"; int age=18; char sex='n'; double height=180.1; boolean gg=true; 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: public class ValueDemo1{ public static void main(String[] args){ //byte byte b=10; //short short s=20; //int int i=30; System.out.println(i); // Syste 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(27) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(15) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(17) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: let isDone:boolean=false let age:number=20 let num:undefined=undefined let n:null=null 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(33) 评论(0) 推荐(0)
摘要: npm install typescript -g const hello =(name:string)=>{ return `hello ${name}` } hello("viking") tsc 进行编译 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(88) 评论(0) 推荐(0)
摘要: 1程序更容易理解 2效率更高 3更少的错误 4非常好的包容性质 缺点 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(56) 评论(0) 推荐(0)
摘要: 歌谣学习笔记 学习 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(35) 评论(0) 推荐(0)
摘要: 仅仅作为笔记记录 谢谢 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(15) 评论(0) 推荐(0)
摘要: <!-- * @Author: your name * @Date: 2022-04-01 17:10:07 * @LastEditTime: 2022-04-01 17:11:35 * @LastEditors: your name * @Description: 打开koroFileHeader 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(32) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(17) 评论(0) 推荐(0)
摘要: 2 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: public class ValueDemo1{ public static void main(String[] args){ //输出hello world //数据类型 int(整数) int a =10; System.out.println(a); } } 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(17) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(17) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(15) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(10) 评论(0) 推荐(0)
摘要: public class HelloWorld{ public static void main(String[] args){ System.out.print("hello world"); } } 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(16) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(17) 评论(0) 推荐(0)
摘要: public class HelloWorld{ public static void main(String[] args){ System.out.print("hello world"); } } 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(39) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(14) 评论(0) 推荐(0)
摘要: 环境变量 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(61) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(18) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(16) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: public class ValueDemo1{ public static void main(String[] args){ //输出hello world System.out.print("我是歌谣"); System.out.print(6666); } } 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(27) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(40) 评论(0) 推荐(0)
摘要: public class HelloWorld{ public static void main(String[] args){ //输出hello world System.out.print("hello world"); } } 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(35) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: public class ValueDemo1{ public static void main(String[] args){ //变量的修改 int count = 0; //上去以为乘客 count=count+1; //下去一个乘客 count=count-1 //打印 System.out 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(29) 评论(0) 推荐(0)
摘要: 修复ts问题 createslice 导入ruduce 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: npm install @reduxjs/toolkit react-redux 统一仓库进行数据处理 定义两个数据类型 如何使用provide 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(104) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(20) 评论(0) 推荐(0)
摘要: // 将图片路径转base64 function getBase64(img, callback) { const reader = new FileReader(); reader.addEventListener('load', () => callback(reader.result)); r 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(42) 评论(0) 推荐(0)
摘要: <p>点击下方修改头像:</p> <Upload name="avatar" listType="picture-card" className="avatar-uploader" showUploadList={false} action="/api/upload" beforeUpload={b 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(27) 评论(0) 推荐(0)
摘要: // 表单提交的事件 const onFinish = (values) => { // 如果表单的username有值,并且不等于初始化时拿到的username,同时密码非空 if(values.username && values.username!==sessionStorage.getIte 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(26) 评论(0) 推荐(0)
摘要: useEffect(()=>{ GetUserDataApi().then(res=>{ console.log(res) if(res.errCode 0){ message.success(res.message) // 存到sessionStorage sessionStorage.setIt 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(34) 评论(0) 推荐(0)
摘要: <Form name="basic" style={{width: '400px'}} onFinish={onFinish} autoComplete="off" > <Form.Item label="修改用户名:" name="username"> <Input placeholder='请输 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(31) 评论(0) 推荐(0)
摘要: return ( <Space size="middle"> {/* text.key就是id */} <Button type='primary' onClick={() => navigate('/edit/' + text.key)}>编辑</Button> <Button type='dan 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(33) 评论(0) 推荐(0)
摘要: // 模拟componentDidUpdate useEffect(() => { getList(current) }, [update]) // 删除 const delFn = (id) => { ArticleDelApi({id}).then(res=>{ if(res.errCode 0 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(33) 评论(0) 推荐(0)
摘要: // 处理请求数据 const dealData = (errCode, msg) => { setIsModalVisible(false); // 关闭对话框 if (errCode 0) { message.success(msg) setTimeout(() => { // 跳回list页面 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(21) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(9) 评论(0) 推荐(0)
摘要: promise模拟异步请求 请求 额外的请求 额外的数据 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(46) 评论(0) 推荐(0)
摘要: dispatch更改 数据处理 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(22) 评论(0) 推荐(0)
摘要: loading=false才能渲染出来 import React, { useState, useEffect } from 'react' import { List, Skeleton, Pagination, Button, message } from 'antd'; import { Ar 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(48) 评论(0) 推荐(0)
摘要: axios.interceptors.response.use(function (response) { console.log(getToken(),"getTokenTest") // 对响应数据做点什么 console.log(response, "response1111") if (re 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(44) 评论(0) 推荐(0)
摘要: setBreadName(pathname.includes('edit') ? '文章编辑' : ""); break; bug修改 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: // 模拟componentDidMount useEffect(() => { editor = new E('#div1') editor.config.onchange = (newHtml) => { setContent(newHtml) } editor.create() // 根据地址 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(31) 评论(0) 推荐(0)
摘要: // 对话框点击了提交 const handleOk = () => { form .validateFields() // validate校验 field字段 .then((values) => { // form.resetFields(); // reset重置 let { title, s 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(35) 评论(0) 推荐(0)
摘要: editor.create() // 根据地址栏id做请求 if (params.id) { ArticleSearchApi({ id: params.id }).then(res => { if (res.errCode 0) { editor.txt.html(res.data.content 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(37) 评论(0) 推荐(0)
摘要: 请求拦截器 // 添加请求拦截器 instance.interceptors.request.use(function (config) { let token = localStorage.getItem('cms-token') if(token){ config.headers = { 'cm 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(40) 评论(0) 推荐(0)
摘要: // 对话框点击了提交 const handleOk = () => { form .validateFields() // validate校验 field字段 .then((values) => { // form.resetFields(); // reset重置 let { title, s 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(30) 评论(0) 推荐(0)
摘要: <Modal zIndex={99999} title="填写文章标题" visible={isModalVisible} onOk={handleOk} onCancel={() => setIsModalVisible(false)} okText="提交" cancelText="取消"> < 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(25) 评论(0) 推荐(0)
摘要: // 模拟componentDidMount useEffect(() => { editor = new E('#div1') editor.config.onchange = (newHtml) => { setContent(newHtml) } editor.create() // 根据地址 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(34) 评论(0) 推荐(0)
摘要: import React, { useEffect, useState } from 'react' import { PageHeader, Button, Modal, Form, Input, message } from 'antd'; import moment from 'moment' 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(29) 评论(0) 推荐(0)
摘要: <List className="demo-loadmore-list" itemLayout="horizontal" dataSource={list} renderItem={item => ( <List.Item actions={[ <Button type='primary' onCl 阅读全文
posted @ 2022-08-26 20:35 前端导师歌谣 阅读(24) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:34 前端导师歌谣 阅读(31) 评论(0) 推荐(0)
摘要: 这边先上代码 然后我们逐个解释 import React, { Component, Fragment } from 'react'; import { Modal, Row, Form, Col, Radio, Tag, Input, message } from 'antd'; /** * 弹框 阅读全文
posted @ 2022-08-26 20:34 前端导师歌谣 阅读(90) 评论(0) 推荐(0)
摘要: 我是歌谣 放弃很难 但是坚持一定很酷 微信公众号关注小歌谣 一起学习前后端知识 今天要说得是实现一个vue中实现五星评价得效果 简单来说 就是封装组件把 具体需要我们了解组件间得相互传值 数据绑定等知识 先用脚手架起个项目先 脚手架启动 ​在这里插入图片描述 安装依赖 包括 npm install 阅读全文
posted @ 2022-08-26 20:34 前端导师歌谣 阅读(179) 评论(0) 推荐(0)
摘要: 我是歌谣 放弃很容易 但是坚持一定很酷 1前言 在我们的开发过程中 会遇到一些开发的需求 怎么实现 怎么写 怎么做才最合理 2需求处理 拿到一个需求就和做数学题一样 我们要理清所有的关系 由于本文知识对需求进行阐述 所以就以vue为例子 2.1 需求1处理页面样式某页面跳转之后如果传过去的值为1则显 阅读全文
posted @ 2022-08-26 20:34 前端导师歌谣 阅读(73) 评论(0) 推荐(0)
摘要: 首先我们知道vue里面包含有父子组件 但是你知道如果要进行一个element的手动组件封装 怎么封装吗 1首先第一步 首先我们建立一个组件 最好设置在一个文件目录下比如components 只是一个普通的组件 叫做OneButton.vue <template> <button class="one 阅读全文
posted @ 2022-08-26 20:34 前端导师歌谣 阅读(338) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2022-08-26 20:34 前端导师歌谣 阅读(34) 评论(0) 推荐(0)