@tagplus/components 2.0.14 → 2.0.15
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/tp.common.js +1 -1
- package/dist/tp.common.js.map +1 -1
- package/dist/tp.css +2 -2
- package/dist/tp.umd.js +1 -1
- package/dist/tp.umd.js.map +1 -1
- package/dist/tp.umd.min.js +1 -1
- package/dist/tp.umd.min.js.map +1 -1
- package/package.json +1 -1
- package/src/components/Autosuggest/Autosuggest.vue +2 -8
- package/src/components/Multisuggest/Multisuggest.vue +3 -4
package/package.json
CHANGED
|
@@ -304,11 +304,8 @@ export default {
|
|
|
304
304
|
newVal = this.value
|
|
305
305
|
} else if (this.value && typeof this.value === 'object') {
|
|
306
306
|
if (!Object.keys(newVal).length) { return {} }
|
|
307
|
-
if (!this.value[this.valueKey]) {
|
|
307
|
+
if (!this.value[this.valueKey] && this.value[this.valueKey] !== '') {
|
|
308
308
|
if (process.env.DEBUG === 'true') {
|
|
309
|
-
console.error(
|
|
310
|
-
`formatedValue this.value '${this.value}'`
|
|
311
|
-
)
|
|
312
309
|
console.error(
|
|
313
310
|
`Autosuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`
|
|
314
311
|
)
|
|
@@ -494,10 +491,7 @@ export default {
|
|
|
494
491
|
} else if (val && typeof val === 'object') {
|
|
495
492
|
if (!Object.keys(val).length) { return {} }
|
|
496
493
|
// Se val for Object converte para outro tipo
|
|
497
|
-
if (!this.value[this.valueKey]) {
|
|
498
|
-
console.error(
|
|
499
|
-
` getOption this.value '${this.value}'`
|
|
500
|
-
)
|
|
494
|
+
if (!this.value[this.valueKey] && this.value[this.valueKey] !== '') {
|
|
501
495
|
console.error(
|
|
502
496
|
`Autosuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`
|
|
503
497
|
)
|
|
@@ -365,7 +365,7 @@ export default {
|
|
|
365
365
|
newVal = ''
|
|
366
366
|
} else if (Array.isArray(this.value)) {
|
|
367
367
|
this.value.forEach((item) => {
|
|
368
|
-
if (!item[this.valueKey]) {
|
|
368
|
+
if (!item[this.valueKey] && item[this.valueKey] !== '') {
|
|
369
369
|
if (process.env.DEBUG === 'true') {
|
|
370
370
|
console.error(`Multisuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`)
|
|
371
371
|
}
|
|
@@ -556,15 +556,14 @@ export default {
|
|
|
556
556
|
getOption (val) {
|
|
557
557
|
let value = ''
|
|
558
558
|
let initialLabel = false
|
|
559
|
-
|
|
560
559
|
if (typeof this.value === 'boolean') {
|
|
561
560
|
value = ''
|
|
562
|
-
} else if (Array.isArray(
|
|
561
|
+
} else if (Array.isArray(this.value)) {
|
|
563
562
|
value = val
|
|
564
563
|
} else if (val && typeof val === 'object') {
|
|
565
564
|
if (!Object.keys(val).length) { return {} }
|
|
566
565
|
// Se val for Object converte para outro tipo
|
|
567
|
-
if (!
|
|
566
|
+
if (!this.value[this.valueKey] && this.value[this.valueKey] !== '') {
|
|
568
567
|
console.error(`Multisuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`)
|
|
569
568
|
} else {
|
|
570
569
|
// Se mandou a label no objeto value
|