https://gitee.com/destiny001/vue_extension

前端开发必读文档:

前端UI组件: Ant Design of Vue
https://www.antdv.com/docs/vue/introduce
报表UI组件:viser-vue
https://viserjs.gitee.io/demo.html#/viser/bar/basic-bar

VUE基础知识:
https://cn.vuejs.org/v2/guide

API

$set

1
2
// 给对象指定属性赋值
this.$set(this.dictOptions, 'eventType', res.result)

问题

打包报错

1
2
3
4
5
6
7
8
9
10
11
12
打包包内存不足问题,解决方案:   

1.安装increase-memory-limit 插件
全局安装 npm install -g increase-memory-limit
然后在当前项目执行 increase-memory-limit

2.修改package.json

启动项,打包项修改为:
"serve": "node —max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js serve —open",

"build": "node —max_old_space_size=4096 node_modules/@vue/cli-service/bin/vue-cli-service.js build —open",

[Vue warn] : Props with type Object/Array must use a factory function to return the default value

解决:把props中的

1
2
3
4
5
6
props:{
obj:{
type:Object,
default:{}
},
},

修改为

1
2
3
4
5
6
props:{
obj:{
type:Object,
default:()=>{}
},
},