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

按文档正常引入严重报错 #5

Closed
beierzhijin opened this issue Sep 15, 2022 · 3 comments
Closed

按文档正常引入严重报错 #5

beierzhijin opened this issue Sep 15, 2022 · 3 comments

Comments

@beierzhijin
Copy link

"vue": "2.6.14", "@xpyjs/gantt-vue2": "^1.0.1",
image

@jeremyjone
Copy link
Collaborator

具体代码

@jxh-0514
Copy link

我现在也是这样报错

<script> import Vue from "vue"; import XGantt from "@xpyjs/gantt-vue2"; import "@xpyjs/gantt-vue2/lib/index.css"; Vue.use(XGantt); export default { components: {}, data() { return { dataList: [ { index: 1, startDate: "2020-06-05", endDate: "2020-08-20", ttt: { a: "aaa", b: "bbb", }, name: "mydata1", children: [], // children 是必须的,如果没有,给一个空数组即可 }, { index: 2, startDate: "2020-07-07", endDate: "2020-09-11", ttt: {}, name: "mydata2", children: [ { index: 3, startDate: "2020-07-10", endDate: "2020-08-15", ttt: { a: "aaa", }, name: "child1", children: [], // children 是必须的,如果没有,给一个空数组即可 }, ], }, ], }; }, computed: {}, watch: {}, destroyed() {}, //生命周期 - 创建完成(可以访问当前this实例) created() {}, //生命周期 - 挂载完成(可以访问DOM元素) mounted() {}, methods: {}, }; </script> <style lang="scss" scoped></style>

具体代码

@jeremyjone
Copy link
Collaborator

已更新至 v1.0.3

同时,要确保项目使用 v2.7 以下版本的 vue 以及 vue-template-compiler,如图:

image

如果版本号前面有 ^,请去掉。

原因:
默认安装 2.7+版本,与当前版本有冲突。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants