mirror of
https://gitee.com/vant-contrib/vant-weapp.git
synced 2025-04-06 03:58:05 +08:00
25 lines
441 B
JavaScript
25 lines
441 B
JavaScript
import { create } from '../common/create';
|
|
|
|
create({
|
|
relations: {
|
|
'../row/index': {
|
|
type: 'ancestor'
|
|
}
|
|
},
|
|
|
|
props: {
|
|
span: Number,
|
|
offset: Number
|
|
},
|
|
|
|
methods: {
|
|
setGutter(gutter) {
|
|
const padding = `${gutter / 2}px`;
|
|
const style = gutter ? `padding-left: ${padding}; padding-right: ${padding};` : '';
|
|
if (style !== this.data.style) {
|
|
this.setData({ style });
|
|
}
|
|
}
|
|
}
|
|
});
|