Fix: 调整文件结构 & 隐藏垂直滚动条 & 修正Tauri构建错误
This commit is contained in:
12
src/App.vue
12
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()
|
||||
|
||||
|
||||
13
src/components.d.ts
vendored
13
src/components.d.ts
vendored
@ -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']
|
||||
}
|
||||
|
||||
36
src/components/ParamInputField.vue
Normal file
36
src/components/ParamInputField.vue
Normal file
@ -0,0 +1,36 @@
|
||||
<template>
|
||||
<v-text-field
|
||||
density="compact"
|
||||
hide-details
|
||||
:label="label"
|
||||
:model-value="modelValue.value.toString()"
|
||||
:suffix="modelValue.unit"
|
||||
type="number"
|
||||
variant="outlined"
|
||||
@update:model-value="handleUpdate"
|
||||
/>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Param } from '@/types/param'
|
||||
|
||||
interface Props {
|
||||
label: string
|
||||
modelValue: Param
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: Param): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
function handleUpdate (value: string) {
|
||||
const numValue = value === '' ? 0 : Number.parseFloat(value)
|
||||
emit('update:modelValue', {
|
||||
value: numValue,
|
||||
unit: props.modelValue.unit,
|
||||
})
|
||||
}
|
||||
</script>
|
||||
@ -17,7 +17,7 @@
|
||||
<script lang="ts" setup>
|
||||
import { ref } from 'vue'
|
||||
|
||||
const drawer = ref(null)
|
||||
const drawer = ref(false)
|
||||
|
||||
</script>
|
||||
|
||||
@ -26,7 +26,7 @@
|
||||
name: 'BaselineLayout',
|
||||
data () {
|
||||
return {
|
||||
drawer: null,
|
||||
drawer: false,
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
@ -14,4 +14,12 @@
|
||||
margin: 0;
|
||||
width: 100% !important;
|
||||
transform: translateX(0);
|
||||
}
|
||||
|
||||
html, body {
|
||||
overflow-y: scroll;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
11
src/types/param.ts
Normal file
11
src/types/param.ts
Normal file
@ -0,0 +1,11 @@
|
||||
export interface Param {
|
||||
value: number
|
||||
unit: string
|
||||
}
|
||||
|
||||
export function createParam (initialValue: number, unit: string): Param {
|
||||
return {
|
||||
value: initialValue,
|
||||
unit,
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user