viserjs / viser

viser is a toolkit fit for data vis engineer. https://viserjs.gitee.io/
https://viserjs.github.io
MIT License
1.61k stars 123 forks source link

使用vite创建的vue3工程,引入viser后页面报错 #635

Open dsjob opened 1 year ago

dsjob commented 1 year ago

一、package.json { "name": "vite-vise-test", "private": true, "version": "0.0.0", "type": "module", "scripts": { "dev": "vite", "build": "vite build", "preview": "vite preview" }, "dependencies": { "viser-vue": "^2.4.8", "vue": "^3.2.47" }, "devDependencies": { "@vitejs/plugin-vue": "^4.1.0", "vite": "^4.3.9" } } 二、main.js

import { createApp } from 'vue' import './style.css' import App from './App.vue' import Viser from 'viser-vue' const app = createApp(App) app.use(Viser) app.mount('#app')

三、浏览器访问错误信息

g2-plugin-slider.js:502 Uncaught TypeError: Cannot assign to read only property 'constructor' of object '#' at _inheritsLoose (g2-plugin-slider.js:502) at g2-plugin-slider.js:518 at Object. (g2-plugin-slider.js:914) at webpack_require (g2-plugin-slider.js:30) at Object. (g2-plugin-slider.js:96) at webpack_require (g2-plugin-slider.js:30) at Object. (g2-plugin-slider.js:80) at __webpack_require__ (g2-plugin-slider.js:30) at g2-plugin-slider.js:73 at g2-plugin-slider.js:74

四、nodejs版本 v16.19.1 五、npm版本 8.19.3

错误信息如下 image

yaozoo commented 1 year ago

好像是不支持vue3