This commit is contained in:
李志鹏
2026-04-17 10:17:03 +08:00
parent 91cfcd7e40
commit ce6522ef90
3 changed files with 12 additions and 7 deletions

View File

@@ -44,7 +44,7 @@
<a-input
placeholder="https://"
v-for="(v, i) in formData.links"
:key="i"
:key="v + i"
v-model:value="formData.links[i]"
:readonly="!isEdit"
>
@@ -129,10 +129,8 @@
edit()
}
const submit = async () => {
const valid = await formRef.value.validate()
if (!valid) return Promise.reject(false)
console.log(valid)
return valid
await formRef.value.validate()
return JSON.parse(JSON.stringify(formData))
}
defineExpose({
submit

View File

@@ -96,7 +96,8 @@
const onSubmit = () => {
brandInfoRef.value
.submit()
.then(() => {
.then((res) => {
console.log(res)
isEdit.value = false
})
.catch(() => {})

View File

@@ -66,7 +66,9 @@
</div>
</div>
<div class="placeholder" ref="placeholderRef" v-show="!loading"></div>
<div class="footer" v-if="!finish"><a-spin :delay="0.5" v-show="loading" /></div>
<div class="footer" :class="{ null: list.length === 0 }" v-if="!finish">
<a-spin :delay="0.5" v-show="loading" />
</div>
</div>
</div>
</template>
@@ -99,6 +101,7 @@
const nameOrId = ref("")
const list = ref([])
const getList = (isReload = false) => {
if (loading.value) return
loading.value = true
if (isReload) {
list.value = []
@@ -350,6 +353,9 @@
display: flex;
align-items: center;
justify-content: center;
&.null {
height: 30rem;
}
}
> .placeholder {
width: 100%;