isobit-ui 0.1.30 → 0.1.31
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/dist/index.js +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* isobit-ui v0.1.
|
|
2
|
+
* isobit-ui v0.1.31
|
|
3
3
|
* (c) Erik Alarcon Pinedo
|
|
4
4
|
* Released under the MIT License.
|
|
5
5
|
*/
|
|
@@ -882,7 +882,8 @@ var script$l = {
|
|
|
882
882
|
},
|
|
883
883
|
data: function data() {
|
|
884
884
|
return {
|
|
885
|
-
input: null
|
|
885
|
+
input: null,
|
|
886
|
+
hadValue: 0
|
|
886
887
|
};
|
|
887
888
|
},
|
|
888
889
|
mounted: function mounted() {
|
|
@@ -904,7 +905,7 @@ var script$l = {
|
|
|
904
905
|
updated: function updated() {
|
|
905
906
|
var me = this,
|
|
906
907
|
c = me.input;
|
|
907
|
-
c.checked =
|
|
908
|
+
c.checked = me.value && me.value == me.vmodel || '' + me.vmodel === 'true' || '' + me.vmodel === '1';
|
|
908
909
|
},
|
|
909
910
|
methods: {
|
|
910
911
|
change: function change() {
|
|
@@ -913,7 +914,10 @@ var script$l = {
|
|
|
913
914
|
if (!me.readonly) {
|
|
914
915
|
var r = me.$el.querySelector('input');
|
|
915
916
|
if (me.$parent.onChange) me.$parent.onChange(me.value, r.checked);
|
|
916
|
-
|
|
917
|
+
var v = r.checked ? me.value ? me.value : r.checked : me.valueFalse !== null ? me.valueFalse : r.checked;
|
|
918
|
+
if (v) me.hadValue = 1;
|
|
919
|
+
if (!v && me.hadValue) v = me.valueFalse !== null ? me.valueFalse : false;
|
|
920
|
+
me.$emit('input', v);
|
|
917
921
|
}
|
|
918
922
|
},
|
|
919
923
|
getLabel: function getLabel() {
|