摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" > <title>Document 阅读全文
摘要:
1. 安装 vw 插件 npm i postcss-px-to-viewport-8-plugin --save-dev 2. 配置 vite.config.js import { defineConfig } from 'vite' import vue from '@vitejs/plugin- 阅读全文
摘要:
1. 下拉刷新组件 <template> <div class="box" ref="boxRef" @touchstart="touchstart" @touchmove="touchmove" @touchend="touchend" :style="style" > <slot /> </di 阅读全文
摘要:
出于浏览器同源政策的影响, 如果服务器不允许跨域, 客户端与服务器不同源, 请求就会失败, 提示如下 但是有些标签是例外的, 比如说图片的url, script标签的 url 而作为web脚本语言的javascript, 本质上其实是字符串 不信你可以在script内部 console.log("< 阅读全文
摘要:
const val = ['12', '123', '1234', '12345', '123456', '1234567', '1234442313123'] const reg = /(?<=\d)(?=(\d{4})+(?!\d))/g let res = '' val.forEach(i = 阅读全文
摘要:
import { nextTick } from "vue"; // 数据类型 function getDataType() { return Object.prototype.toString.call(arguments[0]).slice(8, -1).toLowerCase(); } /** 阅读全文
摘要:
<template> <div class="container" ref="scrollRef" @scroll="scroll"> <div class="plc" :style="'height: ' + list.length * 60 + 'px;padding-top: ' + padd 阅读全文
摘要:
npm i puppeteer const puppeteer = require('puppeteer'); function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } async function 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" > <title>Document 阅读全文
摘要:
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0" > <title>Document 阅读全文