From cac6e364f46ea56ed2cfc93e42920997bddae6ae Mon Sep 17 00:00:00 2001 From: liwenqiang Date: Wed, 17 Apr 2024 17:23:39 +0800 Subject: [PATCH] add dark mode --- src/layouts/MainLayout.vue | 6 +++++- src/mocks/dictionaries.ts | 6 +++--- src/mocks/groups.ts | 2 +- src/mocks/regions.ts | 2 +- src/mocks/roles.ts | 2 +- src/mocks/users.ts | 4 ++-- src/pages/IndexPage.vue | 6 ++++-- src/pages/system/dictionary/IndexPage.vue | 7 ++++--- src/pages/system/dictionary/SubPage.vue | 1 + src/pages/system/user/IndexPage.vue | 1 - 10 files changed, 22 insertions(+), 15 deletions(-) diff --git a/src/layouts/MainLayout.vue b/src/layouts/MainLayout.vue index acbb3a6..fce964a 100644 --- a/src/layouts/MainLayout.vue +++ b/src/layouts/MainLayout.vue @@ -1,5 +1,5 @@ diff --git a/src/mocks/dictionaries.ts b/src/mocks/dictionaries.ts index 202688f..ca9afb3 100644 --- a/src/mocks/dictionaries.ts +++ b/src/mocks/dictionaries.ts @@ -8,8 +8,8 @@ for (let i = 0; i < 20; i++) { const data: Dictionary = { id: i, name: 'dictionary_' + i, - description: 'description', - enabled: true, + description: 'this is description for this row', + enabled: i % 3 > 0, lastModifiedDate: new Date() } for (let j = 0; j < i; j++) { @@ -17,7 +17,7 @@ for (let i = 0; i < 20; i++) { id: j, name: 'dictionary_' + i + '_' + j, superiorId: i, - enabled: true, + enabled: j % 2 > 0, description: 'description', lastModifiedDate: new Date() } diff --git a/src/mocks/groups.ts b/src/mocks/groups.ts index ab69cd1..574189e 100644 --- a/src/mocks/groups.ts +++ b/src/mocks/groups.ts @@ -7,7 +7,7 @@ for (let i = 0; i < 20; i++) { const data: Group = { id: i, groupName: 'group_' + i, - enabled: true, + enabled: i % 3 > 0, lastModifiedDate: new Date() } datas.push(data) diff --git a/src/mocks/regions.ts b/src/mocks/regions.ts index 901d5e7..a4c2709 100644 --- a/src/mocks/regions.ts +++ b/src/mocks/regions.ts @@ -9,7 +9,7 @@ for (let i = 0; i < 20; i++) { name: 'region_' + i, areaCode: i, postalCode: i, - enabled: true, + enabled: i % 3 > 0, description: 'description', lastModifiedDate: new Date() } diff --git a/src/mocks/roles.ts b/src/mocks/roles.ts index d23ecb9..f07a498 100644 --- a/src/mocks/roles.ts +++ b/src/mocks/roles.ts @@ -7,7 +7,7 @@ for (let i = 0; i < 20; i++) { const data: Role = { id: i, name: 'role_' + i, - enabled: true, + enabled: i % 3 > 0, description: 'description', lastModifiedDate: new Date() } diff --git a/src/mocks/users.ts b/src/mocks/users.ts index 7394dec..ae36a8e 100644 --- a/src/mocks/users.ts +++ b/src/mocks/users.ts @@ -9,8 +9,8 @@ for (let i = 0; i < 20; i++) { username: 'username' + i, firstname: 'firstname_' + i, lastname: 'lastname_' + i, - enabled: true, - accountNonLocked: true, + enabled: i % 2 > 0, + accountNonLocked: i % 3 > 0, accountExpiresAt: new Date(), credentialsExpiresAt: new Date(), lastModifiedDate: new Date() diff --git a/src/pages/IndexPage.vue b/src/pages/IndexPage.vue index 8d98e94..0bb3c85 100644 --- a/src/pages/IndexPage.vue +++ b/src/pages/IndexPage.vue @@ -1,6 +1,8 @@ diff --git a/src/pages/system/dictionary/IndexPage.vue b/src/pages/system/dictionary/IndexPage.vue index e92f8c1..b86bc06 100644 --- a/src/pages/system/dictionary/IndexPage.vue +++ b/src/pages/system/dictionary/IndexPage.vue @@ -27,7 +27,8 @@ @@ -139,8 +140,8 @@ async function onRequest(props: Parameters }).finally(() => { loading.value = false }) } -function addRow() { - visiable.value = true +function refresh() { + tableRef.value.requestServerInteraction() } function editRow(id: number) { diff --git a/src/pages/system/dictionary/SubPage.vue b/src/pages/system/dictionary/SubPage.vue index 123ba1d..f2777d5 100644 --- a/src/pages/system/dictionary/SubPage.vue +++ b/src/pages/system/dictionary/SubPage.vue @@ -78,6 +78,7 @@ const loading = ref(false) const form = ref({ name: '', + superiorId: props.superiorId, description: '' }) diff --git a/src/pages/system/user/IndexPage.vue b/src/pages/system/user/IndexPage.vue index db1898b..723f830 100644 --- a/src/pages/system/user/IndexPage.vue +++ b/src/pages/system/user/IndexPage.vue @@ -1,6 +1,5 @@