@@ -471,7 +471,13 @@ const rowClick = (row: any, index: number) => {
471471 ] ">
472472</ApiTable >
473473
474- <script lang =" ts " >
474+ <script setup lang =" ts " >
475+ import { useData } from ' vitepress'
476+ import { computed } from ' vue'
477+
478+ const { isDark } = useData ()
479+ const darkMode = computed (() => isDark .value )
480+
475481const columns = [
476482 { ' label' : ' Name' , ' key' : ' name' },
477483 { ' label' : ' Age' , ' key' : ' age' },
@@ -514,30 +520,8 @@ const data = [
514520 { ' name' : ' Joe Black' , ' age' : 30 , ' address' : ' Sydney No. 1 Lake Park' , ' province' : ' Australian' , ' city' : ' Sydney' , ' zip' : 100000 },
515521 { ' name' : ' Jon Snow' , ' age' : 26 , ' address' : ' Ottawa No. 2 Lake Park' , ' province' : ' Canada' , ' city' : ' Ottawa' , ' zip' : 100000 }
516522]
517- import { useData } from ' vitepress'
518- import { computed } from ' vue'
519-
520- const { isDark } = useData ()
521- const darkMode = computed (() => isDark .value )
522523
523- export default {
524- data () {
525- return {
526- columns,
527- slotColumns,
528- fixedColumns,
529- widthColumns,
530- fixedMultiColumns,
531- data,
532- darkMode
533- }
534- },
535- methods: {
536- click (row : any , index : number ) {
537- this .$Message .info ({
538- content: ` Click [ ${ row .name } ] - [ ${ index} ]` ,
539- })
540- }
541- }
524+ const click = (row : any , index : number ) => {
525+ console .log (` Click [ ${ row .name } ] - [ ${ index} ]` )
542526}
543527</script >
0 commit comments