上一页 1 2 3 4 5 6 ··· 11 下一页
  2021年12月7日
摘要: 1、删除源文件后,配置了gzip,当配置gzip删除源文件后,解决前端history问题,就会出现所有的都返回html,请求js、css也会返回html,页面会报错,如下配置即可 location / { root e:/build; index index.html index.htm; gzip 阅读全文
posted @ 2021-12-07 17:16 随心的博客 阅读(1750) 评论(0) 推荐(0) 编辑
  2021年10月21日
摘要: .env(项目根目录环境变量文件) PUBLIC_URL:http://cdn.com/ 阅读全文
posted @ 2021-10-21 14:57 随心的博客 阅读(461) 评论(0) 推荐(0) 编辑
  2021年9月29日
摘要: import React from "react"; function demo() { const FormConfig = { labelCol: { span: 8 }, wrapperCol: { span: 16 }, }; const [form] = Form.useForm(); c 阅读全文
posted @ 2021-09-29 09:01 随心的博客 阅读(6162) 评论(0) 推荐(0) 编辑
  2021年9月17日
摘要: @media only screen and (min-width: 320px) and (max-width: 359px) { html, body { font-size: 8.51px; } } @media only screen and (min-width: 360px) and ( 阅读全文
posted @ 2021-09-17 14:24 随心的博客 阅读(294) 评论(0) 推荐(0) 编辑
  2021年3月8日
摘要: 1、安装vite-plugin-style-import yarn add vite-plugin-style-import -D 2、在项目根目录下的vite.config.js中配置 import { defineConfig } from 'vite' import vue from '@vi 阅读全文
posted @ 2021-03-08 14:53 随心的博客 阅读(6510) 评论(0) 推荐(0) 编辑
  2021年2月24日
摘要: 一、原型链继承 function a() { this.speack = function () { console.log('第一个元素'); } } function b() { this.ask = function () { console.log('第二个元素'); } } b.proto 阅读全文
posted @ 2021-02-24 10:40 随心的博客 阅读(145) 评论(0) 推荐(0) 编辑
  2021年2月23日
摘要: //手写call Function.prototype.myCall = function (context) { let ctx = context; ctx.fn = this; const args = Array.from(arguments).splice(1); let result = 阅读全文
posted @ 2021-02-23 10:51 随心的博客 阅读(69) 评论(0) 推荐(0) 编辑
摘要: 一、js原型定义 函数都有一个原型,通过prototype指向这个原型,通过这个函数创建的实例对象会继承这个原型上面的属性和方法(设置这个实例对象的__proto__),js在它们之间创建一个关联。 二、js原型链定义 通过函数创建出来的对象,默认会有一个__proto__属性指向它继承的构造函数的 阅读全文
posted @ 2021-02-23 10:22 随心的博客 阅读(271) 评论(0) 推荐(0) 编辑
  2021年1月25日
摘要: 自定义输入框v-modal,2.0写法 <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1. 阅读全文
posted @ 2021-01-25 16:44 随心的博客 阅读(750) 评论(0) 推荐(0) 编辑
摘要: 1、函数防抖,在一定时间段不断触发,只会执行最后一次的函数 <body> <button id='btn'>点击</button> <script> //函数防抖,在一定时间段不断触发,只会执行最后一次的函数 function debounce(fn) { let timer = null; ret 阅读全文
posted @ 2021-01-25 11:34 随心的博客 阅读(101) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 ··· 11 下一页