摘要:
https://blog.csdn.net/sinat_17775997/article/details/84203095 大佬文章,留着备用。 写在最前面 为了在 react 中更好的使用 ts,进行一下讨论 怎么合理的再 react 中使用 ts 的一些特性让代码更加健壮 讨论几个问题,reac 阅读全文
posted @ 2020-05-22 10:48
艺术诗人
阅读(3084)
评论(0)
推荐(0)
摘要:
react中使用ts,难点在于定义数据类型接口和对传入的数据进行校验。 icon.tsx import React from 'react'; const Icon = ({ name, ...restProps}) => { return ( <svg {...restProps}> <use x 阅读全文
posted @ 2020-05-21 12:31
艺术诗人
阅读(7111)
评论(0)
推荐(0)
摘要:
核心代码 childOption.legend.formatter = (name) => { const itemValueArr = ChildSeruesData.filter(el => el.variable == name) const itemValueAll = ChildSerue 阅读全文
posted @ 2020-05-21 10:50
艺术诗人
阅读(8164)
评论(0)
推荐(0)
摘要:
代码: option = { title: { text: '动态数据', subtext: '纯属虚构' }, tooltip: { trigger: 'axis', axisPointer: { type: 'cross', label: { backgroundColor: '#283b56' 阅读全文
posted @ 2020-05-15 13:18
艺术诗人
阅读(759)
评论(0)
推荐(0)
摘要:
function Person (){ this.name=“张三”; this.run = function(){ alert( this.name+'在运动' ) } } Person.prototype.work = function(){ alert( this.name+'在工作’ ) } 阅读全文
posted @ 2020-05-13 09:56
艺术诗人
阅读(231)
评论(0)
推荐(0)
摘要:
‘clip-path’是css3的一个强大属性,我们可以利用它来绘制各种各样的图形 先来裁剪一个三角形 代码如下: <style> div{ width:100px; height:100px; background-color:red; -webkit-clip-path:polygon(50% 阅读全文
posted @ 2020-05-12 11:35
艺术诗人
阅读(1219)
评论(0)
推荐(0)
摘要:
方式一: <div style=" width: 50px; height: 50px; border: 13px solid orange; border-radius: 50px; clip-path: polygon(50% 0%, 100% 0%, 100% 3600%, 50% 50%); 阅读全文
posted @ 2020-05-12 11:28
艺术诗人
阅读(6737)
评论(0)
推荐(0)
摘要:
一、从定义文件格式方面说 1、传统的开发模式可以定义js文件或者jsx文件2、利用ts开发定义的文件格式tsx 二、定义state的状态来说 1、传统的方式直接在构造函数中使用 constructor(){ this.state = { num1:10 } } 2、使用ts开发过程中需要先定义一个接 阅读全文
posted @ 2020-05-12 10:11
艺术诗人
阅读(3290)
评论(0)
推荐(0)
摘要:
option = { title: { show: true, text: '产品留存分析', textAlign: 'auto', left: 'center' }, tooltip: { show: false, trigger: 'axis', axisPointer: { // 坐标轴指示器 阅读全文
posted @ 2020-05-11 17:17
艺术诗人
阅读(4270)
评论(0)
推荐(0)
摘要:
import axios from 'axios'; import Qs from 'qs'; import Vue from 'vue'; import {getCookie, setCookie, delCookie} from '../util/cookie' axios.defaults.v 阅读全文
posted @ 2020-05-07 21:41
艺术诗人
阅读(199)
评论(0)
推荐(0)
浙公网安备 33010602011771号