React自学笔记(六)

编程入门 行业动态 更新时间:2024-10-13 16:18:40

React自学<a href=https://www.elefans.com/category/jswz/34/1770047.html style=笔记(六)"/>

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自学笔记(六)

本文发布于:2024-02-13 20:11:34,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1760623.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:笔记   React

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!