fix
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -96,7 +96,8 @@
|
||||
const onSubmit = () => {
|
||||
brandInfoRef.value
|
||||
.submit()
|
||||
.then(() => {
|
||||
.then((res) => {
|
||||
console.log(res)
|
||||
isEdit.value = false
|
||||
})
|
||||
.catch(() => {})
|
||||
|
||||
@@ -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%;
|
||||
|
||||
Reference in New Issue
Block a user