File tree 3 files changed +17
-6
lines changed
3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change 16
16
"devDependencies" : {
17
17
"@vitejs/plugin-vue" : " ^2.2.4" ,
18
18
"@vueuse/core" : " ^8.2.3" ,
19
+ "dayjs" : " ^1.11.0" ,
19
20
"electron" : " ^17.2.0" ,
20
21
"electron-builder" : " ^22.14.5" ,
21
22
"naive-ui" : " ^2.26.1" ,
22
23
"typescript" : " ^4.5.5" ,
24
+ "unplugin-vue-components" : " ^0.18.5" ,
23
25
"vite" : " ^2.7.13" ,
24
26
"vite-plugin-resolve" : " ^1.4.4" ,
25
27
"vue" : " ^3.2.29" ,
26
28
"vue-router" : " ^4.0.13" ,
27
29
"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"
31
31
},
32
32
"env" : {
33
33
"PORT" : 3344
Original file line number Diff line number Diff line change 4
4
5
5
declare module 'vue' {
6
6
export interface GlobalComponents {
7
+ NForm : typeof import ( 'naive-ui' ) [ 'NForm' ]
8
+ NFormItem : typeof import ( 'naive-ui' ) [ 'NFormItem' ]
7
9
NGi : typeof import ( 'naive-ui' ) [ 'NGi' ]
8
10
NGrid : typeof import ( 'naive-ui' ) [ 'NGrid' ]
9
11
NInput : typeof import ( 'naive-ui' ) [ 'NInput' ]
Original file line number Diff line number Diff line change 1
1
<script setup lang="ts">
2
+ import locale from ' ../language/zh_CN.json'
2
3
import useHomeworks from ' ../stores/homeworks' ;
3
4
4
5
const homeworks = useHomeworks ();
5
6
6
7
</script >
7
8
8
9
<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 >
12
21
</template >
You can’t perform that action at this time.
0 commit comments