wangtao0101/vscode-js-import

new

Closed this issue · 0 comments

import React,{Component}from 'react';
assets
import IntroJs from 'intro.js';
import history from '../own/history';

class Asset extends Component {
constructor(props) {
super(props);
this.state={
step:1
};
this.startIntro = this.startIntro.bind(this)
}
componentDidMount() {

}
startIntro(){
    var intro1 = IntroJs(document.getElementById('root'))
    intro1.setOptions({
        prevLabel: "上一步",
        nextLabel: "下一步",
        skipLabel: "跳过向导",
        doneLabel: "去添加任务",
        exitOnOverlayClick: false,
        showBullets: false,
        showProgress:true
    }).oncomplete(()=>{

    }).onexit(() => {
        //点击结束按钮后, 执行的事件
        if (this.state.step===3){
            history.push("/app/task");
        }
    }).onchange((targetElement) => {
        this.setState({
            step:Number(targetElement.getAttribute("data-step"))
        })
    }).start();
}
// <button className="ad" data-step="1" data-intro='开始引导!'>测试123</button>
render(){
    return(
        <div className="notonescreen assets">
            
        </div>
    )    
}

}

export default Asset;

TypeError: Cannot read property '0' of null
at getIdentifierLoc (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\node_modules\parse-import-es6\dist\parseImport.js:138:23)
at getAllIdentifierLoc (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\node_modules\parse-import-es6\dist\parseImport.js:172:29)
at mapCommentsToIdentifier (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\node_modules\parse-import-es6\dist\parseImport.js:179:26)
at mapCommentsToImport (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\node_modules\parse-import-es6\dist\parseImport.js:275:26)
at C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\node_modules\parse-import-es6\dist\parseImport.js:294:36
at Array.forEach ()
at Object.parseImport [as default] (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\node_modules\parse-import-es6\dist\parseImport.js:293:13)
at ImportFixer.resolveImport (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\out\src\importFixer.js:141:51)
at ImportFixer.fix (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\out\src\importFixer.js:58:18)
at attachCommands.vscode.commands.registerCommand (C:\Users\Administrator.vscode\extensions\wangtao0101.vscode-js-import-0.15.4\out\src\jsImport.js:96:71)
at e._executeContributedCommand (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:485:959)
at e.executeCommand (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:485:281)
at e._executeConvertedCommand (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:487:816)
at e._executeContributedCommand (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:485:959)
at e.$executeContributedCommand (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:486:443)
at t._doInvokeHandler (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:644:118)
at t._invokeHandler (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:643:744)
at t._receiveRequest (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:642:322)
at t._receiveOneMessage (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:641:155)
at d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:638:960
at d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:38:994
at e.fire (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:44:113)
at a (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:170:213)
at Socket.f._socketDataListener (d:\Program Files\Microsoft VS Code\resources\app\out\vs\workbench\services\extensions\node\extensionHostProcess.js:170:434)
at Socket.emit (events.js:182:13)
at Socket.EventEmitter.emit (domain.js:442:20)
at addChunk (_stream_readable.js:279:12)
at readableAddChunk (_stream_readable.js:264:11)
at Socket.Readable.push (_stream_readable.js:219:10)
at Pipe.onread (net.js:636:20)