From a9d57f7a6ebc3350b19948e83610190f22c4a771 Mon Sep 17 00:00:00 2001 From: mengyxu Date: Thu, 14 Nov 2024 09:46:47 +0800 Subject: [PATCH] 0.4.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 新增样式,布局(主页和登录页) --- examples/App.vue | 52 ++-- examples/config/router.ts | 7 +- examples/store/index.ts | 3 + examples/store/state.ts | 3 +- package.json | 2 +- packages/base/data/login-form.vue | 92 ------ packages/base/data/search-row.vue | 3 + packages/base/index.ts | 11 +- packages/base/item/input.vue | 6 +- packages/manage/common/head.vue | 283 ------------------ packages/manage/common/index.ts | 4 + packages/manage/common/login.vue | 127 ++++++++ packages/manage/common/login2.vue | 145 +++++++++ packages/manage/head/fullscreen.vue | 26 ++ packages/manage/head/head.vue | 119 ++++++++ packages/manage/head/index.ts | 9 + packages/manage/head/lang-change.vue | 29 ++ .../manage/{common => head}/menu-tree.vue | 44 ++- packages/manage/head/personal.vue | 87 ++++++ packages/manage/head/size-change.vue | 32 ++ packages/manage/head/style-change.vue | 63 ++++ packages/manage/index.ts | 6 +- packages/manage/router/index.vue | 39 ++- packages/manage/views/index.ts | 6 - packages/manage/views/login.vue | 58 ---- plugs/config/size/large.ts | 2 +- plugs/config/size/normal.ts | 3 +- plugs/config/size/small.ts | 2 +- plugs/config/styles/dark.ts | 3 + plugs/config/styles/index.ts | 2 + plugs/config/styles/light.ts | 3 + plugs/config/styles/plain.ts | 5 +- plugs/config/styles/plainb.ts | 17 ++ plugs/i18n/en.ts | 5 +- plugs/i18n/zh.ts | 4 +- plugs/store/index.ts | 24 +- 36 files changed, 804 insertions(+), 522 deletions(-) delete mode 100644 packages/base/data/login-form.vue delete mode 100644 packages/manage/common/head.vue create mode 100644 packages/manage/common/index.ts create mode 100644 packages/manage/common/login.vue create mode 100644 packages/manage/common/login2.vue create mode 100644 packages/manage/head/fullscreen.vue create mode 100644 packages/manage/head/head.vue create mode 100644 packages/manage/head/index.ts create mode 100644 packages/manage/head/lang-change.vue rename packages/manage/{common => head}/menu-tree.vue (65%) create mode 100644 packages/manage/head/personal.vue create mode 100644 packages/manage/head/size-change.vue create mode 100644 packages/manage/head/style-change.vue delete mode 100644 packages/manage/views/login.vue create mode 100644 plugs/config/styles/plainb.ts diff --git a/examples/App.vue b/examples/App.vue index 13f3976..28bbdc4 100644 --- a/examples/App.vue +++ b/examples/App.vue @@ -1,5 +1,6 @@ @@ -10,29 +11,29 @@ import { Index, Views } from "noob-mengyxu"; const store = useStore(); const { buff, dictionary, config, permission, role, user, status, log } = Views.menus; -// const menus = [ -// { -// i18n: "menu.home", path: "home", icon: "HomeFilled" -// }, -// { -// i18n: "menu.operator", path: "operator", icon: "Platform", children: [ -// buff, dictionary, config, permission, role, user, status, log -// ] -// }, -// { -// i18n: "menu.base", path: "base", icon: "House", children: [ -// { i18n: "menu.table", path: "table", icon: "List" }, -// { i18n: "menu.form", path: "form", icon: "Postcard" }, -// ] -// }, -// { -// i18n: "menu.tool", path: "tool", icon: "Tools", children: [ -// { i18n: "menu.terminal", path: "terminal", icon: "Platform" }, -// { i18n: "menu.color", path: "color", icon: "MagicStick" }, -// ] -// } -// ] -const menus = null; +const menus = [ + { + i18n: "menu.home", path: "home", icon: "HomeFilled" + }, + { + i18n: "menu.operator", path: "operator", icon: "Platform", children: [ + buff, dictionary, config, permission, role, user, status, log + ] + }, + { + i18n: "menu.base", path: "base", icon: "House", children: [ + { i18n: "menu.table", path: "table", icon: "List" }, + { i18n: "menu.form", path: "form", icon: "Postcard" }, + ] + }, + { + i18n: "menu.tool", path: "tool", icon: "Tools", children: [ + { i18n: "menu.terminal", path: "terminal", icon: "Platform" }, + { i18n: "menu.color", path: "color", icon: "MagicStick" }, + ] + } +] +// const menus = null; onMounted(() => { }); @@ -41,5 +42,4 @@ onMounted(() => { }); \ No newline at end of file +// } \ No newline at end of file diff --git a/examples/config/router.ts b/examples/config/router.ts index 25bf6a3..05f724d 100644 --- a/examples/config/router.ts +++ b/examples/config/router.ts @@ -1,5 +1,5 @@ import { createRouter, createWebHashHistory, RouteRecordRaw } from 'vue-router'; -import { Views } from 'noob-mengyxu'; +import { Views, Common } from 'noob-mengyxu'; import Home from '../view/home.vue'; import Table from '../view/base/table.vue'; import Form from '../view/base/form.vue'; @@ -16,6 +16,11 @@ const routes: Array = [ name: 'home', component: Home, }, + { + path: '/login', + name: 'login', + component: Common.Login2, + }, { path: '/table', name: 'table', diff --git a/examples/store/index.ts b/examples/store/index.ts index b0ed7e9..08fb240 100644 --- a/examples/store/index.ts +++ b/examples/store/index.ts @@ -3,8 +3,11 @@ import state from './state'; import mutations from './mutations'; import actions from './actions'; +const getters = new Store.Getters(); + export default Store.createStore({ state, + getters, mutations, actions, }); diff --git a/examples/store/state.ts b/examples/store/state.ts index 693dab9..50ba0af 100644 --- a/examples/store/state.ts +++ b/examples/store/state.ts @@ -1,9 +1,10 @@ -import { Store } from 'noob-mengyxu'; +import { Store, Styles } from 'noob-mengyxu'; class State extends Store.State { test = [ { key: 'a', value: 'A' }, { key: 'b', value: 'B' }, { key: 'c', value: 'C' }, ]; + style = Styles.plainb; } export default new State(); diff --git a/package.json b/package.json index 32531fe..53b0fc0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "noob-mengyxu", - "version": "0.3.8", + "version": "0.4.0", "main": "index.ts", "module": "index.ts", "keywords": [ diff --git a/packages/base/data/login-form.vue b/packages/base/data/login-form.vue deleted file mode 100644 index ed22976..0000000 --- a/packages/base/data/login-form.vue +++ /dev/null @@ -1,92 +0,0 @@ - - - - \ No newline at end of file diff --git a/packages/base/data/search-row.vue b/packages/base/data/search-row.vue index a0709a3..8b6f60a 100644 --- a/packages/base/data/search-row.vue +++ b/packages/base/data/search-row.vue @@ -75,8 +75,10 @@ onMounted(() => { }); .search-row, .query, +.title, .left { height: v-bind('state.size.searchRowHeight'); + line-height: v-bind('state.size.searchRowHeight'); } .title { @@ -84,5 +86,6 @@ onMounted(() => { }); padding-right: 15px; font-size: v-bind('state.size.titleSize'); min-width: 20px; + color: v-bind('state.style.subTitleColor') } \ No newline at end of file diff --git a/packages/base/index.ts b/packages/base/index.ts index 224c571..b3aee61 100644 --- a/packages/base/index.ts +++ b/packages/base/index.ts @@ -11,15 +11,6 @@ import SearchRow from './data/search-row.vue'; import ListTable from './data/list-table.vue'; import Infomation from './data/infomation.vue'; import ModifyForm from './data/modify-form.vue'; -import LoginForm from './data/login-form.vue'; import Descriptions from './data/descriptions.vue'; import TableAction from './data/table-action.vue'; -export { - SearchRow, - ListTable, - Infomation, - ModifyForm, - LoginForm, - Descriptions, - TableAction, -}; +export { SearchRow, ListTable, Infomation, ModifyForm, Descriptions, TableAction }; diff --git a/packages/base/item/input.vue b/packages/base/item/input.vue index cde3280..edd5aac 100644 --- a/packages/base/item/input.vue +++ b/packages/base/item/input.vue @@ -1,5 +1,5 @@