mirror of
https://git.meshkee.com/cssd/cssd-back.git
synced 2026-10-13 19:11:06 +03:30
init project
This commit is contained in:
@@ -0,0 +1,49 @@
|
||||
<template>
|
||||
<div
|
||||
:style="styles"
|
||||
:class="classes"
|
||||
class="v-offset"
|
||||
>
|
||||
<slot />
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
props: {
|
||||
fullWidth: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
offset: {
|
||||
type: [Number, String],
|
||||
default: 0
|
||||
}
|
||||
},
|
||||
|
||||
computed: {
|
||||
classes () {
|
||||
return {
|
||||
'v-offset--full-width': this.fullWidth
|
||||
}
|
||||
},
|
||||
styles () {
|
||||
return {
|
||||
top: `-${this.offset}px`,
|
||||
marginBottom: `-${this.offset}px`
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style>
|
||||
.v-offset {
|
||||
margin: 0 auto;
|
||||
max-width: calc(100% - 32px);
|
||||
position: relative;
|
||||
}
|
||||
.v-offset--full-width {
|
||||
max-width: 100%;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user