代码格式化问题

This commit is contained in:
周建
2023-06-16 16:31:53 +08:00
parent 6ff7a3c9a9
commit 0e15d393a6
8 changed files with 523 additions and 146 deletions

View File

@ -4,8 +4,13 @@
<XTable @register="registerTable">
<template #toolbar_buttons>
<!-- 操作新增 -->
<XButton type="primary" preIcon="ep:zoom-in" :title="t('action.add')" v-hasPermi="['system:oauth2-client:create']"
@click="handleCreate()" />
<XButton
type="primary"
preIcon="ep:zoom-in"
:title="t('action.add')"
v-hasPermi="['system:oauth2-client:create']"
@click="handleCreate()"
/>
</template>
<template #accessTokenValiditySeconds_default="{ row }">
{{ row.accessTokenValiditySeconds + '秒' }}
@ -14,31 +19,60 @@
{{ row.refreshTokenValiditySeconds + '秒' }}
</template>
<template #authorizedGrantTypes_default="{ row }">
<el-tag :disable-transitions="true" :key="index" v-for="(authorizedGrantType, index) in row.authorizedGrantTypes"
:index="index">
<el-tag
:disable-transitions="true"
:key="index"
v-for="(authorizedGrantType, index) in row.authorizedGrantTypes"
:index="index"
>
{{ authorizedGrantType }}
</el-tag>
</template>
<template #actionbtns_default="{ row }">
<!-- 操作修改 -->
<XTextButton preIcon="ep:edit" :title="t('action.edit')" v-hasPermi="['system:oauth2-client:update']"
@click="handleUpdate(row.id)" />
<XTextButton
preIcon="ep:edit"
:title="t('action.edit')"
v-hasPermi="['system:oauth2-client:update']"
@click="handleUpdate(row.id)"
/>
<!-- 操作详情 -->
<XTextButton preIcon="ep:view" :title="t('action.detail')" v-hasPermi="['system:oauth2-client:query']"
@click="handleDetail(row.id)" />
<XTextButton
preIcon="ep:view"
:title="t('action.detail')"
v-hasPermi="['system:oauth2-client:query']"
@click="handleDetail(row.id)"
/>
<!-- 操作删除 -->
<XTextButton preIcon="ep:delete" :title="t('action.del')" v-hasPermi="['system:oauth2-client:delete']"
@click="deleteData(row.id)" />
<XTextButton
preIcon="ep:delete"
:title="t('action.del')"
v-hasPermi="['system:oauth2-client:delete']"
@click="deleteData(row.id)"
/>
</template>
</XTable>
</ContentWrap>
<!-- 弹窗 -->
<XModal id="postModel" v-model="dialogVisible" :title="dialogTitle"
:height="['create', 'update'].includes(actionType) ? '99%' : ''">
<XModal
id="postModel"
v-model="dialogVisible"
:title="dialogTitle"
:height="['create', 'update'].includes(actionType) ? '99%' : ''"
>
<!-- 表单添加/修改 -->
<Form ref="formRef" v-if="['create', 'update'].includes(actionType)" :schema="allSchemas.formSchema" :rules="rules" />
<Form
ref="formRef"
v-if="['create', 'update'].includes(actionType)"
:schema="allSchemas.formSchema"
:rules="rules"
/>
<!-- 表单详情 -->
<Descriptions v-if="actionType === 'detail'" :schema="allSchemas.detailSchema" :data="detailData">
<Descriptions
v-if="actionType === 'detail'"
:schema="allSchemas.detailSchema"
:data="detailData"
>
<template #accessTokenValiditySeconds="{ row }">
{{ row.accessTokenValiditySeconds + '秒' }}
</template>
@ -46,32 +80,55 @@
{{ row.refreshTokenValiditySeconds + '秒' }}
</template>
<template #authorizedGrantTypes="{ row }">
<el-tag :disable-transitions="true" :key="index" v-for="(authorizedGrantType, index) in row.authorizedGrantTypes"
:index="index">
<el-tag
:disable-transitions="true"
:key="index"
v-for="(authorizedGrantType, index) in row.authorizedGrantTypes"
:index="index"
>
{{ authorizedGrantType }}
</el-tag>
</template>
<template #scopes="{ row }">
<el-tag :disable-transitions="true" :key="index" v-for="(scopes, index) in row.scopes" :index="index">
<el-tag
:disable-transitions="true"
:key="index"
v-for="(scopes, index) in row.scopes"
:index="index"
>
{{ scopes }}
</el-tag>
</template>
<template #autoApproveScopes="{ row }">
<el-tag :disable-transitions="true" :key="index" v-for="(autoApproveScopes, index) in row.autoApproveScopes"
:index="index">
<el-tag
:disable-transitions="true"
:key="index"
v-for="(autoApproveScopes, index) in row.autoApproveScopes"
:index="index"
>
{{ autoApproveScopes }}
</el-tag>
</template>
<template #redirectUris="{ row }">
<el-tag :disable-transitions="true" :key="index" v-for="(redirectUris, index) in row.redirectUris" :index="index">
<el-tag
:disable-transitions="true"
:key="index"
v-for="(redirectUris, index) in row.redirectUris"
:index="index"
>
{{ redirectUris }}
</el-tag>
</template>
</Descriptions>
<template #footer>
<!-- 按钮保存 -->
<XButton v-if="['create', 'update'].includes(actionType)" type="primary" :title="t('action.save')"
:loading="actionLoading" @click="submitForm()" />
<XButton
v-if="['create', 'update'].includes(actionType)"
type="primary"
:title="t('action.save')"
:loading="actionLoading"
@click="submitForm()"
/>
<!-- 按钮关闭 -->
<XButton :loading="actionLoading" :title="t('dialog.close')" @click="dialogVisible = false" />
</template>