@@ -3,7 +3,7 @@
<keyboardCar
v-if="mode === 'car'"
:index="index"
- v-model="modelValue"
+ v-model="visible"
@change="handleChange"
@close="handleClose"
></keyboardCar>
@@ -11,7 +11,7 @@
<keyboardNum
v-if="mode === 'number'"
/>
@@ -49,6 +49,11 @@ const props = defineProps({
})
const emits = defineEmits(['update:modelValue', 'change', 'close'])
+const visible = computed({
+ get: () => props.modelValue,
+ set: value => emits('update:modelValue', value)
+})
+
const handleChange = item => {
emits('change', item)
}
@@ -75,9 +75,9 @@ const handleInput = index => {
align-items: center;
&-item {
- width: 70rpx;
- height: 80rpx;
- line-height: 80rpx;
+ width: 80rpx;
+ height: 90rpx;
+ line-height: 90rpx;
border-radius: 8rpx;
border: 1px solid #cbcbcb;
text-align: center;
@@ -96,7 +96,7 @@ const handleInput = index => {
content: '新能源';
color: #999999;
width: 100%;
- font-size: 9px;
+ font-size: 10px;
position: absolute;
left: 0;
@@ -11,7 +11,6 @@
</template>
<script setup>
-import { onLoad } from '@dcloudio/uni-app'
import { useUserStore } from '@/stores/user'
const user = useUserStore()
@@ -85,8 +85,6 @@
-import { computed, ref } from 'vue'
-import { onShow } from '@dcloudio/uni-app'
import userAvatar from '/static/images/user-avatar.png'
import wx from '@/business/wx-login.vue'
@@ -25,7 +25,6 @@
-import { ref, computed, getCurrentInstance } from 'vue'
import useForm from '@/hooks/useForm'
import useValidator from '@/hooks/useValidator'
@@ -1,5 +1,4 @@
import { defineStore } from 'pinia'
-import { ref } from 'vue'
import { login, loginByCode, logout } from '../services/common'
export const useUserStore = defineStore('user', () => {
@@ -0,0 +1,20 @@
+import { defineConfig } from 'vite'
+import uni from '@dcloudio/vite-plugin-uni'
+import AutoIpmort from 'unplugin-auto-import/vite'
+export default defineConfig({
+ plugins: [
+ uni(),
+ AutoIpmort({
+ imports: ['vue', 'pinia', 'uni-app']
+ })
+ ],
+ build: {
+ minify: 'terser',
+ terserOptions: {
+ compress: {
+ drop_console: true,
+ },