fix: 金额编辑器小数位溢出挤位 + 编辑页自动聚焦 + 周期账单移除冗余聚焦
This commit is contained in:
@@ -195,6 +195,7 @@ onMounted(async () => {
|
||||
// 等待分类列表渲染完成后滚动到选中项
|
||||
nextTick(() => {
|
||||
setTimeout(() => { scrollToCat.value = 'cat-' + existing.category_id }, 200)
|
||||
amountEditorRef.value?.focus()
|
||||
})
|
||||
} else {
|
||||
uni.showToast({ title: '记录不存在', icon: 'none' })
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref, computed, onMounted, nextTick } from 'vue'
|
||||
import { ref, computed, onMounted } from 'vue'
|
||||
import { waitForReady } from '@/utils/app-ready'
|
||||
import { statusBarHeight, capsuleRight } from '@/utils/system'
|
||||
import { formatAmount } from '@/utils/format'
|
||||
@@ -233,7 +233,6 @@ function openAddModal() {
|
||||
if (cats.length > 0) form.value.category_id = cats[0].id
|
||||
amountStr.value = ''
|
||||
showModal.value = true
|
||||
nextTick(() => amountEditorRef.value?.focus())
|
||||
}
|
||||
|
||||
function openEditModal(item: RecurringTemplate) {
|
||||
@@ -248,7 +247,6 @@ function openEditModal(item: RecurringTemplate) {
|
||||
}
|
||||
amountStr.value = (item.amount / 100).toString()
|
||||
showModal.value = true
|
||||
nextTick(() => amountEditorRef.value?.focus())
|
||||
}
|
||||
|
||||
async function toggleActive(item: RecurringTemplate) {
|
||||
|
||||
Reference in New Issue
Block a user