Highlight.vue 560 B

1234567891011121314151617181920
  1. <script setup lang="ts">
  2. import { ContentWrap } from '@/components/ContentWrap'
  3. import { useI18n } from '@/hooks/web/useI18n'
  4. import { Highlight } from '@/components/Highlight'
  5. import { ElMessage } from 'element-plus'
  6. const { t } = useI18n()
  7. const keyClick = (key: string) => {
  8. ElMessage.info(key)
  9. }
  10. </script>
  11. <template>
  12. <ContentWrap :title="t('highlightDemo.highlight')">
  13. <Highlight :keys="[t('highlightDemo.keys1'), t('highlightDemo.keys2')]" @click="keyClick">
  14. {{ t('highlightDemo.message') }}
  15. </Highlight>
  16. </ContentWrap>
  17. </template>