aloha-vue 1.2.44 → 1.2.45

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -14,7 +14,7 @@
14
14
  "Vue.js"
15
15
  ],
16
16
  "homepage": "https://github.com/ilia-brykin/aloha/#README.md",
17
- "version": "1.2.44",
17
+ "version": "1.2.45",
18
18
  "author": {
19
19
  "name": "Ilia Brykin",
20
20
  "email": "brykin.ilia@gmail.com"
@@ -68,7 +68,7 @@ export default {
68
68
  required: true,
69
69
  },
70
70
  modelValue: {
71
- type: [String, Number, Boolean],
71
+ type: [String, Number, Boolean, Array],
72
72
  required: false,
73
73
  },
74
74
  searching: {
@@ -3,12 +3,19 @@ import {
3
3
  toRef,
4
4
  } from "vue";
5
5
 
6
+ import {
7
+ isArray,
8
+ } from "lodash-es";
9
+
6
10
  export default function CheckedAPI(props, {
7
11
  valueLocal = computed(() => undefined),
8
12
  }) {
9
13
  const modelValue = toRef(props, "modelValue");
10
14
 
11
15
  const isChecked = computed(() => {
16
+ if (isArray(modelValue.value)) {
17
+ return modelValue.value.indexOf(valueLocal.value) !== -1;
18
+ }
12
19
  return modelValue.value === valueLocal.value;
13
20
  });
14
21