2
0
mirror of https://github.com/frappe/books.git synced 2025-02-11 00:18:45 +00:00
books/src/components/Row.vue
Faris Ansari 6892895215 feat: Misc
- Table control
- FormControl (size=small)
- DatabaseSelector
- SetupWizard
- Tax Quick Edit
- AutoComplete
- Link extends from AutoComplete
2019-10-13 17:33:01 +05:30

35 lines
603 B
Vue

<template>
<div class="grid border-b" :style="style">
<slot></slot>
</div>
</template>
<script>
export default {
name: 'Row',
props: {
columnCount: {
type: Number,
default: 0
},
ratio: {
type: Array,
default: () => []
}
},
computed: {
style() {
if (this.columnCount) {
return {
'grid-template-columns': `repeat(${this.columnCount}, 1fr)`
}
}
if (this.ratio.length) {
return {
'grid-template-columns': this.ratio.map(r => `${r}fr`).join(' ')
}
}
}
}
}
</script>