Skip to content

在JSX中的使用报错 #7

Open
@weihongyu12

Description

@weihongyu12

使用了官网的配置,在render函数中这样写

render: (h, params) => (
  <div>
    <i-button  type="info"> 查看</i-button>
  </div>
),

出现如下提示:

ReferenceError: Button is not defined
    at Object.render (eval at ./node_modules/babel-loader/lib/index.js!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./node_modules/iview-loader/index.js?{"prefix":true}!./src/views/page/table-list.vue (10.9c8c75d4e48bdc98cd45.hot-update.js:7), <anonymous>:129:15)
    at render (iview.js?0536:5107)
    at createFunctionalComponent (vue.runtime.esm.js?ff9b:4006)
    at createComponent (vue.runtime.esm.js?ff9b:4178)
    at _createElement (vue.runtime.esm.js?ff9b:4359)
    at createElement (vue.runtime.esm.js?ff9b:4296)
    at vm._c (vue.runtime.esm.js?ff9b:4412)
    at Proxy.render (iview.js?0536:29651)
    at VueComponent.Vue._render (vue.runtime.esm.js?ff9b:4470)
    at VueComponent.updateComponent (vue.runtime.esm.js?ff9b:2761)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions