@tagplus/components 2.0.10 → 2.0.13
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 -2
- package/src/components/Multisuggest/Multisuggest.vue +3 -3
package/package.json
CHANGED
|
@@ -298,12 +298,12 @@ export default {
|
|
|
298
298
|
*/
|
|
299
299
|
formatedValue () {
|
|
300
300
|
let newVal = ''
|
|
301
|
-
|
|
302
301
|
if (typeof this.value === 'boolean') {
|
|
303
302
|
newVal = ''
|
|
304
303
|
} else if (Array.isArray(this.value)) {
|
|
305
304
|
newVal = this.value
|
|
306
305
|
} else if (this.value && typeof this.value === 'object') {
|
|
306
|
+
if (!Object.keys(newVal).length) { return {} }
|
|
307
307
|
if (!this.value[this.valueKey]) {
|
|
308
308
|
if (process.env.DEBUG === 'true') {
|
|
309
309
|
console.error(
|
|
@@ -484,12 +484,12 @@ export default {
|
|
|
484
484
|
getOption (val) {
|
|
485
485
|
let value = ''
|
|
486
486
|
let initialLabel = false
|
|
487
|
-
|
|
488
487
|
if (typeof this.value === 'boolean') {
|
|
489
488
|
value = ''
|
|
490
489
|
} else if (Array.isArray(val)) {
|
|
491
490
|
value = val
|
|
492
491
|
} else if (val && typeof val === 'object') {
|
|
492
|
+
if (!Object.keys(val).length) { return {} }
|
|
493
493
|
// Se val for Object converte para outro tipo
|
|
494
494
|
if (!this.value[this.valueKey]) {
|
|
495
495
|
console.error(
|
|
@@ -361,7 +361,6 @@ export default {
|
|
|
361
361
|
*/
|
|
362
362
|
formatedValue () {
|
|
363
363
|
let newVal = ''
|
|
364
|
-
|
|
365
364
|
if (typeof this.value === 'boolean') {
|
|
366
365
|
newVal = ''
|
|
367
366
|
} else if (Array.isArray(this.value)) {
|
|
@@ -444,8 +443,8 @@ export default {
|
|
|
444
443
|
this.selectedLabelsArray.push(item)
|
|
445
444
|
}
|
|
446
445
|
})
|
|
447
|
-
} else {
|
|
448
|
-
const itemApagado = oldValue.filter(x => !newValue
|
|
446
|
+
} else if (newValue && Object.keys(newValue).length) {
|
|
447
|
+
const itemApagado = oldValue.filter(x => !newValue?.includes(x))
|
|
449
448
|
|
|
450
449
|
this.selectedLabelsArray.forEach((item, index) => {
|
|
451
450
|
if (item.id === itemApagado[0]) {
|
|
@@ -563,6 +562,7 @@ export default {
|
|
|
563
562
|
} else if (Array.isArray(val)) {
|
|
564
563
|
value = val
|
|
565
564
|
} else if (val && typeof val === 'object') {
|
|
565
|
+
if (!Object.keys(val).length) { return {} }
|
|
566
566
|
// Se val for Object converte para outro tipo
|
|
567
567
|
if (!val[this.valueKey]) {
|
|
568
568
|
console.error(`Multisuggest '${this.$options.name}' option doesn't have a valueKey '${this.valueKey}' key`)
|