From b3867aade93b41015965dcb02379c784aab6c26e Mon Sep 17 00:00:00 2001 From: Saeid Doroudi Date: Mon, 20 Nov 2023 23:49:56 +0330 Subject: [PATCH] fix: :lipstick: some ui improvement applied better ui for management pages --- src/components.d.ts | 1 + src/components/Brand/BrandManagement.vue | 61 +++++++++---------- .../Category/CategoryManagement.vue | 36 ++++++----- src/components/Color/ColorManagement.vue | 37 ++++++----- 4 files changed, 63 insertions(+), 72 deletions(-) diff --git a/src/components.d.ts b/src/components.d.ts index f5c9310..3fdfb63 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -42,6 +42,7 @@ declare module 'vue' { NNotificationProvider: typeof import('naive-ui')['NNotificationProvider'] NPageHeader: typeof import('naive-ui')['NPageHeader'] NPopselect: typeof import('naive-ui')['NPopselect'] + NSpace: typeof import('naive-ui')['NSpace'] NTreeSelect: typeof import('naive-ui')['NTreeSelect'] NUpload: typeof import('naive-ui')['NUpload'] RouterLink: typeof import('vue-router')['RouterLink'] diff --git a/src/components/Brand/BrandManagement.vue b/src/components/Brand/BrandManagement.vue index da546b1..d82b836 100644 --- a/src/components/Brand/BrandManagement.vue +++ b/src/components/Brand/BrandManagement.vue @@ -2,9 +2,9 @@ import { type DataTableColumns, NButton, NIcon } from 'naive-ui/es/components' import type { RowData } from 'naive-ui/es/data-table/src/interface' import { - DismissCircle24Regular as DeleteIcon, + Delete24Regular as DeleteIcon, Edit32Regular as EditIcon, - AddCircle20Regular as PlusIcon, + Add20Regular as PlusIcon, } from '@vicons/fluent' import { storeToRefs } from 'pinia' import { useDialog, useMessage } from 'naive-ui' @@ -17,40 +17,39 @@ const message = useMessage() onMounted(getItems) const columns: DataTableColumns = [ { - title: 'Name', + title: 'Brand', key: 'name', }, { - title: 'Url Slog', + title: 'Slog', key: 'url', }, { title: 'Actions', key: 'actions', - width: 200, + width: 110, render(row) { return [ h( NButton, { - size: 'small', + size: 'medium', renderIcon: renderIcon(EditIcon), - ghost: true, + quaternary: true, + circle: true, class: 'mr-2', - onClick: () => edit(row), + onClick: () => { }, }, - { default: () => 'Edit' }, ), h( NButton, { - size: 'small', - type: 'error', - ghost: true, + size: 'medium', + quaternary: true, + circle: true, renderIcon: renderIcon(DeleteIcon), onClick: () => handleDeleteItem(row), }, - { default: () => 'Delete' }, ), ] }, @@ -99,26 +98,22 @@ function createBrand() {