笔记(六)"/>
React自学笔记(六)
接着上面的todolist.js文件做一些小修改:
import React, { Component } from 'react';
import '../assets/css/index.css'//引入自定义模块
import storage from '../model/storage';class Todolist extends React.Component {constructor(props) {super(props);this.state = { username:"111",list:[{title:"录制ionic",checked:true},{title:"录制nodejs",checked:false},{title:"录制vue",checked:false},{title:"录制angularjs",checked:false},]};}removeData=(key)=>{// alert(key)var templateList=this.state.list;templateList.splice(key,1)this.setState({
更多推荐
React自学笔记(六)
发布评论