亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

請問react 怎么清除當前的歷史記錄?

請問react 怎么清除當前的歷史記錄?

呼如林 2019-08-20 17:14:50
react 怎么清除當前的歷史記錄
查看完整描述

3 回答

?
慕蓋茨4494581

TA貢獻1850條經驗 獲得超11個贊

import React from 'react'
import { render } from 'react-dom'

const About = React.createClass({/*...*/})
const Inbox = React.createClass({/*...*/})
const Home = React.createClass({/*...*/})

const App = React.createClass({
getInitialState() {
 return {
   route: window.location.hash.substr(1)
 }
},

componentDidMount() {
 window.addEventListener('hashchange', () => {
   this.setState({
     route: window.location.hash.substr(1)
   })
 })
},

render() {
 let Child
 switch (this.state.route) {
   case '/about': Child = About; break;
   case '/inbox': Child = Inbox; break;
   default:      Child = Home;
 }

 return (
   
     App
     


  •        

  • About


  •        

  • Inbox


  •      


     
   
 )
}
})

render(, document.body)



查看完整回答
反對 回復 2019-08-24
?
白豬掌柜的

TA貢獻1893條經驗 獲得超10個贊

有兩種辦法可以刪除表中的所有數據: 1、TRUNCATE TABLE 刪除表中的所有行,而不記錄單個行刪除操作。 語法 TRUNCATE TABLE name 參數 name 是要截斷的表的名稱或要刪除其全部行的表的名稱。 2、Delete from tablename where 1=1

查看完整回答
反對 回復 2019-08-24
  • 3 回答
  • 0 關注
  • 1768 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號