06 2020 档案
摘要:ul{ padding: 0; margin: 0; } .swipper { width: 50%; background-color: #99a9bf; position: relative; overflow: hidden; .swipper-item { top:0; left: 0; p
阅读全文
摘要:使用 React.lazy加载函数组件的时候函数组件如下写法: export function Swipper(props) 是不能加载出来的,需要写成 export default function Swipper(props) 才可以解决问题,如果有什么更好的办法请指出
阅读全文
摘要:import axios from "axios"; import store from "@/store"; import router from "@/router"; const service = axios.create(); //request拦截 service.interceptor
阅读全文
摘要:增强组件:import React from "react"; type propsType = { forwardedRef: any; }; type stateType = {}; export function logProps(WrappedComponent) { class LogPr
阅读全文
摘要:转载:https://www.cnblogs.com/mushitianya/p/10507818.html 在man.js 写入: // v-dialogDrag: 弹窗拖拽 Vue.directive("dialogDrag", { bind(el, binding, vnode, oldVno
阅读全文
摘要:祖组件: import React, { createContext, Context } from "react"; import CNode from "../components/CNode"; type propsType = {}; type stateType = { userInfo:
阅读全文
摘要:这样的问题是TS语法类型检测的时候会报错,这时候可以给state个props生命类型,问题解决,代码如下: import React from "react"; type StateType = { name: string; number: number; }; type propType = {
阅读全文
摘要:import React from "react"; class Test4 extends React.Component { constructor(props) { super(props); this.state = { value: "coconut", arr: [], options:
阅读全文