| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748 |
- export default {
- name: 'NtRow',
-
- componentName: 'NtRow',
-
- props: {
- tag: {
- type: String,
- default: 'div'
- },
- gutter: Number,
- type: String,
- justify: {
- type: String,
- default: 'start'
- },
- align: {
- type: String,
- default: 'top'
- }
- },
-
- computed: {
- style() {
- const ret = {};
-
- if (this.gutter) {
- ret.marginLeft = `-${this.gutter / 2}px`;
- ret.marginRight = ret.marginLeft;
- }
-
- return ret;
- }
- },
-
- render(h) {
- return h(this.tag, {
- class: [
- 'nt-row',
- this.justify !== 'start' ? `is-justify-${this.justify}` : '',
- this.align !== 'top' ? `is-align-${this.align}` : '',
- { 'nt-row--flex': this.type === 'flex' }
- ],
- style: this.style
- }, this.$slots.default);
- }
- };
-
|