Reworked Contract View to Vue.js
This commit is contained in:
@@ -1,16 +1,18 @@
|
||||
Vue.component('tt-card', {
|
||||
//language=Vue
|
||||
template: `
|
||||
<div class="card">
|
||||
<div class="card-header" v-if="$slots.header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="card-footer" v-if="$slots.footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
`,
|
||||
<div class="card">
|
||||
<div class="card-header" v-if="$slots.header">
|
||||
<slot name="header"></slot>
|
||||
</div>
|
||||
<div class="card-body" :class="{'pt-0': $slots.header || noBodyPaddingTop}" :style="{'overflow-x': bodyOverflowXAuto ? 'auto' : 'unset'}">
|
||||
<slot></slot>
|
||||
</div>
|
||||
<div class="card-footer" v-if="$slots.footer">
|
||||
<slot name="footer"></slot>
|
||||
</div>
|
||||
</div>
|
||||
`, props: {
|
||||
noBodyPaddingTop: {type: Boolean, default: false}, bodyOverflowXAuto: {type: Boolean, default: false},
|
||||
}
|
||||
})
|
||||
Reference in New Issue
Block a user