mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-25 09:20:36 +01:00
chore(components): add validators to strategy and placement for popper
This commit is contained in:
@@ -60,11 +60,17 @@ export default {
|
|||||||
},
|
},
|
||||||
placement: {
|
placement: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'bottom-end'
|
default: 'bottom-end',
|
||||||
|
validator: (value) => {
|
||||||
|
return ['auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'].includes(value)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
strategy: {
|
strategy: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'fixed'
|
default: 'fixed',
|
||||||
|
validator: (value) => {
|
||||||
|
return ['absolute', 'fixed'].includes(value)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
wrapperClass: {
|
wrapperClass: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
@@ -36,11 +36,17 @@ export default {
|
|||||||
},
|
},
|
||||||
placement: {
|
placement: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'bottom'
|
default: 'bottom',
|
||||||
|
validator: (value) => {
|
||||||
|
return ['auto', 'auto-start', 'auto-end', 'top', 'top-start', 'top-end', 'bottom', 'bottom-start', 'bottom-end', 'right', 'right-start', 'right-end', 'left', 'left-start', 'left-end'].includes(value)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
strategy: {
|
strategy: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'fixed'
|
default: 'fixed',
|
||||||
|
validator: (value) => {
|
||||||
|
return ['absolute', 'fixed'].includes(value)
|
||||||
|
}
|
||||||
},
|
},
|
||||||
wrapperClass: {
|
wrapperClass: {
|
||||||
type: String,
|
type: String,
|
||||||
|
|||||||
Reference in New Issue
Block a user