refactor: vue3.3 defineOptions
This commit is contained in:
@ -37,11 +37,14 @@
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup name="SystemArea">
|
||||
<script lang="ts" setup>
|
||||
import * as areaApi from '@/api/system/area'
|
||||
import type { FormInstance } from 'element-plus'
|
||||
// import { allSchemas } from './area.data'
|
||||
// import { getAreaByIp, getAreaTree } from '@/api/system/area'
|
||||
|
||||
defineOptions({ name: 'SystemArea' })
|
||||
|
||||
// 遮罩层
|
||||
const loading = ref(true)
|
||||
// 地区列表
|
||||
|
||||
@ -101,7 +101,7 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemDept">
|
||||
<script setup lang="ts">
|
||||
import { handleTree, defaultProps } from '@/utils/tree'
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
import { allSchemas, rules } from './dept.data'
|
||||
@ -109,6 +109,8 @@ import * as DeptApi from '@/api/system/dept'
|
||||
import { getListSimpleUsersApi, UserVO } from '@/api/system/user'
|
||||
import { treeFormatter } from '@/utils'
|
||||
|
||||
defineOptions({ name: 'SystemDept' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -121,7 +121,7 @@
|
||||
</XModal>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemDictType">
|
||||
<script setup lang="ts">
|
||||
import { VxeTableEvents } from 'vxe-table'
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
import * as DictTypeSchemas from './dict.type'
|
||||
@ -130,6 +130,8 @@ import * as DictTypeApi from '@/api/system/dict/dict.type'
|
||||
import * as DictDataApi from '@/api/system/dict/dict.data'
|
||||
import { DictDataVO, DictTypeVO } from '@/api/system/dict/types'
|
||||
|
||||
defineOptions({ name: 'SystemDictType' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -66,12 +66,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemErrorCode">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import { rules, allSchemas } from './errorCode.data'
|
||||
import * as ErrorCodeApi from '@/api/system/errorCode'
|
||||
|
||||
defineOptions({ name: 'SystemErrorCode' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -27,11 +27,13 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemLoginLog">
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import { allSchemas } from './loginLog.data'
|
||||
import { getLoginLogPageApi, exportLoginLogApi, LoginLogVO } from '@/api/system/loginLog'
|
||||
|
||||
defineOptions({ name: 'SystemLoginLog' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
// 列表相关的变量
|
||||
const [registerTable, { exportList }] = useXTable({
|
||||
|
||||
@ -66,12 +66,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemMailAccount">
|
||||
<script setup lang="ts">
|
||||
import { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import { rules, allSchemas } from './account.data'
|
||||
import * as MailAccountApi from '@/api/system/mail/account'
|
||||
|
||||
defineOptions({ name: 'SystemMailAccount' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -49,13 +49,15 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemMailLog">
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import { DICT_TYPE } from '@/utils/dict'
|
||||
import { allSchemas } from './log.data'
|
||||
import * as MailLogApi from '@/api/system/mail/log'
|
||||
import * as MailAccountApi from '@/api/system/mail/account'
|
||||
|
||||
defineOptions({ name: 'SystemMailLog' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// 列表相关的变量
|
||||
|
||||
@ -138,13 +138,15 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemMailTemplate">
|
||||
<script setup lang="ts">
|
||||
import { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import { rules, allSchemas } from './template.data'
|
||||
import * as MailTemplateApi from '@/api/system/mail/template'
|
||||
import * as MailAccountApi from '@/api/system/mail/account'
|
||||
|
||||
defineOptions({ name: 'SystemMailTemplate' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -218,7 +218,7 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemMenu">
|
||||
<script setup lang="ts">
|
||||
import { CACHE_KEY, useCache } from '@/hooks/web/useCache'
|
||||
import { FormInstance } from 'element-plus'
|
||||
// 业务相关的 import
|
||||
@ -229,6 +229,8 @@ import * as MenuApi from '@/api/system/menu'
|
||||
import { allSchemas, rules } from './menu.data'
|
||||
import { treeFormatter } from '@/utils'
|
||||
|
||||
defineOptions({ name: 'SystemMenu' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
const { wsCache } = useCache()
|
||||
|
||||
@ -70,12 +70,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemNotice">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import * as NoticeApi from '@/api/system/notice'
|
||||
import { rules, allSchemas } from './notice.data'
|
||||
|
||||
defineOptions({ name: 'SystemNotice' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -27,11 +27,13 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemNotifyMessage">
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import { allSchemas } from './message.data'
|
||||
import * as NotifyMessageApi from '@/api/system/notify/message'
|
||||
|
||||
defineOptions({ name: 'SystemNotifyMessage' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// 列表相关的变量
|
||||
|
||||
@ -21,11 +21,13 @@
|
||||
</XTable>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script setup lang="ts" name="MyNotifyMessage">
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import { allSchemas } from './my.data'
|
||||
import * as NotifyMessageApi from '@/api/system/notify/message'
|
||||
|
||||
defineOptions({ name: 'MyNotifyMessage' })
|
||||
|
||||
const message = useMessage() // 消息
|
||||
|
||||
// 列表相关的变量
|
||||
|
||||
@ -114,13 +114,15 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemNotifyTemplate">
|
||||
<script setup lang="ts">
|
||||
import { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import { rules, allSchemas } from './template.data'
|
||||
import * as NotifyTemplateApi from '@/api/system/notify/template'
|
||||
import { getListSimpleUsersApi, UserVO } from '@/api/system/user'
|
||||
|
||||
defineOptions({ name: 'SystemNotifyTemplate' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -134,12 +134,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemOAuth2Client">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import * as ClientApi from '@/api/system/oauth2/client'
|
||||
import { rules, allSchemas } from './client.data'
|
||||
|
||||
defineOptions({ name: 'SystemOAuth2Client' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -24,10 +24,12 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemTokenClient">
|
||||
<script setup lang="ts">
|
||||
import { allSchemas } from './token.data'
|
||||
import * as TokenApi from '@/api/system/oauth2/token'
|
||||
|
||||
defineOptions({ name: 'SystemTokenClient' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -41,11 +41,13 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemOperateLog">
|
||||
<script setup lang="ts">
|
||||
// 业务相关的 import
|
||||
import * as OperateLogApi from '@/api/system/operatelog'
|
||||
import { allSchemas } from './operatelog.data'
|
||||
|
||||
defineOptions({ name: 'SystemOperateLog' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
// 列表相关的变量
|
||||
const [registerTable, { exportList }] = useXTable({
|
||||
|
||||
@ -75,12 +75,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemPost">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import * as PostApi from '@/api/system/post'
|
||||
import { rules, allSchemas } from './post.data'
|
||||
|
||||
defineOptions({ name: 'SystemPost' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -157,7 +157,7 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemRole">
|
||||
<script setup lang="ts">
|
||||
import type { ElTree } from 'element-plus'
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
import { handleTree, defaultProps } from '@/utils/tree'
|
||||
@ -169,6 +169,8 @@ import { listSimpleMenusApi } from '@/api/system/menu'
|
||||
import { listSimpleDeptApi } from '@/api/system/dept'
|
||||
import * as PermissionApi from '@/api/system/permission'
|
||||
|
||||
defineOptions({ name: 'SystemRole' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -104,11 +104,13 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemSensitiveWord">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
import * as SensitiveWordApi from '@/api/system/sensitiveWord'
|
||||
import { rules, allSchemas } from './sensitiveWord.data'
|
||||
|
||||
defineOptions({ name: 'SystemSensitiveWord' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -67,12 +67,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemSmsChannel">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import * as SmsChannelApi from '@/api/system/sms/smsChannel'
|
||||
import { rules, allSchemas } from './sms.channel.data'
|
||||
|
||||
defineOptions({ name: 'SystemSmsChannel' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -30,9 +30,12 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemSmsLog">
|
||||
<script setup lang="ts">
|
||||
import { allSchemas } from './sms.log.data'
|
||||
import * as SmsLoglApi from '@/api/system/sms/smsLog'
|
||||
|
||||
defineOptions({ name: 'SystemSmsLog' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
|
||||
// 列表相关的变量
|
||||
|
||||
@ -108,12 +108,14 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemSmsTemplate">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
// 业务相关的 import
|
||||
import * as SmsTemplateApi from '@/api/system/sms/smsTemplate'
|
||||
import { rules, allSchemas } from './sms.template.data'
|
||||
|
||||
defineOptions({ name: 'SystemSmsTemplate' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -85,11 +85,13 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemTenant">
|
||||
<script setup lang="ts">
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
import * as TenantApi from '@/api/system/tenant'
|
||||
import { rules, allSchemas, tenantPackageOption } from './tenant.data'
|
||||
|
||||
defineOptions({ name: 'SystemTenant' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
// 列表相关的变量
|
||||
|
||||
@ -97,7 +97,7 @@
|
||||
</XModal>
|
||||
</ContentWrap>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemTenantPackage">
|
||||
<script setup lang="ts">
|
||||
import { handleTree, defaultProps } from '@/utils/tree'
|
||||
import type { FormExpose } from '@/components/Form'
|
||||
import type { ElTree } from 'element-plus'
|
||||
@ -106,6 +106,8 @@ import { rules, allSchemas } from './tenantPackage.data'
|
||||
import * as TenantPackageApi from '@/api/system/tenantPackage'
|
||||
import { listSimpleMenusApi } from '@/api/system/menu'
|
||||
|
||||
defineOptions({ name: 'SystemTenantPackage' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
@ -267,7 +267,7 @@
|
||||
</template>
|
||||
</XModal>
|
||||
</template>
|
||||
<script setup lang="ts" name="SystemUser">
|
||||
<script setup lang="ts">
|
||||
import type { ElTree, UploadRawFile, UploadInstance } from 'element-plus'
|
||||
import { handleTree, defaultProps } from '@/utils/tree'
|
||||
import download from '@/utils/download'
|
||||
@ -285,6 +285,8 @@ import {
|
||||
PermissionAssignUserRoleReqVO
|
||||
} from '@/api/system/permission'
|
||||
|
||||
defineOptions({ name: 'SystemUser' })
|
||||
|
||||
const { t } = useI18n() // 国际化
|
||||
const message = useMessage() // 消息弹窗
|
||||
|
||||
|
||||
Reference in New Issue
Block a user