File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed
Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 1616 "devDependencies" : {
1717 "@vitejs/plugin-vue" : " ^2.2.4" ,
1818 "@vueuse/core" : " ^8.2.3" ,
19+ "dayjs" : " ^1.11.0" ,
1920 "electron" : " ^17.2.0" ,
2021 "electron-builder" : " ^22.14.5" ,
2122 "naive-ui" : " ^2.26.1" ,
2223 "typescript" : " ^4.5.5" ,
24+ "unplugin-vue-components" : " ^0.18.5" ,
2325 "vite" : " ^2.7.13" ,
2426 "vite-plugin-resolve" : " ^1.4.4" ,
2527 "vue" : " ^3.2.29" ,
2628 "vue-router" : " ^4.0.13" ,
2729 "vue-tsc" : " ^0.31.1" ,
28- "win-win-api" : " ^0.0.5" ,
29- "dayjs" : " ^1.11.0" ,
30- "unplugin-vue-components" : " ^0.18.5"
30+ "win-win-api" : " ^0.0.5"
3131 },
3232 "env" : {
3333 "PORT" : 3344
Original file line number Diff line number Diff line change 44
55declare module 'vue' {
66 export interface GlobalComponents {
7+ NForm : typeof import ( 'naive-ui' ) [ 'NForm' ]
8+ NFormItem : typeof import ( 'naive-ui' ) [ 'NFormItem' ]
79 NGi : typeof import ( 'naive-ui' ) [ 'NGi' ]
810 NGrid : typeof import ( 'naive-ui' ) [ 'NGrid' ]
911 NInput : typeof import ( 'naive-ui' ) [ 'NInput' ]
Original file line number Diff line number Diff line change 11<script setup lang="ts">
2+ import locale from ' ../language/zh_CN.json'
23import useHomeworks from ' ../stores/homeworks' ;
34
45const homeworks = useHomeworks ();
56
67 </script >
78
89<template >
9- <div v-for =" (homework, subject) in homeworks" >
10- <p ><n-input type =" text" v-model:value =" homeworks[subject]" /></p >
11- </div >
10+ <n-form
11+ label-placement =" left"
12+ label-width =" auto"
13+ >
14+ <n-form-item
15+ v-for =" (homework, subject) in homeworks"
16+ :label =" locale.subject[subject]"
17+ >
18+ <n-input type =" text" v-model:value =" homeworks[subject]" />
19+ </n-form-item >
20+ </n-form >
1221</template >
You can’t perform that action at this time.
0 commit comments