Skip to content

Commit cf8edf3

Browse files
committed
feat: new component input-otp
1 parent f85f4ed commit cf8edf3

File tree

2 files changed

+14
-6
lines changed

2 files changed

+14
-6
lines changed

packages/varlet-ui/src/field-decorator/props.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,18 @@ export const props = {
3636
type: Boolean,
3737
default: true,
3838
},
39-
textColor: String,
40-
focusColor: String,
41-
blurColor: String,
39+
textColor: {
40+
type: String,
41+
default: '',
42+
},
43+
focusColor: {
44+
type: String,
45+
default: '',
46+
},
47+
blurColor: {
48+
type: String,
49+
default: '',
50+
},
4251
isError: Boolean,
4352
formDisabled: Boolean,
4453
disabled: Boolean,

packages/varlet-ui/src/input-otp/InputOtp.vue

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default defineComponent({
2626
name,
2727
props,
2828
setup(props, { emit }) {
29-
const { length, inputOtpItems, bindInputOtpItem } = useInputOtpItems()
29+
const { length, bindInputOtpItem } = useInputOtpItems()
3030
const activeInput = ref()
3131
3232
const model = computed({
@@ -107,10 +107,9 @@ export default defineComponent({
107107
108108
return {
109109
length,
110-
inputOtpItems,
110+
activeInput,
111111
errorMessage,
112112
n,
113-
activeInput,
114113
reset,
115114
validate,
116115
}

0 commit comments

Comments
 (0)