view-design / ViewUI

A high quality UI Toolkit built on Vue.js 2.0
https://www.iviewui.com/
Other
2.65k stars 797 forks source link

[Feature Request]missing vue3.0 support #516

Open ok2fly opened 4 years ago

ok2fly commented 4 years ago

What problem does this feature solve?

import { createApp } from 'vue' import App from './App.vue' import './registerServiceWorker' import router from './router' import store from './store' import ViewDesign from 'view-design'

// Plugin(ViewDesign)

createApp(App) .use(router) .use(store) .use(ViewDesign) .mount('#app')

can't work by call the use()

iview.js?f825:1166 Uncaught TypeError: Cannot read property 'prototype' of undefined at Object.eval (iview.js?f825:1166) at webpack_require (iview.js?f825:30) at Object.eval (iview.js?f825:4355) at webpack_require (iview.js?f825:30) at Object.eval (iview.js?f825:30660) at webpack_require (iview.js?f825:30) at Object.eval (iview.js?f825:30646) at webpack_require (iview.js?f825:30) at Object.eval (iview.js?f825:30064) at __webpack_require__ (iview.js?f825:30)

var isServer = _vue2.default.prototype.$isServer;

var on = exports.on = function () { if (!isServer && document.addEventListener) { return function (element, event, handler) { var useCapture = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;

        if (element && event && handler) {
            element.addEventListener(event, handler, useCapture);
        }
    };
} else {
    return function (element, event, handler) {
        if (element && event && handler) {
            element.attachEvent('on'   event, handler);
        }
    };
}

}();

What does the proposed API look like?

can work in vue 3.0

目前的 view-design 不支持 vue3.0

shijunti19 commented 4 years ago

估计要很久吧,目前还有其他支持vue3的ui吗

ok2fly commented 4 years ago

已经过去两个月了,目前 vue3.0 已经 rc2 了,据说下个月 就会有正式版。

vue3.x 全局注册 插件的方法已经和 vue2.x 的接口不一样了,

使用 app.component(组件名) 居然无法注册 郁闷

shijunti19 commented 4 years ago

@ok2fly 我单独处理几个组件,他一直提示:Cannot read property 'prototype' of undefined不知道怎么写了,等官方吧,目前没找到支持vue3(这个vue有点傻和混乱,vue么叫3,vue-cli么叫4,到了客户这里3和4分不清楚了)的ui

wozien commented 3 years ago

目前支持vue3.0 rc的组件库有antd vue和element plus

liubinylx commented 3 years ago

估计要很久吧,目前还有其他支持vue3的ui吗

antdesign支持了

shijunti19 commented 3 years ago

@liubinylx vue3的ts版本官方有bug无法用,好坑

rxxy commented 3 years ago

@liubinylx vue3的ts版本官方有bug无法用,好坑

是吗,今天正式发布了vue3,有什么bug可以给他提丫

dhalturin commented 3 years ago

ViewUI will not be support Vue3?

rowanwins commented 3 years ago

From what I've seen so far there are a few things that need to be addressed

I've not dug too much further into the actual components but some of them will likely require adjustments.

rowanwins commented 3 years ago

I've done some investigation - if anyone is interested they can follow progress here https://github.com/rowanwins/ViewUI/pull/1

toimc commented 3 years ago

I've update babel and add ts support. rowanwins#2

naughtyGitCat commented 3 years ago

It's 2021 now, when will IView add Vue3 support

cluyun commented 3 years ago

还不支持Vue3 ?

cduyzh commented 3 years ago

搞个iview plus版本得了支持vue3

wanghao1993 commented 3 years ago

还不支持。我疯了~今天什么都迁移好了。最后发现iview不支持vue3~

randyFang commented 1 year ago

为什么我vue2 也报这个错