Add ability to toggle block border
This commit is contained in:
parent
3af167c1d6
commit
ee392ecf16
@ -96,6 +96,13 @@
|
||||
>
|
||||
{{ $t('general.wrap') }}
|
||||
</b-form-checkbox>
|
||||
|
||||
<b-form-checkbox
|
||||
v-model="block.style.border.enabled"
|
||||
switch
|
||||
>
|
||||
{{ $t('general.border.show') }}
|
||||
</b-form-checkbox>
|
||||
</b-col>
|
||||
|
||||
<b-col
|
||||
|
||||
@ -2,7 +2,7 @@
|
||||
<div class="h-100">
|
||||
<b-card
|
||||
no-body
|
||||
class="h-100 border-0 shadow"
|
||||
class="h-100 shadow"
|
||||
:class="blockClass"
|
||||
>
|
||||
<b-card-header
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="h-100">
|
||||
<div
|
||||
class="d-flex flex-column border position-relative h-100 card bg-transparent"
|
||||
class="card bg-transparent h-100"
|
||||
:class="blockClass"
|
||||
>
|
||||
<div
|
||||
|
||||
@ -22,6 +22,7 @@ export default {
|
||||
blockClass () {
|
||||
return [
|
||||
'block',
|
||||
{ border: this.block.style.border.enabled },
|
||||
this.block.kind,
|
||||
]
|
||||
},
|
||||
|
||||
@ -9,9 +9,14 @@ interface PageBlockStyleWrap {
|
||||
kind: string;
|
||||
}
|
||||
|
||||
interface PageBlockStyleBorder {
|
||||
enabled?: boolean;
|
||||
}
|
||||
|
||||
interface PageBlockStyle {
|
||||
variants: PageBlockStyleVariants;
|
||||
wrap?: PageBlockStyleWrap;
|
||||
border?: PageBlockStyleBorder;
|
||||
}
|
||||
|
||||
export type PageBlockInput = PageBlock | Partial<PageBlock>
|
||||
@ -36,6 +41,9 @@ export class PageBlock {
|
||||
wrap: {
|
||||
kind: 'card',
|
||||
},
|
||||
border: {
|
||||
enabled: false,
|
||||
},
|
||||
}
|
||||
|
||||
constructor (i?: PageBlockInput) {
|
||||
|
||||
@ -125,6 +125,8 @@ general:
|
||||
show: Show refresh button
|
||||
description: Setting value to 5 seconds or more enables auto-refresh
|
||||
rate: seconds
|
||||
border:
|
||||
show: Show border
|
||||
label:
|
||||
add: Add
|
||||
back: Back
|
||||
|
||||
@ -71,8 +71,9 @@ type (
|
||||
}
|
||||
|
||||
PageBlockStyle struct {
|
||||
Variants map[string]string `json:"variants,omitempty"`
|
||||
Wrap map[string]string `json:"wrap,omitempty"`
|
||||
Variants map[string]string `json:"variants,omitempty"`
|
||||
Wrap map[string]string `json:"wrap,omitempty"`
|
||||
Border map[string]interface{} `json:"border,omitempty"`
|
||||
}
|
||||
|
||||
PageButton struct {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user