mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
29 lines
468 B
JavaScript
29 lines
468 B
JavaScript
const ROW_PATH = '../row/index';
|
|
|
|
Component({
|
|
options: {
|
|
addGlobalClass: true
|
|
},
|
|
|
|
externalClasses: ['custom-class'],
|
|
|
|
relations: {
|
|
[ROW_PATH]: {
|
|
type: 'ancestor'
|
|
}
|
|
},
|
|
|
|
properties: {
|
|
span: Number,
|
|
offset: Number
|
|
},
|
|
|
|
methods: {
|
|
setGutter(gutter) {
|
|
const padding = `${gutter / 2}px`;
|
|
const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : '';
|
|
this.setData({ style });
|
|
}
|
|
}
|
|
});
|