From be4f57530e7a27fe5b6846b93da222c930c4e51a Mon Sep 17 00:00:00 2001 From: fangxiang Date: Thu, 5 Aug 2021 17:26:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E7=AA=97=E5=8F=A3=E6=98=BE?= =?UTF-8?q?=E7=A4=BA=E3=80=82=E5=AE=AB=E6=A0=BC=E8=A1=8C=E5=95=8A=E6=98=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- quasar.conf.js | 99 ++++++++++------------ src/App.vue | 12 ++- src/common/ClientConnection.ts | 78 +++++++---------- src/common/EventBus.ts | 12 +++ src/entities/WSProtocol.ts | 20 +++++ src/i18n/zh-CN/index.ts | 34 ++++---- src/pages/TopToolBar.vue | 14 +++- src/pages/WallPage.vue | 149 ++++++++++++++++++++++++--------- src/store/index.ts | 6 ++ 9 files changed, 262 insertions(+), 162 deletions(-) create mode 100644 src/common/EventBus.ts diff --git a/quasar.conf.js b/quasar.conf.js index 4273df0..e70f606 100644 --- a/quasar.conf.js +++ b/quasar.conf.js @@ -6,7 +6,7 @@ // Configuration for your app // https://v2.quasar.dev/quasar-cli/quasar-conf-js -const { configure } = require('quasar/wrappers'); +const { configure } = require("quasar/wrappers"); module.exports = configure(function (ctx) { return { @@ -19,15 +19,10 @@ module.exports = configure(function (ctx) { // app boot file (/src/boot) // --> boot files are part of "main.js" // https://v2.quasar.dev/quasar-cli/boot-files - boot: [ - 'i18n', - 'axios', - ], + boot: ["i18n", "axios"], // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-css - css: [ - 'app.scss' - ], + css: ["app.scss"], // https://github.com/quasarframework/quasar/tree/dev/extras extras: [ @@ -39,13 +34,13 @@ module.exports = configure(function (ctx) { // 'line-awesome', // 'roboto-font-latin-ext', // this or either 'roboto-font', NEVER both! - 'roboto-font', // optional, you are not bound to it - 'material-icons', // optional, you are not bound to it + "roboto-font", // optional, you are not bound to it + "material-icons", // optional, you are not bound to it ], // Full list of options: https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-build build: { - vueRouterMode: 'hash', // available values: 'hash', 'history' + vueRouterMode: "hash", // available values: 'hash', 'history' // transpile: false, @@ -65,7 +60,7 @@ module.exports = configure(function (ctx) { // https://v2.quasar.dev/quasar-cli/handling-webpack // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpack (/* chain */) { + chainWebpack(/* chain */) { // }, }, @@ -74,7 +69,7 @@ module.exports = configure(function (ctx) { devServer: { https: false, port: 8080, - open: true // opens browser window automatically + open: true, // opens browser window automatically }, // https://v2.quasar.dev/quasar-cli/quasar-conf-js#Property%3A-framework @@ -92,7 +87,7 @@ module.exports = configure(function (ctx) { // directives: [], // Quasar plugins - plugins: [] + plugins: ["Notify", "Dialog", "Loading", "AppFullscreen"], }, // animations: 'all', // --- includes all animations @@ -107,29 +102,29 @@ module.exports = configure(function (ctx) { // manualPostHydrationTrigger: true, prodPort: 3000, // The default port that the production server should use - // (gets superseded if process.env.PORT is specified at runtime) + // (gets superseded if process.env.PORT is specified at runtime) maxAge: 1000 * 60 * 60 * 24 * 30, - // Tell browser when a file from the server should expire from cache (in ms) + // Tell browser when a file from the server should expire from cache (in ms) - chainWebpackWebserver (/* chain */) { + chainWebpackWebserver(/* chain */) { // }, middlewares: [ - ctx.prod ? 'compression' : '', - 'render' // keep this as last one - ] + ctx.prod ? "compression" : "", + "render", // keep this as last one + ], }, // https://v2.quasar.dev/quasar-cli/developing-pwa/configuring-pwa pwa: { - workboxPluginMode: 'GenerateSW', // 'GenerateSW' or 'InjectManifest' + workboxPluginMode: "GenerateSW", // 'GenerateSW' or 'InjectManifest' workboxOptions: {}, // only for GenerateSW // for the custom service worker ONLY (/src-pwa/custom-service-worker.[js|ts]) // if using workbox in InjectManifest mode - chainWebpackCustomSW (/* chain */) { + chainWebpackCustomSW(/* chain */) { // }, @@ -137,38 +132,38 @@ module.exports = configure(function (ctx) { name: `Quasar App`, short_name: `Quasar App`, description: `A Quasar Framework app`, - display: 'standalone', - orientation: 'portrait', - background_color: '#ffffff', - theme_color: '#027be3', + display: "standalone", + orientation: "portrait", + background_color: "#ffffff", + theme_color: "#027be3", icons: [ { - src: 'icons/icon-128x128.png', - sizes: '128x128', - type: 'image/png' + src: "icons/icon-128x128.png", + sizes: "128x128", + type: "image/png", }, { - src: 'icons/icon-192x192.png', - sizes: '192x192', - type: 'image/png' + src: "icons/icon-192x192.png", + sizes: "192x192", + type: "image/png", }, { - src: 'icons/icon-256x256.png', - sizes: '256x256', - type: 'image/png' + src: "icons/icon-256x256.png", + sizes: "256x256", + type: "image/png", }, { - src: 'icons/icon-384x384.png', - sizes: '384x384', - type: 'image/png' + src: "icons/icon-384x384.png", + sizes: "384x384", + type: "image/png", }, { - src: 'icons/icon-512x512.png', - sizes: '512x512', - type: 'image/png' - } - ] - } + src: "icons/icon-512x512.png", + sizes: "512x512", + type: "image/png", + }, + ], + }, }, // Full list of options: https://v2.quasar.dev/quasar-cli/developing-cordova-apps/configuring-cordova @@ -178,22 +173,20 @@ module.exports = configure(function (ctx) { // Full list of options: https://v2.quasar.dev/quasar-cli/developing-capacitor-apps/configuring-capacitor capacitor: { - hideSplashscreen: true + hideSplashscreen: true, }, // Full list of options: https://v2.quasar.dev/quasar-cli/developing-electron-apps/configuring-electron electron: { - bundler: 'packager', // 'packager' or 'builder' + bundler: "packager", // 'packager' or 'builder' packager: { // https://github.com/electron-userland/electron-packager/blob/master/docs/api.md#options - // OS X / Mac App Store // appBundleId: '', // appCategoryType: '', // osxSign: '', // protocol: 'myapp://path', - // Windows only // win32metadata: { ... } }, @@ -201,20 +194,20 @@ module.exports = configure(function (ctx) { builder: { // https://www.electron.build/configuration/configuration - appId: 'media_player_web' + appId: "media_player_web", }, // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpack (/* chain */) { + chainWebpack(/* chain */) { // do something with the Electron main process Webpack cfg // extendWebpackMain also available besides this chainWebpackMain }, // "chain" is a webpack-chain object https://github.com/neutrinojs/webpack-chain - chainWebpackPreload (/* chain */) { + chainWebpackPreload(/* chain */) { // do something with the Electron main process Webpack cfg // extendWebpackPreload also available besides this chainWebpackPreload }, - } - } + }, + }; }); diff --git a/src/App.vue b/src/App.vue index 66a25a4..b8d1071 100644 --- a/src/App.vue +++ b/src/App.vue @@ -3,15 +3,19 @@ diff --git a/src/pages/WallPage.vue b/src/pages/WallPage.vue index 48b692f..1722445 100644 --- a/src/pages/WallPage.vue +++ b/src/pages/WallPage.vue @@ -18,47 +18,69 @@ -
+
+ {{ wall_height_scaler }} + {{ wall_width_scaler }} +
+
+
+
- - - - - - - - {{ $t("close this windwo") }} - - - - - - {{ $t("close other windwos") }} - - - - - - {{ $t("close all windwos") }} - - - +
+ + + + + + + + {{ $t("close this windwo") }} + + + + + + + {{ $t("close other windwos") }} + + + + + + + {{ $t("close all windwos") }} + + + +
@@ -72,16 +94,22 @@ .wall_item { border: 1px solid black; } + +.window { + border: 1px solid rebeccapurple; + position: absolute; +}