1234567891011121314151617181920212223 |
- import { VantComponent } from '../common/component';
- VantComponent({
- relation: {
- name: 'row',
- type: 'ancestor'
- },
- props: {
- span: Number,
- offset: Number
- },
- data: {
- style: ''
- },
- 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 });
- }
- }
- }
- });
|