From 138598827975bf47d3be3bb1d6aac1963101a394 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ph=E1=BA=A1m=20Ng=E1=BB=8Dc=20H=C3=B2a?= Date: Mon, 25 May 2020 16:01:56 +0700 Subject: [PATCH] chore: validator textPosition use validator for props --- src/components/VueTabs.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/components/VueTabs.js b/src/components/VueTabs.js index d48c21c..c3c27b5 100644 --- a/src/components/VueTabs.js +++ b/src/components/VueTabs.js @@ -5,12 +5,12 @@ export default { activeTextColor: String, disabledColor: String, disabledTextColor: String, - /** - * Tab title position: center | bottom | top - */ textPosition: { type: String, - default: 'center' + default: 'center', + validator: function (value) { + return ['center', 'bottom', 'top'].indexOf(value) !== -1 + } }, /** * Tab type: tabs | pills