@tagplus/components 2.1.1 → 2.1.4

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
@@ -8,7 +8,7 @@
8
8
  "email": "bruno@tagplus.com.br"
9
9
  }
10
10
  ],
11
- "version": "2.1.1",
11
+ "version": "2.1.4",
12
12
  "main": "./dist/tp.common.js",
13
13
  "directories": {
14
14
  "lib": "src/lib"
@@ -39,6 +39,7 @@
39
39
  @keydown.native.enter.prevent="selectOption"
40
40
  @keydown.native.esc.stop.prevent="visible = false"
41
41
  @keydown.native.tab="visible = false"
42
+ @change="handleChange"
42
43
  @paste.native="debouncedOnInputChange"
43
44
  @mouseenter.native="inputHovering = true"
44
45
  @mouseleave.native="inputHovering = false"
@@ -426,6 +427,16 @@ export default {
426
427
  },
427
428
 
428
429
  methods: {
430
+ handleChange () {
431
+ if (!this.visible) {
432
+ this.toggleMenu()
433
+ }
434
+ },
435
+
436
+ handleFocus (event) {
437
+ this.focused = true
438
+ this.$emit('focus', event)
439
+ },
429
440
  /**
430
441
  * Adiciona um evento no elemento dinamicamente
431
442
  * @args el {Object} Elemento que tem o listener
@@ -521,7 +532,7 @@ export default {
521
532
  const cachedOption = this.cachedOptions[i]
522
533
  const isEqual = isObject
523
534
  ? getValueByPath(cachedOption.value, this.valueKey) ===
524
- getValueByPath(value, this.valueKey)
535
+ getValueByPath(value, this.valueKey)
525
536
  : cachedOption.value === value
526
537
 
527
538
  if (isEqual) {
@@ -676,7 +687,7 @@ export default {
676
687
  </script>
677
688
 
678
689
  <style lang="scss" scoped>
679
- :deep(){
690
+ :deep() {
680
691
  .el-input-group__append {
681
692
  padding: 0px 6px 0px 0px;
682
693
  border: 0;