修改样式

master
lzq 2025-08-27 18:13:48 +08:00
parent 437ccc681a
commit 79c9e47df8
3 changed files with 25 additions and 10 deletions

View File

@ -32,20 +32,31 @@ const onBlur = () => {
} }
const inputStatus = ref<'valid' | 'invalid' | 'validating'>('validating') 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<{ const valueRef = reactive<{
key?: string key?: string
label?: 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 visible = ref(false)
const selectedRowKeys = ref<string[]>([]) const selectedRowKeys = ref<string[]>([])
const selectableColumn = reactive<TableColumnSelectable<ComboboxTableTypes.TableData>>({ const selectableColumn = reactive<TableColumnSelectable<ComboboxTableTypes.TableData>>({

View File

@ -103,6 +103,9 @@ function playPhoto(record: TspTypes.TspData) {
photoPanel.value?.open(record.id, record.pointName) photoPanel.value?.open(record.id, record.pointName)
} }
function submitedHandler() {
searchHandler()
}
onMounted(() => { onMounted(() => {
searchHandler() searchHandler()
TspApi.statistics() TspApi.statistics()
@ -178,7 +181,7 @@ onMounted(() => {
</template> </template>
</IxTable> </IxTable>
</IxCard> </IxCard>
<CreateTsp ref="createTsp"/> <CreateTsp ref="createTsp" @submited="submitedHandler"/>
<!--<VideoPanel ref="videoPanel"/>--> <!--<VideoPanel ref="videoPanel"/>-->
<PhotoPanel ref="photoPanel"/> <PhotoPanel ref="photoPanel"/>
</div> </div>

View File

@ -18,7 +18,7 @@ const formGroup = useFormGroup<TspTypes.AddParam>({
// videoUrl: [ undefined, Validators.required ], // videoUrl: [ undefined, Validators.required ],
managerId: [ undefined, Validators.required ], managerId: [ undefined, Validators.required ],
}) })
const emit = defineEmits([ 'submited' ])
const managerTableColumns: TableColumn<TspTypes.TspData>[] = [ const managerTableColumns: TableColumn<TspTypes.TspData>[] = [
{ {
@ -49,6 +49,7 @@ function submit() {
.then(_ => { .then(_ => {
Toast.success('添加成功') Toast.success('添加成功')
formGroup.reset() formGroup.reset()
emit('submited')
}) })
} else { } else {
formGroup.markAsDirty() formGroup.markAsDirty()