|
1 | 1 | <template> |
2 | | - <btnMenu |
3 | | - :show_cases="show_cases" |
4 | | - :button-text="$t('buttons.docs')" |
5 | | - icon="book-open" |
6 | | - :is-json="true" |
7 | | - > |
8 | | - <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"> |
9 | | - <path |
10 | | - fill="#fff" |
11 | | - d="M8 13h8v-2H8zm0 3h8v-2H8zm0 3h5v-2H8zm-2 3q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h8l6 6v12q0 .825-.587 1.413T18 22zm7-13V4H6v16h12V9zM6 4v5zv16z" |
12 | | - /> |
13 | | - </svg> |
14 | | - </btnMenu> |
| 2 | + <div class="dropdown-container" @click="openDocs"> |
| 3 | + <span class="slot-container"> |
| 4 | + <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24"> |
| 5 | + <path |
| 6 | + fill="#fff" |
| 7 | + d="M8 13h8v-2H8zm0 3h8v-2H8zm0 3h5v-2H8zm-2 3q-.825 0-1.412-.587T4 20V4q0-.825.588-1.412T6 2h8l6 6v12q0 .825-.587 1.413T18 22zm7-13V4H6v16h12V9zM6 4v5zv16z" |
| 8 | + /> |
| 9 | + </svg> |
| 10 | + </span> |
| 11 | + <span class="button-text">{{ $t('buttons.docs') }}</span> |
| 12 | + </div> |
| 13 | + |
15 | 14 | </template> |
16 | 15 | <script setup lang="ts"> |
17 | | - import btnMenu from '@/components/modules/btnMenu.vue' |
18 | | - import { onMounted, ref, watch } from 'vue' |
19 | | - import { useI18n } from 'vue-i18n' |
20 | | - // import { useDatasetStore } from '@/stores/datasetStore' |
21 | | - // const datasetStore = useDatasetStore() |
| 16 | + const openDocs = () => { |
| 17 | + window.open('https://docs.bizyair.cn/', '_blank') |
| 18 | + } |
| 19 | +</script> |
| 20 | +<style scoped> |
| 21 | + .dropdown-container { |
| 22 | + display: flex; |
| 23 | + align-items: center; |
| 24 | + cursor: pointer; |
| 25 | + position: relative; |
| 26 | + padding: 0 12px; |
| 27 | + border-radius: 4px; |
| 28 | + transition: all 0.3s; |
| 29 | + } |
22 | 30 |
|
23 | | - const { t, locale } = useI18n() |
| 31 | + .dropdown-container:hover { |
| 32 | + background-color: #4a238e; |
| 33 | + } |
24 | 34 |
|
25 | | - const show_cases = ref({}) |
26 | | - show_cases.value = { |
27 | | - [t('btnDocs.price')]: 'https://price.bizyair.cn/', |
28 | | - [t('btnDocs.doc')]: 'https://docs.bizyair.cn/' |
| 35 | + .slot-container { |
| 36 | + margin-right: 4px; |
| 37 | + height: 16px; |
29 | 38 | } |
30 | | - watch(locale, () => { |
31 | | - show_cases.value = { |
32 | | - [t('btnDocs.price')]: 'https://price.bizyair.cn/', |
33 | | - [t('btnDocs.doc')]: 'https://docs.bizyair.cn/' |
34 | | - } |
35 | | - }) |
36 | | - onMounted(() => {}) |
37 | | -</script> |
38 | | -<style scoped></style> |
| 39 | +
|
| 40 | + .button-text { |
| 41 | + display: block; |
| 42 | + line-height: 32px; |
| 43 | + font-size: 14px; |
| 44 | + } |
| 45 | +</style> |
0 commit comments