text: (window.webpackJsonp=window.webpackJsonp||[]).push([[62],{222:function(t,a,s){"use strict";s.r(a);var r=s(0),e=Object(r.a)({},function(){this.$createElement;this._self._c;return this._m(0)},[function(){var t=this,a=t.$createElement,s=t._self._c||a;return s("div",{staticClass:"content"},[s("h1",{attrs:{id:"props"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#props","aria-hidden":"true"}},[t._v("#")]),t._v(" Props")]),t._v(" "),s("h4",{attrs:{id:"_1、和props相关"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_1、和props相关","aria-hidden":"true"}},[t._v("#")]),t._v(" 1、和props相关")]),t._v(" "),s("ul",[s("li",[t._v("只读，不准修改")]),t._v(" "),s("li",[t._v("componentWillReceiveProps  / 生命周期")]),t._v(" "),s("li",[t._v("propTypes")]),t._v(" "),s("li",[t._v("defaultProps")]),t._v(" "),s("li",[t._v("children")])]),t._v(" "),s("h4",{attrs:{id:"_2、类型检查"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_2、类型检查","aria-hidden":"true"}},[t._v("#")]),t._v(" 2、类型检查")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("import PropTypes from 'prop-types';\n\nList.propTypes = {\n    list:PropTypes.array/object/number/string\n}\n")])])]),s("h4",{attrs:{id:"_3、默认值"}},[s("a",{staticClass:"header-anchor",attrs:{href:"#_3、默认值","aria-hidden":"true"}},[t._v("#")]),t._v(" 3、默认值")]),t._v(" "),s("div",{staticClass:"language- extra-class"},[s("pre",{pre:!0,attrs:{class:"language-text"}},[s("code",[t._v("List.defaultProps = {\n    list:[{},{},{}]\n}\n")])])])])}],!1,null,null,null);a.default=e.exports}}]);