<input type="text" :value="val" :focus='focus' :selection-start='0' :selection-end='val.length' @focus="input_focus" @blur="input_blur" />
<input type="number" :value="val2" :focus='focus2' :selection-start='0' :selection-end='val2.length' @focus="input_focus2" @blur="input_blur2" />
type=‘text’时selection-start,selection-end生效
type=‘number’时selection-start,selection-end不生效
3 个回复
DCloud_UNI_GSQ
底层不支持,需要修改为 text 类型
Zzz1012
nvue好像可以
1***@qq.com
尝试用v-model.number 试试?