Skip to content

Commit 9d079da

Browse files
authored
Merge pull request #440 from VividLemon/globalcomps
Fixed app.vue after global component types change
2 parents 31e9a1e + 5abea66 commit 9d079da

File tree

1 file changed

+15
-34
lines changed

1 file changed

+15
-34
lines changed

src/App.vue

Lines changed: 15 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,9 @@
133133

134134
<h5 class="mt-3">None</h5>
135135
<b-card>
136-
<b-skeleton animation width="85%"></b-skeleton>
137-
<b-skeleton animation width="55%"></b-skeleton>
138-
<b-skeleton animation width="70%"></b-skeleton>
136+
<b-skeleton width="85%"></b-skeleton>
137+
<b-skeleton width="55%"></b-skeleton>
138+
<b-skeleton width="70%"></b-skeleton>
139139
</b-card>
140140
<b-table-simple responsive>
141141
<b-thead>
@@ -531,24 +531,6 @@
531531
>
532532
<div class="col-6">Checked: {{ checkedIndeterminate }}</div>
533533
</div>
534-
<div class="row mx-4 my-1">
535-
<b-form-checkbox
536-
v-model="checkedString"
537-
value="correct"
538-
unchecked-value="incorrect"
539-
class="col-4"
540-
>Bound to string</b-form-checkbox
541-
>
542-
<div class="col-6">Value: {{ checkedString }}</div>
543-
</div>
544-
<div class="mx-4 my-1">
545-
<b-button class="mx-1" variant="primary" @click="checkedString = 'correct'"
546-
>Set correct</b-button
547-
>
548-
<button class="btn btn-primary mx-1" @click="checkedString = 'incorrect'">
549-
Set incorrect
550-
</button>
551-
</div>
552534
<div class="row mx-4 my-1">
553535
<b-form-checkbox v-model="checkedPlain" class="col-4" plain>Plain</b-form-checkbox>
554536
<div class="col-6 ml-2">Checked: {{ checkedPlain }}</div>
@@ -1272,7 +1254,7 @@
12721254
<div>
12731255
<h4 class="my-3">Variable width content</h4>
12741256
<div class="bd-example-row">
1275-
<b-row align-h="md-center">
1257+
<b-row align-h="center">
12761258
<b-col lg="2">1 of 3</b-col>
12771259
<b-col md="auto">Variable width content</b-col>
12781260
<b-col lg="2">3 of 3</b-col>
@@ -1462,7 +1444,7 @@
14621444
<h2>Table</h2>
14631445
<div>
14641446
<h4 class="my-3">Table without field definitions</h4>
1465-
<b-table responsive="xs" caption="List of users" :items="items" striped hover foot-clone>
1447+
<b-table responsive caption="List of users" :items="items" striped hover foot-clone>
14661448
<template #cell(first_name)="data">
14671449
<a href="#">{{ data.value }}</a>
14681450
</template>
@@ -1471,7 +1453,7 @@
14711453
<div>
14721454
<h4 class="my-3">Table with string field definitions</h4>
14731455
<b-table
1474-
responsive="xs"
1456+
responsive
14751457
caption="List of users"
14761458
:items="items"
14771459
:fields="stringTableDefinitions"
@@ -1488,7 +1470,7 @@
14881470
<h4 class="my-3">Table with object field definitions</h4>
14891471

14901472
<b-table
1491-
responsive="xs"
1473+
responsive
14921474
caption="List of users"
14931475
:items="items"
14941476
:fields="objectTableDefinitions"
@@ -1505,7 +1487,7 @@
15051487
<h4 class="my-3">Table: Adding additional rows to the header</h4>
15061488

15071489
<b-table
1508-
responsive="xs"
1490+
responsive
15091491
caption="List of users"
15101492
:items="items"
15111493
:fields="objectTableDefinitions"
@@ -1906,10 +1888,11 @@ import {
19061888
inject,
19071889
onMounted,
19081890
reactive,
1891+
Ref,
19091892
ref,
19101893
} from 'vue'
19111894
import {useBreadcrumb} from './composables/useBreadcrumb'
1912-
import type {TableField} from './types'
1895+
import type {TableField, TableItem} from './types'
19131896
import {BvEvent} from './utils/bvEvent'
19141897
import {ToastInstance, useToast} from './components/BToast/plugin'
19151898
@@ -1934,7 +1917,7 @@ export default defineComponent({
19341917
const offcanvas = ref(false)
19351918
const container = ref(null)
19361919
const showToast = ref(true)
1937-
const tableItems = [
1920+
const tableItems: Array<TableItem> = [
19381921
{age: 40, first_name: 'Dickerson', last_name: 'Macdonald'},
19391922
{age: 21, first_name: 'Larsen', last_name: 'Shaw'},
19401923
{age: 89, first_name: 'Geneva', last_name: 'Wilson'},
@@ -1948,7 +1931,7 @@ export default defineComponent({
19481931
{age: 38, first_name: 'Jami', last_name: 'Carney'},
19491932
]
19501933
const stringTableDefinitions = ref(['last_name', 'first_name', 'age'])
1951-
const objectTableDefinitions = ref<TableField[]>([
1934+
const objectTableDefinitions: Ref<Array<TableField>> = ref([
19521935
{key: 'last_name', label: 'Family name'},
19531936
{key: 'first_name', label: 'Given name'},
19541937
])
@@ -1971,7 +1954,7 @@ export default defineComponent({
19711954
checkedSelectedCars.value = ['Mercedes', 'Toyota']
19721955
}
19731956
const checkboxes = reactive({
1974-
status: 'accepted',
1957+
status: true,
19751958
statusArray: ['accepted'],
19761959
selected: ['pineapple', {foo: 1}],
19771960
options: [
@@ -2104,10 +2087,8 @@ export default defineComponent({
21042087
)
21052088
}
21062089
2107-
function tagValidator(tag: string) {
2108-
// Individual tag validator function
2109-
return tag === tag.toLowerCase() && tag.length > 2 && tag.length < 6
2110-
}
2090+
const tagValidator = (tag: string | undefined) =>
2091+
!!tag && tag === tag.toLowerCase() && tag.length > 2 && tag.length < 6
21112092
21122093
function onTagState(valid: string[], invalid: string[], duplicate: string[]) {
21132094
// console.log({

0 commit comments

Comments
 (0)