ViewUI icon indicating copy to clipboard operation
ViewUI copied to clipboard

[Feature Request]missing vue3.0 support

Open ok2fly opened this issue 4 years ago • 16 comments

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

ok2fly avatar May 29 '20 08:05 ok2fly

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

shijunti19 avatar Jul 20 '20 15:07 shijunti19

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

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

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

ok2fly avatar Jul 21 '20 08:07 ok2fly

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

shijunti19 avatar Jul 21 '20 08:07 shijunti19

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

wozien avatar Sep 16 '20 07:09 wozien

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

antdesign支持了

liubinylx avatar Sep 17 '20 01:09 liubinylx

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

shijunti19 avatar Sep 17 '20 01:09 shijunti19

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

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

rxxy avatar Sep 19 '20 13:09 rxxy

ViewUI will not be support Vue3?

dhalturin avatar Oct 05 '20 00:10 dhalturin

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

  • replacing the use of isServer, although I can't actually find any official documentation on how this deprecation is supposed to be handled (although the method in vue2 wasn't overly complicated)

  • replacing the use of Vue.prototype with globalProperties

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

rowanwins avatar Oct 07 '20 22:10 rowanwins

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

rowanwins avatar Oct 09 '20 08:10 rowanwins

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

toimc avatar Nov 11 '20 23:11 toimc

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

naughtyGitCat avatar Jan 04 '21 09:01 naughtyGitCat

还不支持Vue3 ?

cluyun avatar Jan 06 '21 13:01 cluyun

搞个iview plus版本得了支持vue3

cduyzh avatar Feb 19 '21 06:02 cduyzh

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

wanghao1993 avatar Jul 18 '21 10:07 wanghao1993

为什么我vue2 也报这个错

randyFang avatar Oct 10 '22 07:10 randyFang