Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Vue 3 & Vite from 2.0.0-beta.5 #1913

Closed
62 of 63 tasks
tangjinzhou opened this issue Mar 20, 2020 · 79 comments
Closed
62 of 63 tasks

Support Vue 3 & Vite from 2.0.0-beta.5 #1913

tangjinzhou opened this issue Mar 20, 2020 · 79 comments

Comments

@tangjinzhou
Copy link
Member

tangjinzhou commented Mar 20, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

What problem does this feature solve?

npm test -- ant-design-vue/components/button/__tests__/index.test.js --watch

beta

 npm i --save ant-design-vue@next
// use
import { createApp } from 'vue';
import antd from 'ant-design-vue';
import 'ant-design-vue/components/style.js';
import App from './App.vue';
createApp(App).use(antd).mount('#app');
  • Affix
  • Anchor
  • AutoComplete
  • Alert
  • Avatar
  • BackTop
  • Badge
  • Breadcrumb
  • Button
  • Card
  • Cascader
  • Checkbox
  • Col
  • Divider
  • Dropdown
  • Icon
  • Input
  • InputNumber
  • Layout
  • LocaleProvider remove
  • message
  • Menu
  • Mentions
  • Modal
  • notification
  • Popconfirm
  • Popover
  • Progress
  • Radio
  • Rate
  • Row
  • Select
  • Spin
  • Statistic
  • Steps
  • Switch
  • Tabs
  • Tag
  • Timeline
  • Tooltip
  • Upload
  • Drawer
  • Skeleton
  • Comment
  • ConfigProvider
  • Empty
  • Result
  • Descriptions
  • PageHeader
  • Pagination
  • Collapse
  • Carousel
  • Calendar
  • DatePicker
  • TimePicker
  • Form、FormModel we will merge them
  • Slider
  • Table
  • List
  • Transfer
  • Tree
  • TreeSelect

需要您的支持

image

@ghost
Copy link

ghost commented Apr 27, 2020

期待对 Vue3 的支持,加油加油~!

@wsz7777

This comment has been minimized.

@dinfer

This comment has been minimized.

@xrkffgg
Copy link
Member

xrkffgg commented Jun 4, 2020

@zkwolf
Copy link
Member

zkwolf commented Jun 4, 2020

@Amour1688
Copy link
Member

Amour1688 commented Jun 6, 2020

@thisisandy
Copy link
Contributor

thisisandy commented Jun 7, 2020

@sendya
Copy link
Member

sendya commented Jun 8, 2020

@ununian
Copy link
Contributor

ununian commented Jun 8, 2020

@tangjinzhou
Copy link
Member Author

tangjinzhou commented Jun 9, 2020

  • Tooltip
  • Popover
  • Popconfirm
  • message
  • Modal
  • notification
  • Form
  • FormModel
  • Select
  • Menu
  • Dropdown
  • Layout
  • Card
  • Tabs
  • Progress
  • Rate
  • Input
  • InputNumber
  • AutoComplete
  • Cascader
  • Carousel
  • Calendar
  • DatePicker
  • TimePicker
  • Slider
  • Table
  • Transfer
  • Tree
  • TreeSelect

@tangjinzhou tangjinzhou pinned this issue Jun 10, 2020
@liulinboyi
Copy link
Contributor

liulinboyi commented Jun 11, 2020

@tangjinzhou
Copy link
Member Author

@liulinboyi @thisisandy badge 组件有重复

@liulinboyi
Copy link
Contributor

@xiaoxiangmoe
Copy link

完成 Vue 3 支持后,有计划使用 TS 重写吗?(有一说一,目前为止,Vue 的 JSX 的类型支持完爆模板)

@tangjinzhou
Copy link
Member Author

完成 Vue 3 支持后,有计划使用 TS 重写吗?(有一说一,目前为止,Vue 的 JSX 的类型支持完爆模板)

@xiaoxiangmoe 会使用 ts 重构

@lifedre
Copy link

lifedre commented Jun 16, 2020

希望vue3.0版的table可以加一个可选的rowspan设置来多表头,一些场景目前的设计做不到。

@thisisandy
Copy link
Contributor

我调整了下做pagination了

@tangjinzhou
Copy link
Member Author

@thisisandy pagination 有进展吗

@thisisandy
Copy link
Contributor

thisisandy commented Jul 8, 2020

Known issues on JSX support:

  1. Slot is currently not supported
  2. The class(name) of the pager is not updated properly when the user clicks the prev and next button, reproducible on mid-size screen.
    cc @tangjinzhou

@tomgao365
Copy link
Contributor

看来月底就可以出版本了。😀

@tangjinzhou tangjinzhou changed the title Vue 3 支持 Support Vue 3 Jul 23, 2020
@muyoulongjingcha
Copy link

哎呀,都完成啦,期待版本发布😀

@zxbe
Copy link

zxbe commented Jul 29, 2020

怎么提交BuG?
Node built-ins error

@Amour1688
Copy link
Member

怎么提交BuG?
Node built-ins error

支持 Vue 3 的版本还没有发,所以你在 vite 上用的那个版本就算 setTimeout 解决了应该也是跑不起来了,近期会发布支持 Vue 3 的版本

@Amour1688
Copy link
Member

Wish to support vue 3.0(vue-next) and typescript.

will be fixed in this week.

@CyberQin
Copy link

大大们好厉害,终于找到一个vue3可用的组件库了,pro也赶紧整起来,到时候release了喝咖啡

@littleCareless
Copy link

icon图标 我看改为按需引入了 那么我想使用iconfont图标 该怎么写?

@SangeCoder
Copy link

@Amour1688 具体什么日期呢? 准备着手 electron + ts + vue3 + antd

@Amour1688
Copy link
Member

icon图标 我看改为按需引入了 那么我想使用iconfont图标 该怎么写?

https://2x.antdv.com/components/icon-cn/#components-icon-demo-use-iconfont.cn

@CarterLi
Copy link
Contributor

image

建议不要扩展vue的prototype,这样无法摇树优化,还可能与其他库产生名字冲突

@sendya
Copy link
Member

sendya commented Aug 20, 2020

image

建议不要扩展vue的prototype,这样无法摇树优化,还可能与其他库产生名字冲突

2.x 版本没有挂载 prototype,直接 import 之后可直接使用

@CarterLi
Copy link
Contributor

image
建议不要扩展vue的prototype,这样无法摇树优化,还可能与其他库产生名字冲突

2.x 版本没有挂载 prototype,直接 import 之后可直接使用

我用的是npmjs上最新的ant-design-vue@2.0.0-beta.2。后续版本改了就好

@humbinal
Copy link

vite中使用2.0.0-beta.2版本出现:

ant-design-vue.js:1141 Uncaught TypeError: _extends is not a function
    at omit (ant-design-vue.js:1141)
    at wrapWithConnect (ant-design-vue.js:11264)
    at ant-design-vue.js:17612

main.js:

import {createApp} from 'vue'
import antd from 'ant-design-vue'
import App from './App.vue'
import './index.css'

createApp(App)
  .use(antd)
  .mount('#app')

谁解决了可以说一下吗?

@buqiyuan
Copy link
Member

vite中使用2.0.0-beta.2版本出现:

ant-design-vue.js:1141 Uncaught TypeError: _extends is not a function
    at omit (ant-design-vue.js:1141)
    at wrapWithConnect (ant-design-vue.js:11264)
    at ant-design-vue.js:17612

main.js:

import {createApp} from 'vue'
import antd from 'ant-design-vue'
import App from './App.vue'
import './index.css'

createApp(App)
  .use(antd)
  .mount('#app')

谁解决了可以说一下吗?

我用vite也是遇到这个问题,暂时先用vue-cli + vue3.0过渡一下吧

@reaink
Copy link

reaink commented Aug 24, 2020

vite中使用2.0.0-beta.2版本出现:

ant-design-vue.js:1141 Uncaught TypeError: _extends is not a function
    at omit (ant-design-vue.js:1141)
    at wrapWithConnect (ant-design-vue.js:11264)
    at ant-design-vue.js:17612

main.js:

import {createApp} from 'vue'
import antd from 'ant-design-vue'
import App from './App.vue'
import './index.css'

createApp(App)
  .use(antd)
  .mount('#app')

谁解决了可以说一下吗?

相同错误, @tangjinzhou 请教有没有解决方法

@sendya
Copy link
Member

sendya commented Aug 24, 2020

@buqiyuan @nshusr vite 还是实验性库,请先使用 webpack

@CarterLi
Copy link
Contributor

CarterLi commented Aug 26, 2020

vue3里v-model默认绑定属性改成了modelValue,有计划把所有的value都替换成modelValue吗?鉴于antv2现在已经是beta阶段,如果有计划要改的话是最后机会了

@zkwolf
Copy link
Member

zkwolf commented Aug 26, 2020

vue3里v-model默认绑定属性改成了modelValue,有计划把所有的value都替换成modelValue吗?鉴于antv2现在已经是beta阶段,如果有计划要改的话是最后机会了

https://2x.antdv.com/docs/vue/migration-v2-cn/ 详见文档吧,改成了v-model:xxx这种形式

@abelit

This comment has been minimized.

@sendya
Copy link
Member

sendya commented Aug 27, 2020

@abelit 关键字 less lessOptions javascriptEnabled

@tangwenjie-123
Copy link

import { createApp } from 'vue'
import 'ant-design-vue/dist/antd.css';

const app = createApp();

import {
Card,
} from 'ant-design-vue'

app.use(Card);

已经按上述按需导入了,但是还是报错:

runtime-core.esm-bundler.js?5c40:38 [Vue warn]: Failed to resolve component: a-card
at <Login onVnodeMounted=fn onVnodeUnmounted=fn ref=Ref< undefined > >
at
at

@van-chin
Copy link

van-chin commented Aug 28, 2020

vite使用报错 Uncaught TypeError: _extends is not a function

可以升级omit.js版本到2.0.2 可以消除 _extends is not a function 错误

但是还是会有ant-design-vue.js:33563 Uncaught ReferenceError: require is not defined 错误

因为里面有使用require 引入其他库或文件

@CarterLi
Copy link
Contributor

a-modal 中 destroyOnClose 属性会导致 afterClose 回调调用两遍,感觉像是bug,是这样设计的吗?

@shyser
Copy link

shyser commented Aug 28, 2020

有没有哪位壮士研究出来怎么在vite里面使用啊?
其他的依赖库都已经在vite里面跑起来了,就差这个,真是要了老命了 >. <

@tangjinzhou tangjinzhou changed the title Support Vue 3 from 2.0.0-beta.2 Support Vue 3 & Vite from 2.0.0-beta.5 Aug 31, 2020
@wxs77577
Copy link

wxs77577 commented Sep 1, 2020

实测 vite 通过, 大写的赞:

import antd from 'ant-design-vue';
import 'ant-design-vue/dist/antd.css';

createApp(App).use(antd).mount('#app')

@shyser
Copy link

shyser commented Sep 1, 2020

vite下面,组件按需引入时,CSS样式似乎没生效,我目前暂时改成了全部导入的。

@YuhuiM
Copy link

YuhuiM commented Sep 2, 2020

image
为什么不能使用number[]作为<a-pagination />的pageSizeOptions呢?

@CarterLi
Copy link
Contributor

CarterLi commented Sep 2, 2020

在vite下面使用浏览器报错:Uncaught (in promise) SyntaxError: The requested module '/@modules/lodash/isPlainObject.js' does not provide an export named 'default'

image

建议把所有使用 lodash 的地方替换为 lodash-es

PR开了:#2777

@Yakoot
Copy link

Yakoot commented Sep 2, 2020

how to use confirmation modal dialog?
this.$confirm doesn't work

@vueComponent vueComponent locked as too heated and limited conversation to collaborators Sep 2, 2020
@tangjinzhou
Copy link
Member Author

If you have questions or suggestions, you can use the newly opened issue to discuss.

@tangjinzhou tangjinzhou unpinned this issue Feb 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests