修改样式
parent
437ccc681a
commit
79c9e47df8
|
|
@ -32,20 +32,31 @@ const onBlur = () => {
|
|||
}
|
||||
|
||||
const inputStatus = ref<'valid' | 'invalid' | 'validating'>('validating')
|
||||
controlRef.value?.watchValue((newVal) => {
|
||||
console.log(222, controlRef.value?.valid, newVal)
|
||||
if (controlRef.value?.valid.value) {
|
||||
inputStatus.value = 'valid'
|
||||
} else {
|
||||
inputStatus.value = 'invalid'
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
const valueRef = reactive<{
|
||||
key?: string
|
||||
label?: string
|
||||
}>({})
|
||||
controlRef.value?.watchStatus(it => {
|
||||
if (it === 'valid') {
|
||||
inputStatus.value = 'valid'
|
||||
} else if (it === 'invalid') {
|
||||
if (controlRef.value?.dirty.value) {
|
||||
inputStatus.value = 'invalid'
|
||||
} else {
|
||||
inputStatus.value = 'validating'
|
||||
}
|
||||
} else {
|
||||
inputStatus.value = 'validating'
|
||||
}
|
||||
})
|
||||
|
||||
controlRef.value?.watchValue((newVal) => {
|
||||
if (newVal == null) {
|
||||
valueRef.label = ''
|
||||
}
|
||||
})
|
||||
const visible = ref(false)
|
||||
const selectedRowKeys = ref<string[]>([])
|
||||
const selectableColumn = reactive<TableColumnSelectable<ComboboxTableTypes.TableData>>({
|
||||
|
|
|
|||
|
|
@ -103,6 +103,9 @@ function playPhoto(record: TspTypes.TspData) {
|
|||
photoPanel.value?.open(record.id, record.pointName)
|
||||
}
|
||||
|
||||
function submitedHandler() {
|
||||
searchHandler()
|
||||
}
|
||||
onMounted(() => {
|
||||
searchHandler()
|
||||
TspApi.statistics()
|
||||
|
|
@ -178,7 +181,7 @@ onMounted(() => {
|
|||
</template>
|
||||
</IxTable>
|
||||
</IxCard>
|
||||
<CreateTsp ref="createTsp"/>
|
||||
<CreateTsp ref="createTsp" @submited="submitedHandler"/>
|
||||
<!--<VideoPanel ref="videoPanel"/>-->
|
||||
<PhotoPanel ref="photoPanel"/>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ const formGroup = useFormGroup<TspTypes.AddParam>({
|
|||
// videoUrl: [ undefined, Validators.required ],
|
||||
managerId: [ undefined, Validators.required ],
|
||||
})
|
||||
|
||||
const emit = defineEmits([ 'submited' ])
|
||||
|
||||
const managerTableColumns: TableColumn<TspTypes.TspData>[] = [
|
||||
{
|
||||
|
|
@ -49,6 +49,7 @@ function submit() {
|
|||
.then(_ => {
|
||||
Toast.success('添加成功')
|
||||
formGroup.reset()
|
||||
emit('submited')
|
||||
})
|
||||
} else {
|
||||
formGroup.markAsDirty()
|
||||
|
|
|
|||
Loading…
Reference in New Issue