V2EX = way to explore
V2EX 是一个关于分享和探索的地方
Sign Up Now
For Existing Member  Sign In
zxCoder
V2EX  ›  问与答

问一个关于 ant design vue 的问题

  •  
  •   zxCoder · Nov 25, 2020 · 1490 views
    This topic created in 1981 days ago, the information mentioned may be changed or developed.

    文档里在哪里有提到引入组件的名字格式吗?找了半天没找到

    为什么一定是

    import {Table} ...
    
    export default {
      components:{ATable:Table}
    }
    
    
    <a-table></a-table>
    

    人都傻了。。。这些写法都是百度找到的,文档没看到啊

    5 replies    2020-11-25 12:51:35 +08:00
    Hanser002
        2
    Hanser002  
       Nov 25, 2020
    gzg1023
        3
    gzg1023  
       Nov 25, 2020
    一般来说都是在 main 引入,然后子组件直接使用就可以了,不用在引入
    如果你只是某个组件单独用,可以看这个清单 https://github.com/vueComponent/ant-design-vue/blob/master/components/index.js
    zxCoder
        4
    zxCoder  
    OP
       Nov 25, 2020
    @Hanser002 很多人就是没看标题和内容
    Hanser002
        5
    Hanser002  
       Nov 25, 2020
    @zxCoder 很多人就是没看标题和内容
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3134 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 30ms · UTC 14:15 · PVG 22:15 · LAX 07:15 · JFK 10:15
    ♥ Do have faith in what you're doing.