@mixd-id/web-scaffold 0.1.230406241 → 0.1.230406242

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
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@mixd-id/web-scaffold",
3
3
  "private": false,
4
- "version": "0.1.230406241",
4
+ "version": "0.1.230406242",
5
5
  "scripts": {
6
6
  "dev": "vite serve",
7
7
  "build": "vite build",
@@ -21,6 +21,7 @@ import { parseBoolean } from "../utils/helpers.mjs";
21
21
  export default {
22
22
 
23
23
  props:{
24
+ default: undefined,
24
25
  modelValue: undefined,
25
26
  value: undefined,
26
27
  trueValue: undefined,
@@ -67,7 +68,8 @@ export default {
67
68
  return this.modelValue === this.trueValue
68
69
  }
69
70
  else {
70
- return parseBoolean(this.modelValue)
71
+ return this.modelValue === undefined ? this.default:
72
+ parseBoolean(this.modelValue)
71
73
  }
72
74
  }
73
75
 
@@ -139,18 +139,16 @@ export default{
139
139
  e.preventDefault()
140
140
 
141
141
  let text = (e.clipboardData || window.clipboardData).getData("text");
142
-
143
142
  switch(this.type){
144
143
  case 'tel':
145
144
  text = text.replace(/[^0-9]/g, '')
146
145
  break
147
146
  }
148
-
149
147
  if(parseInt(this.maxlength) > 0){
150
148
  text = text.substring(0, parseInt(this.maxlength))
151
149
  }
152
150
 
153
- this.$emit('update:modelValue', text)
151
+ document.execCommand('insertText', false, text)
154
152
  },
155
153
 
156
154
  onKeyDown(e){