From 216f65966ac04b9b25a03ab5e7b001f311104bf4 Mon Sep 17 00:00:00 2001 From: huanshuo-W <15258427350@163.com> Date: Sat, 5 Jul 2025 16:18:23 +0800 Subject: [PATCH] =?UTF-8?q?Fix:=20=E8=B0=83=E6=95=B4=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E7=BB=93=E6=9E=84=20&=20=E9=9A=90=E8=97=8F=E5=9E=82=E7=9B=B4?= =?UTF-8?q?=E6=BB=9A=E5=8A=A8=E6=9D=A1=20&=20=E4=BF=AE=E6=AD=A3Tauri?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src-tauri/tauri.conf.json | 6 ++-- src/App.vue | 12 +++---- src/components.d.ts | 13 +++---- .../BeltSpecificationCalculate.vue | 0 ...MultiLayerPaperTapeWidthAngleCalculate.vue | 0 .../PaperRollWeightLengthCalculate.vue | 0 .../PaperTapeWidthAngleCalculate.vue | 0 .../PaperTubeProductionCalculate.vue | 0 .../PaperTubeWeightCalculate.vue | 0 src/components/ParamInputField.vue | 36 +++++++++++++++++++ src/layouts/baseline.vue | 4 +-- src/styles/custom.css | 8 +++++ src/types/param.ts | 11 ++++++ 13 files changed, 73 insertions(+), 17 deletions(-) rename src/components/{ => Modules}/BeltSpecificationCalculate.vue (100%) rename src/components/{ => Modules}/MultiLayerPaperTapeWidthAngleCalculate.vue (100%) rename src/components/{ => Modules}/PaperRollWeightLengthCalculate.vue (100%) rename src/components/{ => Modules}/PaperTapeWidthAngleCalculate.vue (100%) rename src/components/{ => Modules}/PaperTubeProductionCalculate.vue (100%) rename src/components/{ => Modules}/PaperTubeWeightCalculate.vue (100%) create mode 100644 src/components/ParamInputField.vue create mode 100644 src/types/param.ts diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f21415e..23603d7 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -2,12 +2,12 @@ "$schema": "../node_modules/@tauri-apps/cli/config.schema.json", "productName": "jinshen-calculator", "version": "0.1.0", - "identifier": "com.tauri.dev", + "identifier": "com.jinshen-calculator.dev", "build": { "frontendDist": "../dist", "devUrl": "http://localhost:8080", - "beforeDevCommand": "bun dev", - "beforeBuildCommand": "bun build" + "beforeDevCommand": "bun run dev", + "beforeBuildCommand": "bun run build" }, "app": { "windows": [ diff --git a/src/App.vue b/src/App.vue index 80603a8..0535c67 100644 --- a/src/App.vue +++ b/src/App.vue @@ -70,12 +70,12 @@ import { computed, onMounted, onUnmounted, ref } from 'vue' import { useI18n } from 'vue-i18n' - import BeltSpecificationCalculate from '@/components/BeltSpecificationCalculate.vue' - import MultiLayerPaperTapeWidthAngleCalculate from '@/components/MultiLayerPaperTapeWidthAngleCalculate.vue' - import PaperRollWeightLengthCalculate from '@/components/PaperRollWeightLengthCalculate.vue' - import PaperTapeWidthAngleCalculate from '@/components/PaperTapeWidthAngleCalculate.vue' - import PaperTubeProductionCalculate from '@/components/PaperTubeProductionCalculate.vue' - import PaperTubeWeightCalculate from '@/components/PaperTubeWeightCalculate.vue' + import BeltSpecificationCalculate from '@/components/Modules/BeltSpecificationCalculate.vue' + import MultiLayerPaperTapeWidthAngleCalculate from '@/components/Modules/MultiLayerPaperTapeWidthAngleCalculate.vue' + import PaperRollWeightLengthCalculate from '@/components/Modules/PaperRollWeightLengthCalculate.vue' + import PaperTapeWidthAngleCalculate from '@/components/Modules/PaperTapeWidthAngleCalculate.vue' + import PaperTubeProductionCalculate from '@/components/Modules/PaperTubeProductionCalculate.vue' + import PaperTubeWeightCalculate from '@/components/Modules/PaperTubeWeightCalculate.vue' const { t, locale } = useI18n() diff --git a/src/components.d.ts b/src/components.d.ts index 5575f7b..1353342 100644 --- a/src/components.d.ts +++ b/src/components.d.ts @@ -9,13 +9,14 @@ export {} declare module 'vue' { export interface GlobalComponents { AppFooter: typeof import('./components/AppFooter.vue')['default'] - BeltSpecificationCalculate: typeof import('./components/BeltSpecificationCalculate.vue')['default'] + BeltSpecificationCalculate: typeof import('./components/Modules/BeltSpecificationCalculate.vue')['default'] HelloWorld: typeof import('./components/HelloWorld.vue')['default'] - MultiLayerPaperTapeWidthAngleCalculate: typeof import('./components/MultiLayerPaperTapeWidthAngleCalculate.vue')['default'] - PaperRollWeightLengthCalculate: typeof import('./components/PaperRollWeightLengthCalculate.vue')['default'] - PaperTapeWidthAngleCalculate: typeof import('./components/PaperTapeWidthAngleCalculate.vue')['default'] - PaperTubeProductionCalculate: typeof import('./components/PaperTubeProductionCalculate.vue')['default'] - PaperTubeWeightCalculate: typeof import('./components/PaperTubeWeightCalculate.vue')['default'] + MultiLayerPaperTapeWidthAngleCalculate: typeof import('./components/Modules/MultiLayerPaperTapeWidthAngleCalculate.vue')['default'] + PaperRollWeightLengthCalculate: typeof import('./components/Modules/PaperRollWeightLengthCalculate.vue')['default'] + PaperTapeWidthAngleCalculate: typeof import('./components/Modules/PaperTapeWidthAngleCalculate.vue')['default'] + PaperTubeProductionCalculate: typeof import('./components/Modules/PaperTubeProductionCalculate.vue')['default'] + PaperTubeWeightCalculate: typeof import('./components/Modules/PaperTubeWeightCalculate.vue')['default'] + ParamInputField: typeof import('./components/ParamInputField.vue')['default'] RouterLink: typeof import('vue-router')['RouterLink'] RouterView: typeof import('vue-router')['RouterView'] } diff --git a/src/components/BeltSpecificationCalculate.vue b/src/components/Modules/BeltSpecificationCalculate.vue similarity index 100% rename from src/components/BeltSpecificationCalculate.vue rename to src/components/Modules/BeltSpecificationCalculate.vue diff --git a/src/components/MultiLayerPaperTapeWidthAngleCalculate.vue b/src/components/Modules/MultiLayerPaperTapeWidthAngleCalculate.vue similarity index 100% rename from src/components/MultiLayerPaperTapeWidthAngleCalculate.vue rename to src/components/Modules/MultiLayerPaperTapeWidthAngleCalculate.vue diff --git a/src/components/PaperRollWeightLengthCalculate.vue b/src/components/Modules/PaperRollWeightLengthCalculate.vue similarity index 100% rename from src/components/PaperRollWeightLengthCalculate.vue rename to src/components/Modules/PaperRollWeightLengthCalculate.vue diff --git a/src/components/PaperTapeWidthAngleCalculate.vue b/src/components/Modules/PaperTapeWidthAngleCalculate.vue similarity index 100% rename from src/components/PaperTapeWidthAngleCalculate.vue rename to src/components/Modules/PaperTapeWidthAngleCalculate.vue diff --git a/src/components/PaperTubeProductionCalculate.vue b/src/components/Modules/PaperTubeProductionCalculate.vue similarity index 100% rename from src/components/PaperTubeProductionCalculate.vue rename to src/components/Modules/PaperTubeProductionCalculate.vue diff --git a/src/components/PaperTubeWeightCalculate.vue b/src/components/Modules/PaperTubeWeightCalculate.vue similarity index 100% rename from src/components/PaperTubeWeightCalculate.vue rename to src/components/Modules/PaperTubeWeightCalculate.vue diff --git a/src/components/ParamInputField.vue b/src/components/ParamInputField.vue new file mode 100644 index 0000000..3663035 --- /dev/null +++ b/src/components/ParamInputField.vue @@ -0,0 +1,36 @@ + + + diff --git a/src/layouts/baseline.vue b/src/layouts/baseline.vue index affac8b..b326d60 100644 --- a/src/layouts/baseline.vue +++ b/src/layouts/baseline.vue @@ -17,7 +17,7 @@ @@ -26,7 +26,7 @@ name: 'BaselineLayout', data () { return { - drawer: null, + drawer: false, } }, } diff --git a/src/styles/custom.css b/src/styles/custom.css index 8d8a5f7..91305d6 100644 --- a/src/styles/custom.css +++ b/src/styles/custom.css @@ -14,4 +14,12 @@ margin: 0; width: 100% !important; transform: translateX(0); +} + +html, body { + overflow-y: scroll; +} + +::-webkit-scrollbar { + display: none; } \ No newline at end of file diff --git a/src/types/param.ts b/src/types/param.ts new file mode 100644 index 0000000..d33e20b --- /dev/null +++ b/src/types/param.ts @@ -0,0 +1,11 @@ +export interface Param { + value: number + unit: string +} + +export function createParam (initialValue: number, unit: string): Param { + return { + value: initialValue, + unit, + } +}