We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 34fa1ad commit e095595Copy full SHA for e095595
src/utils/validatorProps.js
@@ -0,0 +1,9 @@
1
+export const oneOf = (failed, arr, value) => {
2
+ const checked = arr.indexOf(value) !== -1;
3
+ if (checked) {
4
+ return checked;
5
+ } else {
6
+ console.error(`[vue-layui warn]: prop "${failed}" ${value} must be one of ${JSON.stringify(arr)}`);
7
+ }
8
+
9
+};
0 commit comments