全局配置
... 2021-7-29 Less than 1 minute
# 全局配置
在引入 Avue 时,可以传入一个全局配置对象
Vue.use(AVUE,{
size:'',
crudOption:{},
formOption:{},
tableSize:'',
formSize:''
appendToBody:true,
modalAppendToBody:true,
cos:{},
qiniu:{},
ali:{},
canvas:{}
});
1
2
3
4
5
6
7
8
9
10
11
12
13
2
3
4
5
6
7
8
9
10
11
12
13
- size:用于改变组件的默认尺寸,属性的组件的默认尺寸均为
small
。可选值small
/mini
/medium
; - crudOption:全局Crud组件的默认配置
{
index:true,
indexLabel:'序号',
....
}
1
2
3
4
5
2
3
4
5
- formOption:全局Form组件的默认配置
{
labelWidth:110,
....
}
1
2
3
4
2
3
4
- qiniu 七牛云配置
{
AK: '',
SK: '',
scope: '',
url: '',
deadline: 1
}
1
2
3
4
5
6
7
2
3
4
5
6
7
- ali 阿里云配置
{
region: '',
endpoint: '',
accessKeyId: '',
accessKeySecret: '',
bucket: '',
}
1
2
3
4
5
6
7
2
3
4
5
6
7
- cos 腾讯云配置
{
SecretId: '',
SecretKey: '',
Bucket: '',
Region: ''
}
1
2
3
4
5
6
2
3
4
5
6
- canvas全局水印配置
{
text: 'avuejs.com',
fontFamily: 'microsoft yahei',
color: "#999",
fontSize: 16,
opacity: 100,
bottom: 10,
right: 10,
ratio: 1
}
1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10