fix: 解决商品上一版遗留的各种小bug关键部分已添加fix注释。完成的TODO也已添加fix标记

This commit is contained in:
puhui999
2023-05-17 18:24:34 +08:00
parent 3c4a39df01
commit 4ddba9d454
10 changed files with 216 additions and 218 deletions

View File

@@ -54,14 +54,14 @@ const inputVisible = computed(() => (index) => {
const InputRef = ref() //标签输入框Ref
const attributeList = ref([]) // 商品属性列表
const props = defineProps({
attributeData: {
propertyList: {
type: Array,
default: () => {}
}
})
watch(
() => props.attributeData,
() => props.propertyList,
(data) => {
if (!data) return
attributeList.value = data
@@ -80,6 +80,7 @@ const handleClose = (index, valueIndex) => {
/** 显示输入框并获取焦点 */
const showInput = async (index) => {
attributeIndex.value = index
// TODO 嗯!!!自动获取焦点还是有点问题,后续继续改进
// 因为组件在ref中所以需要用索引获取对应的Ref
InputRef.value[index]!.input!.focus()
}