File tree 3 files changed +11
-6
lines changed
3 files changed +11
-6
lines changed Original file line number Diff line number Diff line change 20
20
< script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/spectrum/1.8.0/spectrum.js "> </ script >
21
21
< script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/jquery.maskedinput/1.4.1/jquery.maskedinput.js "> </ script >
22
22
< script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/ion-rangeslider/2.1.4/js/ion.rangeSlider.js "> </ script >
23
+ < script type ="text/javascript " src ="https://rawgit.com/monterail/vue-multiselect/master/lib/vue-multiselect.min.js "> </ script >
23
24
< script type ="text/javascript " src ="https://cdnjs.cloudflare.com/ajax/libs/lodash.js/4.3.0/lodash.min.js "> </ script >
24
25
</ head >
25
26
< body >
Original file line number Diff line number Diff line change 96
96
"dependencies" : {
97
97
"babel-runtime" : " 6.9.2" ,
98
98
"vue" : " 1.0.24" ,
99
- "vue-multiselect" : " ^1.0.1"
100
99
}
101
- }
100
+ }
Original file line number Diff line number Diff line change 32
32
<script >
33
33
// import { isObject } from "lodash";
34
34
import abstractField from " ./abstractField" ;
35
- import Multiselect from " vue-multiselect" ;
36
35
37
36
export default {
38
37
mixins: [abstractField],
39
- components: {
40
- Multiselect
41
- },
42
38
computed: {
43
39
options () {
44
40
let values = this .schema .values ;
@@ -82,5 +78,14 @@ export default {
82
78
console .log (" onClose" , value, id);
83
79
}
84
80
}
81
+ created () {
82
+ // Check if the component is loaded
83
+ if (window .VueMultiselect ) {
84
+ Vue .component (" multiselect" , window .VueMultiselect .default );
85
+ } else {
86
+ console .error (" 'vue-multiselect' is missing. Please download from https://github.com/monterail/vue-multiselect and load the script in the HTML head section!" );
87
+ }
88
+ }
85
89
};
86
90
</script >
91
+
You can’t perform that action at this time.
0 commit comments