表单中组件值类型
#11193
Replies: 1 comment 2 replies
-
可以先定义其类型 |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
我用vue3 + vant3 +typescrip,在使用的时候,用一个 reactive 变量给各个组件赋值和关联,每个字段的值只能用string吗?比如:
而实际上,这里面很多字段在数据库里都是 number类型,比如:weight、height等,这样会导致我必须转换2次
1、在存储数据库前转换一次,string => number;
2、从数据库读取后,给页面赋初始化值时,还得再转一次,number=>string;
请教各位,是我的使用姿势不对么?
Beta Was this translation helpful? Give feedback.
All reactions