Skip to content

Commit a25daf7

Browse files
fix: dataSize default overriding actual config (#85)
1 parent 04f4273 commit a25daf7

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

lib/recaptcha.vue

+8-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<div
33
:data-sitekey="siteKey || $recaptcha.siteKey"
4-
:data-size="dataSize || $recaptcha.size"
4+
:data-size="computedDataSize"
55
:data-theme="dataTheme"
66
:data-badge="dataBadge"
77
:data-tabindex="dataTabindex"
@@ -31,7 +31,7 @@ export default {
3131
},
3232
3333
dataSize: {
34-
default: 'normal',
34+
default: null,
3535
type: String,
3636
3737
validator: (value) => {
@@ -65,6 +65,12 @@ export default {
6565
this.$recaptcha.on('recaptcha-expired', this.onExpired)
6666
},
6767
68+
computed: {
69+
computedDataSize() {
70+
return (this.dataSize || this.$recaptcha.size) || 'normal'
71+
}
72+
},
73+
6874
methods: {
6975
onError(message) {
7076
return this.$emit('error', message)

0 commit comments

Comments
 (0)