mirror of
https://gitee.com/dromara/electron-egg.git
synced 2026-05-15 04:02:10 +08:00
style
This commit is contained in:
@@ -5,15 +5,6 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no, maximum-scale=1.0, minimum-scale=1.0" />
|
||||
<title></title>
|
||||
<style>
|
||||
/* 滚动条 */
|
||||
::-webkit-scrollbar{width:8px;height:4px}
|
||||
::-webkit-scrollbar-button{width:10px;height:0}
|
||||
::-webkit-scrollbar-track{background:0 0}
|
||||
::-webkit-scrollbar-thumb{background:#E6FFEE;-webkit-transition:.3s;transition:.3s}
|
||||
::-webkit-scrollbar-thumb:hover{background-color:#07C160}
|
||||
::-webkit-scrollbar-thumb:active{background-color:#07C160}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="app"></div>
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
<template>
|
||||
<div id="application">
|
||||
<router-view/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
@@ -15,13 +13,4 @@ export default {
|
||||
methods: {}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
#application {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
}
|
||||
</style>
|
||||
<style lang="less"></style>
|
||||
|
||||
16
frontend/src/assets/global.less
Normal file
16
frontend/src/assets/global.less
Normal file
@@ -0,0 +1,16 @@
|
||||
#app {
|
||||
font-family: Avenir, Helvetica, Arial, sans-serif;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
-moz-osx-font-smoothing: grayscale;
|
||||
text-align: center;
|
||||
color: #2c3e50;
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
/* 滚动条 */
|
||||
::-webkit-scrollbar{width:8px;height:4px}
|
||||
::-webkit-scrollbar-button{width:10px;height:0}
|
||||
::-webkit-scrollbar-track{background:0 0}
|
||||
::-webkit-scrollbar-thumb{background:#E6FFEE;-webkit-transition:.3s;transition:.3s}
|
||||
::-webkit-scrollbar-thumb:hover{background-color:#07C160}
|
||||
::-webkit-scrollbar-thumb:active{background-color:#07C160}
|
||||
18
frontend/src/assets/theme.less
Normal file
18
frontend/src/assets/theme.less
Normal file
@@ -0,0 +1,18 @@
|
||||
//@import 'ant-design-vue/dist/antd.less'; // 引入官方提供的 less 样式入口文件
|
||||
@import 'ant-design-vue/dist/antd.less';
|
||||
|
||||
// 可自定义主题颜色
|
||||
@primary-color: #07C160; // 全局主色
|
||||
@link-color: #1890ff; // 链接色
|
||||
@success-color: #52c41a; // 成功色
|
||||
@warning-color: #faad14; // 警告色
|
||||
@error-color: #f5222d; // 错误色
|
||||
@font-size-base: 14px; // 主字号
|
||||
@heading-color: rgba(0, 0, 0, 0.85); // 标题色
|
||||
@text-color: rgba(0, 0, 0, 0.65); // 主文本色
|
||||
@text-color-secondary: rgba(0, 0, 0, 0.45); // 次文本色
|
||||
@disabled-color: rgba(0, 0, 0, 0.25); // 失效色
|
||||
@border-radius-base: 4px; // 组件/浮层圆角
|
||||
@border-color-base: #dce3e8; // 边框色
|
||||
@box-shadow-base: 0 2px 8px rgba(0, 0, 0, 0.15); // 浮层阴影
|
||||
|
||||
@@ -1,58 +0,0 @@
|
||||
<template>
|
||||
<div class="hello">
|
||||
<h1>{{ msg }}</h1>
|
||||
<p>
|
||||
For a guide and recipes on how to configure / customize this project,<br>
|
||||
check out the
|
||||
<a href="https://cli.vuejs.org" target="_blank" rel="noopener">vue-cli documentation</a>.
|
||||
</p>
|
||||
<h3>Installed CLI Plugins</h3>
|
||||
<ul>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-babel" target="_blank" rel="noopener">babel</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-cli/tree/dev/packages/%40vue/cli-plugin-eslint" target="_blank" rel="noopener">eslint</a></li>
|
||||
</ul>
|
||||
<h3>Essential Links</h3>
|
||||
<ul>
|
||||
<li><a href="https://vuejs.org" target="_blank" rel="noopener">Core Docs</a></li>
|
||||
<li><a href="https://forum.vuejs.org" target="_blank" rel="noopener">Forum</a></li>
|
||||
<li><a href="https://chat.vuejs.org" target="_blank" rel="noopener">Community Chat</a></li>
|
||||
<li><a href="https://twitter.com/vuejs" target="_blank" rel="noopener">Twitter</a></li>
|
||||
<li><a href="https://news.vuejs.org" target="_blank" rel="noopener">News</a></li>
|
||||
</ul>
|
||||
<h3>Ecosystem</h3>
|
||||
<ul>
|
||||
<li><a href="https://router.vuejs.org" target="_blank" rel="noopener">vue-router</a></li>
|
||||
<li><a href="https://vuex.vuejs.org" target="_blank" rel="noopener">vuex</a></li>
|
||||
<li><a href="https://github.com/vuejs/vue-devtools#vue-devtools" target="_blank" rel="noopener">vue-devtools</a></li>
|
||||
<li><a href="https://vue-loader.vuejs.org" target="_blank" rel="noopener">vue-loader</a></li>
|
||||
<li><a href="https://github.com/vuejs/awesome-vue" target="_blank" rel="noopener">awesome-vue</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'HelloWorld',
|
||||
props: {
|
||||
msg: String
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- Add "scoped" attribute to limit CSS to this component only -->
|
||||
<style scoped>
|
||||
h3 {
|
||||
margin: 40px 0 0;
|
||||
}
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
display: inline-block;
|
||||
margin: 0 10px;
|
||||
}
|
||||
a {
|
||||
color: #42b983;
|
||||
}
|
||||
</style>
|
||||
@@ -1,166 +0,0 @@
|
||||
/**
|
||||
* 基础路由
|
||||
* @type { *[] }
|
||||
*/
|
||||
import {AppSider, Menu} from '@/layouts'
|
||||
|
||||
const RouteView = {
|
||||
name: 'RouteView',
|
||||
render: h => h('router-view')
|
||||
}
|
||||
|
||||
export const constantRouterMap = [
|
||||
{
|
||||
path: '/',
|
||||
component: AppSider,
|
||||
children: [
|
||||
{
|
||||
path: '/framework',
|
||||
name: 'Framework',
|
||||
component: Menu,
|
||||
props: { id: 'framework' },
|
||||
redirect: { name: 'FrameworkSocketIpc' },
|
||||
children: [
|
||||
{
|
||||
path: '/framework/socket/ipc',
|
||||
name: 'FrameworkSocketIpc',
|
||||
component: () => import('@/views/framework/socket/Ipc')
|
||||
},
|
||||
{
|
||||
path: '/framework/socket/httpserver',
|
||||
name: 'FrameworkSocketHttpServer',
|
||||
component: () => import('@/views/framework/socket/HttpServer')
|
||||
},
|
||||
{
|
||||
path: '/framework/socket/socketserver',
|
||||
name: 'FrameworkSocketSocketServer',
|
||||
component: () => import('@/views/framework/socket/SocketServer')
|
||||
},
|
||||
{
|
||||
path: '/framework/db/index',
|
||||
name: 'FrameworkDBIndex',
|
||||
component: () => import('@/views/framework/db/Index')
|
||||
},
|
||||
{
|
||||
path: '/framework/sqlitedb/index',
|
||||
name: 'FrameworkSqliteDBIndex',
|
||||
component: () => import('@/views/framework/sqlitedb/Index')
|
||||
},
|
||||
{
|
||||
path: '/framework/jobs/index',
|
||||
name: 'FrameworkJobsIndex',
|
||||
component: () => import('@/views/framework/jobs/Index')
|
||||
},
|
||||
{
|
||||
path: '/framework/updater/index',
|
||||
name: 'FrameworkUpdaterIndex',
|
||||
component: () => import('@/views/framework/updater/Index')
|
||||
},
|
||||
{
|
||||
path: '/framework/software/index',
|
||||
name: 'FrameworkSoftwareIndex',
|
||||
component: () => import('@/views/framework/software/Index')
|
||||
},
|
||||
{
|
||||
path: '/framework/java/index',
|
||||
name: 'FrameworkJavaIndex',
|
||||
component: () => import('@/views/framework/java/Index')
|
||||
},
|
||||
{
|
||||
path: '/framework/testapi/index',
|
||||
name: 'FrameworkTestApiIndex',
|
||||
component: () => import('@/views/framework/testapi/Index')
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/os',
|
||||
name: 'Os',
|
||||
component: Menu,
|
||||
props: { id: 'os' },
|
||||
redirect: { name: 'OsFileIndex' },
|
||||
children: [
|
||||
{
|
||||
path: '/os/file/index',
|
||||
name: 'OsFileIndex',
|
||||
component: () => import('@/views/os/file/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/windowview/index',
|
||||
name: 'OsWindowViewIndex',
|
||||
component: () => import('@/views/os/windowview/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/window/index',
|
||||
name: 'OsWindowIndex',
|
||||
component: () => import('@/views/os/window/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/notification/index',
|
||||
name: 'OsNotificationIndex',
|
||||
component: () => import('@/views/os/notification/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/powermonitor/index',
|
||||
name: 'OsPowerMonitorIndex',
|
||||
component: () => import('@/views/os/powermonitor/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/screen/index',
|
||||
name: 'OsScreenIndex',
|
||||
component: () => import('@/views/os/screen/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/theme/index',
|
||||
name: 'OsThemeIndex',
|
||||
component: () => import('@/views/os/theme/Index')
|
||||
},
|
||||
{
|
||||
path: '/os/system/index',
|
||||
name: 'OsSystemIndex',
|
||||
component: () => import('@/views/os/system/Index')
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/hardware',
|
||||
name: 'Hardware',
|
||||
component: Menu,
|
||||
props: { id: 'hardware' },
|
||||
redirect: { name: 'HardwarePrinterIndex' },
|
||||
children: [
|
||||
{
|
||||
path: '/hardware/printer/index',
|
||||
name: 'HardwarePrinterIndex',
|
||||
component: () => import('@/views/hardware/printer/Index')
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/effect',
|
||||
name: 'Effect',
|
||||
component: Menu,
|
||||
props: { id: 'effect' },
|
||||
redirect: { name: 'EffectVideoIndex' },
|
||||
children: [
|
||||
{
|
||||
path: '/effect/video/index',
|
||||
name: 'EffectVideoIndex',
|
||||
component: () => import('@/views/effect/video/Index')
|
||||
},
|
||||
]
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/special',
|
||||
component: RouteView,
|
||||
children: [
|
||||
{
|
||||
path: 'subwindow',
|
||||
name: 'SpecialSubwindowIpc',
|
||||
component: () => import('@/views/os/subwindow/Ipc')
|
||||
}
|
||||
]
|
||||
},
|
||||
]
|
||||
@@ -1,127 +0,0 @@
|
||||
/**
|
||||
* 子菜单
|
||||
*/
|
||||
export default {
|
||||
framework: {
|
||||
'menu_100' : {
|
||||
icon: 'profile',
|
||||
title: '通信',
|
||||
pageName: 'FrameworkSocketIpc',
|
||||
params: {}
|
||||
},
|
||||
'menu_101' : {
|
||||
icon: 'profile',
|
||||
title: 'http服务',
|
||||
pageName: 'FrameworkSocketHttpServer',
|
||||
params: {}
|
||||
},
|
||||
'menu_102' : {
|
||||
icon: 'profile',
|
||||
title: 'socket服务',
|
||||
pageName: 'FrameworkSocketSocketServer',
|
||||
params: {}
|
||||
},
|
||||
'menu_103' : {
|
||||
icon: 'profile',
|
||||
title: 'json数据库',
|
||||
pageName: 'FrameworkDBIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_104' : {
|
||||
icon: 'profile',
|
||||
title: 'sqlite数据库',
|
||||
pageName: 'FrameworkSqliteDBIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_105' : {
|
||||
icon: 'profile',
|
||||
title: '任务',
|
||||
pageName: 'FrameworkJobsIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_106' : {
|
||||
icon: 'profile',
|
||||
title: '自动更新',
|
||||
pageName: 'FrameworkUpdaterIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_107' : {
|
||||
icon: 'profile',
|
||||
title: '软件调用',
|
||||
pageName: 'FrameworkSoftwareIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_108' : {
|
||||
icon: 'profile',
|
||||
title: 'java',
|
||||
pageName: 'FrameworkJavaIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_109' : {
|
||||
icon: 'profile',
|
||||
title: '测试',
|
||||
pageName: 'FrameworkTestApiIndex',
|
||||
params: {}
|
||||
},
|
||||
},
|
||||
os: {
|
||||
'menu_100' : {
|
||||
icon: 'profile',
|
||||
title: '文件',
|
||||
pageName: 'OsFileIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_101' : {
|
||||
icon: 'profile',
|
||||
title: '视图',
|
||||
pageName: 'OsWindowViewIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_102' : {
|
||||
icon: 'profile',
|
||||
title: '窗口',
|
||||
pageName: 'OsWindowIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_103' : {
|
||||
icon: 'profile',
|
||||
title: '桌面通知',
|
||||
pageName: 'OsNotificationIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_104' : {
|
||||
icon: 'profile',
|
||||
title: '电源监控',
|
||||
pageName: 'OsPowerMonitorIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_105' : {
|
||||
icon: 'profile',
|
||||
title: '屏幕信息',
|
||||
pageName: 'OsScreenIndex',
|
||||
params: {}
|
||||
},
|
||||
'menu_106' : {
|
||||
icon: 'profile',
|
||||
title: '系统主题',
|
||||
pageName: 'OsThemeIndex',
|
||||
params: {}
|
||||
},
|
||||
},
|
||||
hardware: {
|
||||
'menu_100' : {
|
||||
icon: 'profile',
|
||||
title: '打印机',
|
||||
pageName: 'HardwarePrinterIndex',
|
||||
params: {}
|
||||
}
|
||||
},
|
||||
effect: {
|
||||
'menu_100' : {
|
||||
icon: 'profile',
|
||||
title: '视频播放器',
|
||||
pageName: 'EffectVideoIndex',
|
||||
params: {}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -26,7 +26,7 @@
|
||||
<script>
|
||||
// import { reactive } from 'vue';
|
||||
// :default-selected-keys="[default_key]"
|
||||
import subMenu from '@/config/subMenu';
|
||||
import subMenu from '@/router/subMenu';
|
||||
|
||||
export default {
|
||||
// setup() {
|
||||
|
||||
@@ -3,10 +3,13 @@ import { createApp } from 'vue';
|
||||
import App from './App.vue';
|
||||
import Router from './router/index';
|
||||
// import './styles/nprogress.less'
|
||||
// import './styles/global.less' // 全局样式
|
||||
import * as AntIcon from '@ant-design/icons-vue'; // 全局图标
|
||||
import * as AntIcon from '@ant-design/icons-vue';
|
||||
import Antd from 'ant-design-vue';
|
||||
import 'ant-design-vue/dist/antd.less'; // 引入官方提供的 less 样式入口文件
|
||||
import './assets/global.less';
|
||||
//import 'ant-design-vue/dist/antd.less';
|
||||
//import 'ant-design-vue/dist/antd.css';
|
||||
|
||||
import './assets/theme.less'; // ant 主题Y样式
|
||||
import { ipc } from './utils/ipcRenderer';
|
||||
|
||||
const app = createApp(App)
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import Vue from 'vue'
|
||||
import Router from 'vue-router'
|
||||
import { constantRouterMap } from '@/config/router.config'
|
||||
|
||||
// hack router push callback
|
||||
const originalPush = Router.prototype.push
|
||||
Router.prototype.push = function push (location, onResolve, onReject) {
|
||||
if (onResolve || onReject) return originalPush.call(this, location, onResolve, onReject)
|
||||
return originalPush.call(this, location).catch(err => err)
|
||||
}
|
||||
|
||||
Vue.use(Router)
|
||||
|
||||
export default new Router({
|
||||
mode: 'hash',
|
||||
routes: constantRouterMap
|
||||
})
|
||||
@@ -1,31 +0,0 @@
|
||||
module.exports = {
|
||||
//Solution For Issue:You are using the runtime-only build of Vue where the template compiler is not available. Either pre-compile the templates into render functions, or use the compiler-included build.
|
||||
//zhengkai.blog.csdn.net
|
||||
runtimeCompiler: true,
|
||||
publicPath: './',
|
||||
configureWebpack: (config) => {
|
||||
config["performance"] = {
|
||||
"maxEntrypointSize": 10000000,
|
||||
"maxAssetSize": 30000000,
|
||||
}
|
||||
},
|
||||
chainWebpack: config => {
|
||||
config
|
||||
.plugin('html')
|
||||
.tap(args => {
|
||||
//args[0].title= '' // 设置title
|
||||
return args
|
||||
})
|
||||
},
|
||||
css: {
|
||||
loaderOptions: {
|
||||
less: {
|
||||
modifyVars: {
|
||||
//在此处设置,也可以设置直角、边框色、字体大小等
|
||||
'primary-color': '#07C160',
|
||||
},
|
||||
javascriptEnabled: true
|
||||
}
|
||||
}
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user