refactor: vue3.3 defineOptions

This commit is contained in:
xingyu
2023-06-21 19:14:34 +08:00
parent a5c7c886ee
commit 922f83d99c
259 changed files with 955 additions and 381 deletions

View File

@@ -98,10 +98,12 @@
</template>
</Dialog>
</template>
<script lang="ts" name="InfraFileConfigForm" setup>
<script lang="ts" setup>
import { DICT_TYPE, getDictOptions } from '@/utils/dict'
import * as FileConfigApi from '@/api/infra/fileConfig'
defineOptions({ name: 'InfraFileConfigForm' })
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗
@@ -112,7 +114,7 @@ const formType = ref('') // 表单的类型create - 新增update - 修改
const formData = ref({
id: undefined,
name: '',
storage: '',
storage: 0,
remark: '',
config: {}
})
@@ -184,7 +186,7 @@ const resetForm = () => {
formData.value = {
id: undefined,
name: '',
storage: '',
storage: 0,
remark: '',
config: {}
}

View File

@@ -126,11 +126,14 @@
<!-- 表单弹窗添加/修改 -->
<FileConfigForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts" name="InfraFileConfig">
<script setup lang="ts">
import * as FileConfigApi from '@/api/infra/fileConfig'
import FileConfigForm from './FileConfigForm.vue'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
defineOptions({ name: 'InfraFileConfig' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化