Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/reactjs/21.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
我无法访问reactjs中的类属性 实现: {Number(this.props.showHours).toLocaleString()} {Number(this.props.waiting).toLocaleString()} /*测试用例: 描述('RenderJobsRow',()=>{ 它('用数字分隔的逗号',()=>{ 常量包装器=浅() expect(wrapper.find('.show_hours').text()).toEqual('23567')) expect(wrapper.find('.waiting_hours').text()).toEqual('3214524')) }) })_Reactjs - Fatal编程技术网

我无法访问reactjs中的类属性 实现: {Number(this.props.showHours).toLocaleString()} {Number(this.props.waiting).toLocaleString()} /*测试用例: 描述('RenderJobsRow',()=>{ 它('用数字分隔的逗号',()=>{ 常量包装器=浅() expect(wrapper.find('.show_hours').text()).toEqual('23567')) expect(wrapper.find('.waiting_hours').text()).toEqual('3214524')) }) })

我无法访问reactjs中的类属性 实现: {Number(this.props.showHours).toLocaleString()} {Number(this.props.waiting).toLocaleString()} /*测试用例: 描述('RenderJobsRow',()=>{ 它('用数字分隔的逗号',()=>{ 常量包装器=浅() expect(wrapper.find('.show_hours').text()).toEqual('23567')) expect(wrapper.find('.waiting_hours').text()).toEqual('3214524')) }) }),reactjs,Reactjs,* /*当前错误消息: /*方法“text”只能在单个节点上运行。改为找到0 * {Number(this.props.showHours).toLocaleString()} {Number(this.props.waiting).toLocaleString()} Implementation: <tr> <td class = 'show_hours'>{Number(this.props.showHours).toLocaleString()

* /*当前错误消息:

/*方法“text”只能在单个节点上运行。改为找到0

*


{Number(this.props.showHours).toLocaleString()}
{Number(this.props.waiting).toLocaleString()}
Implementation:
  <tr>
        <td class = 'show_hours'>{Number(this.props.showHours).toLocaleString()}</td>
       <td class = 'waiting_hours'>{Number(this.props.waiting).toLocaleString()}</td>
   </tr>



/*Testcase:


describe('RenderJobsRow',() => {
    it('Commas separated with Numbers.',() => {
        const wrapper = shallow(<RenderJobsRow
            showHours={23567}
            waiting  ={3214524}
        />)
        expect(wrapper.find('.show_hours').text()).toEqual('23,567')
        expect(wrapper.find('.waiting_hours').text()).toEqual('3,214,524')
    })
})

<tr>
   <td className = 'show_hours'>{Number(this.props.showHours).toLocaleString()}</td>
   <td className = 'waiting_hours'>{Number(this.props.waiting).toLocaleString()}</td>
</tr>