133
133
134
134
<h5 class =" mt-3" >None</h5 >
135
135
<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 >
139
139
</b-card >
140
140
<b-table-simple responsive >
141
141
<b-thead >
531
531
>
532
532
<div class =" col-6" >Checked: {{ checkedIndeterminate }}</div >
533
533
</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 >
552
534
<div class =" row mx-4 my-1" >
553
535
<b-form-checkbox v-model =" checkedPlain" class =" col-4" plain >Plain</b-form-checkbox >
554
536
<div class =" col-6 ml-2" >Checked: {{ checkedPlain }}</div >
1272
1254
<div >
1273
1255
<h4 class =" my-3" >Variable width content</h4 >
1274
1256
<div class =" bd-example-row" >
1275
- <b-row align-h =" md- center" >
1257
+ <b-row align-h =" center" >
1276
1258
<b-col lg =" 2" >1 of 3</b-col >
1277
1259
<b-col md =" auto" >Variable width content</b-col >
1278
1260
<b-col lg =" 2" >3 of 3</b-col >
1462
1444
<h2 >Table</h2 >
1463
1445
<div >
1464
1446
<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 >
1466
1448
<template #cell (first_name)="data">
1467
1449
<a href =" #" >{{ data.value }}</a >
1468
1450
</template >
1471
1453
<div >
1472
1454
<h4 class =" my-3" >Table with string field definitions</h4 >
1473
1455
<b-table
1474
- responsive = " xs "
1456
+ responsive
1475
1457
caption =" List of users"
1476
1458
:items =" items"
1477
1459
:fields =" stringTableDefinitions"
1488
1470
<h4 class =" my-3" >Table with object field definitions</h4 >
1489
1471
1490
1472
<b-table
1491
- responsive = " xs "
1473
+ responsive
1492
1474
caption =" List of users"
1493
1475
:items =" items"
1494
1476
:fields =" objectTableDefinitions"
1505
1487
<h4 class =" my-3" >Table: Adding additional rows to the header</h4 >
1506
1488
1507
1489
<b-table
1508
- responsive = " xs "
1490
+ responsive
1509
1491
caption =" List of users"
1510
1492
:items =" items"
1511
1493
:fields =" objectTableDefinitions"
@@ -1906,10 +1888,11 @@ import {
1906
1888
inject ,
1907
1889
onMounted ,
1908
1890
reactive ,
1891
+ Ref ,
1909
1892
ref ,
1910
1893
} from ' vue'
1911
1894
import {useBreadcrumb } from ' ./composables/useBreadcrumb'
1912
- import type {TableField } from ' ./types'
1895
+ import type {TableField , TableItem } from ' ./types'
1913
1896
import {BvEvent } from ' ./utils/bvEvent'
1914
1897
import {ToastInstance , useToast } from ' ./components/BToast/plugin'
1915
1898
@@ -1934,7 +1917,7 @@ export default defineComponent({
1934
1917
const offcanvas = ref (false )
1935
1918
const container = ref (null )
1936
1919
const showToast = ref (true )
1937
- const tableItems = [
1920
+ const tableItems: Array < TableItem > = [
1938
1921
{age: 40 , first_name: ' Dickerson' , last_name: ' Macdonald' },
1939
1922
{age: 21 , first_name: ' Larsen' , last_name: ' Shaw' },
1940
1923
{age: 89 , first_name: ' Geneva' , last_name: ' Wilson' },
@@ -1948,7 +1931,7 @@ export default defineComponent({
1948
1931
{age: 38 , first_name: ' Jami' , last_name: ' Carney' },
1949
1932
]
1950
1933
const stringTableDefinitions = ref ([' last_name' , ' first_name' , ' age' ])
1951
- const objectTableDefinitions = ref < TableField []> ([
1934
+ const objectTableDefinitions: Ref < Array < TableField >> = ref ([
1952
1935
{key: ' last_name' , label: ' Family name' },
1953
1936
{key: ' first_name' , label: ' Given name' },
1954
1937
])
@@ -1971,7 +1954,7 @@ export default defineComponent({
1971
1954
checkedSelectedCars .value = [' Mercedes' , ' Toyota' ]
1972
1955
}
1973
1956
const checkboxes = reactive ({
1974
- status: ' accepted ' ,
1957
+ status: true ,
1975
1958
statusArray: [' accepted' ],
1976
1959
selected: [' pineapple' , {foo: 1 }],
1977
1960
options: [
@@ -2104,10 +2087,8 @@ export default defineComponent({
2104
2087
)
2105
2088
}
2106
2089
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
2111
2092
2112
2093
function onTagState(valid : string [], invalid : string [], duplicate : string []) {
2113
2094
// console.log({
0 commit comments