Skip to content

Commit

Permalink
修改 tabs
Browse files Browse the repository at this point in the history
  • Loading branch information
InfernalAzazel committed Nov 26, 2024
1 parent b12fdb7 commit f357e60
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 23 deletions.
19 changes: 0 additions & 19 deletions docs/.vitepress/theme/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,25 +10,6 @@ import naivePro from 'k-naiveui-pro'
export default {
extends: Theme,
enhanceApp({app}) {
const messages = {
'en-US': {
message: {
hello: 'hello world'
}
},
'zh-CN': {
message: {
hello: '你好,世界'
}
}
};
function setupI18n() {
return createI18n({
legacy: false,
locale: 'zh-CN', // 默认语言
messages,
});
}
app.component('demo', DemoBox)
app.use(naive)
app.use(naivePro)
Expand Down
2 changes: 1 addition & 1 deletion docs/cn/other/components/DemoProTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ function handleDropdownSelect(key: string) {
</script>

<template>
<ProTabs v-model="tabs" borderStyle="bottom" @select="handleTabSelect" >
<ProTabs v-model="tabs" @select="handleTabSelect" >
<template #toolbar>
<n-dropdown trigger="hover" :options="dropdownOptions" @select="handleDropdownSelect">
<Icon icon="ant-design:appstore-outlined" height="24" width="24" />
Expand Down
6 changes: 3 additions & 3 deletions packages/k-naiveui-pro/src/components/ProTabs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ const selected = ref(0);
// 动态计算边框样式
const borderClass = computed(() => {
return props.borderStyle === 'bottom'
? 'border-b border-gray-300 dark:border-gray-700'
: 'border border-gray-300 dark:border-gray-700';
? 'border-b border-[var(--border-color)]'
: 'border border-[var(--border-color)]';
});
// 删除选项卡(第一个选项卡不可删除)
Expand Down Expand Up @@ -55,7 +55,7 @@ function handleSelect(index: number) {
</script>

<template>
<n-el class="flex flex-row pr-4" :class="borderClass" tag="div">
<n-el class="flex flex-row items-center pr-4" :class="borderClass" tag="div">
<n-el
class="pro-tabs flex space-x-1 w-full h-[40px] px-[20px] overflow-x-auto overflow-x-hidden text-ellipsis whitespace-nowrap items-center scroll-smooth"
tag="div"
Expand Down

0 comments on commit f357e60

Please sign in to comment.