refactor: vue3.3 defineOptions

This commit is contained in:
shizhong
2023-09-22 12:49:25 +08:00
parent 6ec2ee8af4
commit 20f483f561
189 changed files with 589 additions and 187 deletions

View File

@ -38,10 +38,13 @@
</template>
</Dialog>
</template>
<script setup lang="ts" name="ExpressForm">
<script setup lang="ts">
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { CommonStatusEnum } from '@/utils/constants'
import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
defineOptions({ name: 'ExpressForm' })
const { t } = useI18n() // 国际化
const message = useMessage() // 消息弹窗

View File

@ -99,12 +99,15 @@
<!-- 表单弹窗添加/修改 -->
<ExpressForm ref="formRef" @success="getList" />
</template>
<script setup lang="ts" name="Express">
<script setup lang="ts">
import { DICT_TYPE } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
import download from '@/utils/download'
import * as DeliveryExpressApi from '@/api/mall/trade/delivery/express'
import ExpressForm from './ExpressForm.vue'
defineOptions({ name: 'Express' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化
const total = ref(0) // 列表的总页数

View File

@ -111,12 +111,14 @@
<!-- 表单弹窗添加/修改 -->
<DeliveryPickUpStoreForm ref="formRef" @success="getList" />
</template>
<script lang="ts" name="DeliveryPickUpStore" setup>
<script lang="ts" setup>
import * as DeliveryPickUpStoreApi from '@/api/mall/trade/delivery/pickUpStore'
import DeliveryPickUpStoreForm from './PickUpStoreForm.vue'
import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
import { dateFormatter } from '@/utils/formatTime'
defineOptions({ name: 'DeliveryPickUpStore' })
const message = useMessage() // 消息弹窗
const { t } = useI18n() // 国际化