feat(下划线元素): 位置根据语言切换重新计算
This commit is contained in:
parent
75163ce927
commit
ca1feeebe1
@ -202,6 +202,10 @@ const setActiveTab = (index) => {
|
||||
const underlineStyle = computed(() => {
|
||||
console.log('计算属性')
|
||||
|
||||
// 访问 locale.value 使其成为依赖项
|
||||
const currentLocale = locale.value
|
||||
console.log('当前语言:', currentLocale)
|
||||
|
||||
if (tabItems.value.length === 0) return {} //没有这个元素
|
||||
const activeTab = tabItems.value[activeIndex.value]
|
||||
console.log('选中元素的左边距', activeTab.offsetLeft)
|
||||
|
||||
@ -314,6 +314,10 @@ const switchTab = async (tab) => {
|
||||
const underlineStyle = computed(() => {
|
||||
console.log('计算属性')
|
||||
|
||||
// 访问 locale.value 使其成为依赖项
|
||||
const currentLocale = locale.value
|
||||
console.log('当前语言:', currentLocale)
|
||||
|
||||
if (tabItems.value.length === 0) return {} //没有这个元素
|
||||
const activeTab = tabItems.value[selectedTab.value.id]
|
||||
console.log('选中元素的左边距', activeTab.offsetLeft)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user