react使用html2canvas生成海报
const exportImgClick = () => { if (!guestsData || !guestsData.hdmc) { message.warning('请选择活动') ...
const exportImgClick = () => { if (!guestsData || !guestsData.hdmc) { message.warning('请选择活动') ...
下载依赖npm install react-redux --save npm isntall redux --save npm install redux-thunk创建redux文件目录在store.ts创建数据,创建Red...
useMemo把“创建”函数和依赖项数组作为参数传入 useMemo,它仅会在某个依赖项改变时才重新计算 memoized 值。这种优化有助于避免在每次...
import { action, makeObservable, observable } from 'mobx'; import { createContext, useContext } from 'react'; cla...
export const useDebounce = (value, delay = 1000) => { const [debounce, setDebounce] = useState(value); useEffect(() => { ...
<Col span={5}> <Form.Item label="身份证信息" name='sfzxx' rules={[{ validator: checkL...
后端响应的数据格式文件是由后台生成,传给前端是这样的文件流。前端请求Axios({ url:'xxx', method, responseType:&#...
<Input.Password style={{ height: '46px' }} placeholder='请输入密码' prefix={<UserImg />} /> const UserImg = (props...
/* * @Description: * @Author: pang bo * @Date: 2021-06-28 16:18:17 * @LastEditTime: 2021-06-28 17:20:07 * @LastEditors: Do no...
参考了vue-admin-template中的导出excel/* eslint-disable */ import { saveAs } from 'file-saver' import XLSX from 'xlsx&#...
vue2Vue.prototype.$verson = '1.0.0'1vue3Vue.config.globalProperties.$verson = '1.0.0'1使用都是一样的this.$verson
indexMethod(index: number) { let curpage = (this as any).$parent.pageIndex; //单前页码,具体看组件取值 if (curpage === 0)...
之前用react做地图聚合开发,发现dom即使暂未显示到页面使用reactDom.render也能渲染,但是使用vue的时候就没有渲染出来,就是因为dom不在...
import axios from 'axios' const CancelToken = axios.CancelToken; this.cancel && this.cancel("取消了请求"); let result =...
後端代碼module.exports = (io) => { const userInfo = {} io.on('connection', (socket) => { console.log('建立鏈...
const CopyWebpackPlugin = require('copy-webpack-plugin') const webpack = require('webpack') const path = require(&...
import Vue from 'vue' export const store = Vue.observable({ params: { number: 1, //页码 1 total: 0, order: ...
vue下载本地的文件,需要放在publice文件目录下面 <el-link href="/cart.xlsx" download="模板" style="color:#fff">下载模板</el-link>...