06 2020 档案

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

点击右上角即可分享
微信分享提示