Browse Source

👕 按钮样式

pull/27/head
王军 5 years ago
parent
commit
74f7f77e75
  1. 49
      vben271/src/views/admin/roles/AbpRole.vue
  2. 50
      vben271/src/views/admin/users/AbpUser.vue
  3. 36
      vben271/src/views/identityServers/apiResources/ApiResources.vue
  4. 36
      vben271/src/views/identityServers/apiScopes/ApiScopes.vue
  5. 75
      vben271/src/views/identityServers/clients/Clients.vue
  6. 34
      vben271/src/views/identityServers/identityResources/IdentityResources.vue
  7. 35
      vben271/src/views/tenants/Tenant.vue

49
vben271/src/views/admin/roles/AbpRole.vue

@ -10,6 +10,7 @@
<template #toolbar> <template #toolbar>
<a-button <a-button
type="primary" type="primary"
preIcon="ant-design:plus-circle-outlined"
@click="openCreateAbpRoleModal" @click="openCreateAbpRoleModal"
v-auth="'AbpIdentity.Roles.Create'" v-auth="'AbpIdentity.Roles.Create'"
> >
@ -18,32 +19,28 @@
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<a-button <TableAction
type="link" :actions="[
size="small" {
@click="handlePermission(record)" auth: 'AbpIdentity.Roles.ManagePermissions',
v-auth="'AbpIdentity.Roles.ManagePermissions'" label: t('routes.admin.roleManagement_permission'),
> icon: 'ant-design:property-safety-outlined',
{{ t('routes.admin.roleManagement_permission') }} onClick: handlePermission.bind(null, record),
</a-button> },
]"
<a-button :dropDownActions="[
type="link" {
size="small" auth: 'AbpIdentity.Roles.Update',
@click="handleEdit(record)" label: t('common.editText'),
v-auth="'AbpIdentity.Roles.Update'" onClick: handleEdit.bind(null, record),
> },
{{ t('common.editText') }} {
</a-button> auth: 'AbpIdentity.Roles.Delete',
label: t('common.delText'),
<a-button onClick: handleDelete.bind(null, record),
type="link" },
size="small" ]"
@click="handleDelete(record)" />
v-auth="'AbpIdentity.Roles.Delete'"
>
{{ t('common.delText') }}
</a-button>
</template> </template>
</BasicTable> </BasicTable>

50
vben271/src/views/admin/users/AbpUser.vue

@ -3,6 +3,7 @@
<BasicTable @register="registerTable" size="small"> <BasicTable @register="registerTable" size="small">
<template #toolbar> <template #toolbar>
<a-button <a-button
preIcon="ant-design:plus-circle-outlined"
type="primary" type="primary"
@click="openCreateAbpUserModal" @click="openCreateAbpUserModal"
v-auth="'AbpIdentity.Users.Create'" v-auth="'AbpIdentity.Users.Create'"
@ -16,31 +17,28 @@
</Tag> </Tag>
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<a-button <TableAction
type="link" :actions="[
size="small" {
@click="handleEdit(record)" icon: 'ant-design:edit-outlined',
v-auth="'AbpIdentity.Users.Update'" auth: 'AbpIdentity.Users.Update',
> label: t('common.editText'),
{{ t('common.editText') }} onClick: handleEdit.bind(null, record),
</a-button> },
]"
<a-button :dropDownActions="[
type="link" {
size="small" auth: 'AbpIdentity.Users.Delete',
@click="handleDelete(record)" label: t('common.delText'),
v-auth="'AbpIdentity.Users.Delete'" onClick: handleDelete.bind(null, record),
> },
{{ t('common.delText') }} {
</a-button> auth: 'System.Users.Enable',
<a-button label: !record.isActive ? t('common.enabled') : t('common.disEnabled'),
type="link" onClick: handleLock.bind(null, record),
size="small" },
@click="handleLock(record)" ]"
v-auth="'System.Users.Enable'" />
>
{{ !record.isActive ? t('common.enabled') : t('common.disEnabled') }}
</a-button>
</template> </template>
</BasicTable> </BasicTable>
<CreateAbpUser <CreateAbpUser
@ -113,7 +111,7 @@
canResize: true, canResize: true,
showIndexColumn: true, showIndexColumn: true,
actionColumn: { actionColumn: {
width: 250, width: 120,
title: t('common.action'), title: t('common.action'),
dataIndex: 'action', dataIndex: 'action',
slots: { slots: {

36
vben271/src/views/identityServers/apiResources/ApiResources.vue

@ -3,6 +3,7 @@
<BasicTable @register="registerTable" size="small"> <BasicTable @register="registerTable" size="small">
<template #toolbar> <template #toolbar>
<a-button <a-button
preIcon="ant-design:plus-circle-outlined"
type="primary" type="primary"
@click="openCreateApiResourceModal" @click="openCreateApiResourceModal"
v-auth="'IdentityServerManagement.ApiResource.Create'" v-auth="'IdentityServerManagement.ApiResource.Create'"
@ -21,23 +22,22 @@
</Tag> </Tag>
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<a-button <TableAction
type="link" :actions="[
size="small" {
@click="handleEdit(record)" auth: 'IdentityServerManagement.ApiResource.Update',
v-auth="'IdentityServerManagement.ApiResource.Update'" label: t('common.editText'),
> icon: 'ant-design:edit-outlined',
{{ t('common.editText') }} onClick: handleEdit.bind(null, record),
</a-button> },
{
<a-button icon: 'ic:outline-delete-outline',
type="link" auth: 'IdentityServerManagement.ApiResource.Delete',
size="small" label: t('common.delText'),
@click="handleDelete(record)" onClick: handleDelete.bind(null, record),
v-auth="'IdentityServerManagement.ApiResource.Delete'" },
> ]"
{{ t('common.delText') }} />
</a-button>
</template> </template>
</BasicTable> </BasicTable>
<CreateApiResource <CreateApiResource
@ -92,7 +92,7 @@
canResize: true, canResize: true,
showIndexColumn: true, showIndexColumn: true,
actionColumn: { actionColumn: {
width: 150, width: 120,
title: t('common.action'), title: t('common.action'),
dataIndex: 'action', dataIndex: 'action',
slots: { slots: {

36
vben271/src/views/identityServers/apiScopes/ApiScopes.vue

@ -3,6 +3,7 @@
<BasicTable @register="registerTable" size="small"> <BasicTable @register="registerTable" size="small">
<template #toolbar> <template #toolbar>
<a-button <a-button
preIcon="ant-design:plus-circle-outlined"
type="primary" type="primary"
@click="openCreateApiScopeModal" @click="openCreateApiScopeModal"
v-auth="'IdentityServerManagement.ApiScope.Create'" v-auth="'IdentityServerManagement.ApiScope.Create'"
@ -31,23 +32,22 @@
</Tag> </Tag>
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<a-button <TableAction
type="link" :actions="[
size="small" {
@click="handleEdit(record)" auth: 'IdentityServerManagement.ApiScope.Update',
v-auth="'IdentityServerManagement.ApiScope.Update'" label: t('common.editText'),
> icon: 'ant-design:edit-outlined',
{{ t('common.editText') }} onClick: handleEdit.bind(null, record),
</a-button> },
{
<a-button icon: 'ic:outline-delete-outline',
type="link" auth: 'IdentityServerManagement.ApiScope.Delete',
size="small" label: t('common.delText'),
@click="handleDelete(record)" onClick: handleDelete.bind(null, record),
v-auth="'IdentityServerManagement.ApiScope.Delete'" },
> ]"
{{ t('common.delText') }} />
</a-button>
</template> </template>
</BasicTable> </BasicTable>
<CreateApiScope <CreateApiScope
@ -102,7 +102,7 @@
canResize: true, canResize: true,
showIndexColumn: true, showIndexColumn: true,
actionColumn: { actionColumn: {
width: 150, width: 120,
title: t('common.action'), title: t('common.action'),
dataIndex: 'action', dataIndex: 'action',
slots: { slots: {

75
vben271/src/views/identityServers/clients/Clients.vue

@ -3,6 +3,7 @@
<BasicTable @register="registerTable" size="small"> <BasicTable @register="registerTable" size="small">
<template #toolbar> <template #toolbar>
<a-button <a-button
preIcon="ant-design:plus-circle-outlined"
type="primary" type="primary"
@click="openCreateClientModal" @click="openCreateClientModal"
v-auth="'IdentityServerManagement.Client.Create'" v-auth="'IdentityServerManagement.Client.Create'"
@ -18,46 +19,38 @@
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<a-button <TableAction
type="link" :actions="[
size="small" {
@click="handleEdit(record)" auth: 'IdentityServerManagement.Client.Update',
v-auth="'IdentityServerManagement.Client.Update'" label: t('common.editText'),
> icon: 'ant-design:edit-outlined',
{{ t('common.editText') }} onClick: handleEdit.bind(null, record),
</a-button> },
<a-button ]"
type="link" :dropDownActions="[
size="small" {
@click="handleEnabled(record)" auth: 'IdentityServerManagement.Client.Enable',
v-auth="'IdentityServerManagement.Client.Enable'" label: record.enabled ? t('common.disEnabled') : t('common.enabled'),
> onClick: handleEnabled.bind(null, record),
{{ record.enabled ? t('common.disEnabled') : t('common.enabled') }} },
</a-button> {
<a-button auth: 'IdentityServerManagement.Client.Update',
type="link" label: 'Uri',
size="small" onClick: handleUri.bind(null, record),
@click="handleUri(record)" },
v-auth="'IdentityServerManagement.Client.Update'" {
> auth: 'IdentityServerManagement.Client.Update',
Uri label: 'Scopes',
</a-button> onClick: handleIdenityResource.bind(null, record),
<a-button },
type="link" {
size="small" auth: 'IdentityServerManagement.Client.Delete',
@click="handleDelete(record)" label: t('common.delText'),
v-auth="'IdentityServerManagement.Client.Delete'" onClick: handleDelete.bind(null, record),
> },
{{ t('common.delText') }} ]"
</a-button> />
<a-button
type="link"
size="small"
@click="handleIdenityResource(record)"
v-auth="'IdentityServerManagement.Client.Delete'"
>
Scopes
</a-button>
</template> </template>
</BasicTable> </BasicTable>
<CreateClient <CreateClient
@ -127,7 +120,7 @@
canResize: true, canResize: true,
showIndexColumn: true, showIndexColumn: true,
actionColumn: { actionColumn: {
width: 300, width: 120,
title: t('common.action'), title: t('common.action'),
dataIndex: 'action', dataIndex: 'action',
slots: { slots: {

34
vben271/src/views/identityServers/identityResources/IdentityResources.vue

@ -3,6 +3,7 @@
<BasicTable @register="registerTable" size="small"> <BasicTable @register="registerTable" size="small">
<template #toolbar> <template #toolbar>
<a-button <a-button
preIcon="ant-design:plus-circle-outlined"
type="primary" type="primary"
@click="openCreateIdentityResourcesModal" @click="openCreateIdentityResourcesModal"
v-auth="'IdentityServerManagement.IdentityResources.Create'" v-auth="'IdentityServerManagement.IdentityResources.Create'"
@ -31,23 +32,22 @@
</Tag> </Tag>
</template> </template>
<template #action="{ record }"> <template #action="{ record }">
<a-button <TableAction
type="link" :actions="[
size="small" {
@click="handleEdit(record)" auth: 'IdentityServerManagement.IdentityResources.Update',
v-auth="'IdentityServerManagement.IdentityResources.Update'" label: t('common.editText'),
> icon: 'ant-design:edit-outlined',
{{ t('common.editText') }} onClick: handleEdit.bind(null, record),
</a-button> },
{
<a-button icon: 'ic:outline-delete-outline',
type="link" auth: 'IdentityServerManagement.IdentityResources.Delete',
size="small" label: t('common.delText'),
@click="handleDelete(record)" onClick: handleDelete.bind(null, record),
v-auth="'IdentityServerManagement.IdentityResources.Delete'" },
> ]"
{{ t('common.delText') }} />
</a-button>
</template> </template>
</BasicTable> </BasicTable>
<CreateIdentityResource <CreateIdentityResource

35
vben271/src/views/tenants/Tenant.vue

@ -3,6 +3,7 @@
<BasicTable @register="registerTable" size="small"> <BasicTable @register="registerTable" size="small">
<template #toolbar> <template #toolbar>
<a-button <a-button
preIcon="ant-design:plus-circle-outlined"
type="primary" type="primary"
@click="openCreateTenantModal" @click="openCreateTenantModal"
v-auth="'AbpTenantManagement.Tenants.Create'" v-auth="'AbpTenantManagement.Tenants.Create'"
@ -11,7 +12,32 @@
</a-button> </a-button>
</template> </template>
<template #action="{ record }"> <template #action="{ action }">
<TableAction
:actions="[
{
icon: 'ant-design:edit-outlined',
auth: 'AbpTenantManagement.Tenants.Update',
label: t('common.editText'),
onClick: handleEdit.bind(null, record),
},
]"
:dropDownActions="[
{
auth: 'AbpTenantManagement.Tenants.ManageConnectionStrings',
label: t('routes.tenant.connectionString'),
onClick: handleConnectionString.bind(null, record),
},
{
auth: 'AbpTenantManagement.Tenants.Delete',
label: t('common.delText'),
onClick: handleDelete.bind(null, record),
},
]"
/>
</template>
<!-- <template #action="{ record }">
<a-button <a-button
type="link" type="link"
size="small" size="small"
@ -37,7 +63,7 @@
> >
{{ t('routes.tenant.connectionString') }} {{ t('routes.tenant.connectionString') }}
</a-button> </a-button>
</template> </template> -->
</BasicTable> </BasicTable>
<EditTenant <EditTenant
@register="registerEditTenantModal" @register="registerEditTenantModal"
@ -61,7 +87,7 @@
import { defineComponent } from 'vue'; import { defineComponent } from 'vue';
import { useI18n } from '/@/hooks/web/useI18n'; import { useI18n } from '/@/hooks/web/useI18n';
import { BasicModal, useModal } from '/@/components/Modal'; import { BasicModal, useModal } from '/@/components/Modal';
import { BasicTable, useTable } from '/@/components/Table'; import { BasicTable, useTable, TableAction } from '/@/components/Table';
import { getTenantListAsync, tableColumns, searchFormSchema, deleteTenantAsync } from './Tenant'; import { getTenantListAsync, tableColumns, searchFormSchema, deleteTenantAsync } from './Tenant';
import CreateTenant from './CreateTenant.vue'; import CreateTenant from './CreateTenant.vue';
@ -74,6 +100,7 @@
components: { components: {
BasicTable, BasicTable,
BasicModal, BasicModal,
TableAction,
CreateTenant, CreateTenant,
EditTenant, EditTenant,
EditConnectionString, EditConnectionString,
@ -103,7 +130,7 @@
slots: { slots: {
customRender: 'action', customRender: 'action',
}, },
width: 200, width: 120,
fixed: 'right', fixed: 'right',
}, },
}); });

Loading…
Cancel
Save