@tagplus/components 0.2.108 → 1.0.0
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 -8714
- package/dist/tp.common.js.map +1 -1
- package/dist/tp.css +1 -1
- package/dist/tp.umd.js +1 -8724
- 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 +22 -16
- package/src/components/Autosuggest/Autosuggest.vue +39 -39
- package/src/components/Inline/Inline.vue +9 -10
- package/src/components/Inline/index.js +1 -1
- package/src/components/InputNumber/InputNumber.vue +3 -3
- package/src/components/InputNumber/index.js +1 -1
- package/src/components/Loader/Loader.vue +6 -6
- package/src/components/Loader/index.js +1 -1
- package/src/components/Money/Money.vue +9 -9
- package/src/components/Money/index.js +1 -1
- package/src/components/Multisuggest/Multisuggest.vue +39 -40
- package/src/components/OptionsList/OptionsList.vue +1 -1
- package/src/components/OptionsList/index.js +1 -1
- package/src/components/OptionsListItem/OptionsListItem.vue +4 -4
- package/src/components/OptionsListItem/index.js +1 -1
- package/src/components/Percent/Percent.vue +9 -9
- package/src/components/Percent/index.js +1 -1
- package/src/components/Skeleton/Skeleton.vue +7 -7
- package/src/components/Skeleton/index.js +1 -1
- package/src/components/Step/Step.vue +222 -0
- package/src/components/Step/index.js +3 -0
- package/src/components/Steps/Steps.vue +19 -0
- package/src/components/Steps/index.js +3 -0
- package/src/components/Tip/Tip.vue +19 -15
- package/src/components/Tip/index.js +2 -2
- package/src/components/index.js +5 -1
- package/src/locale/index.js +13 -15
- package/src/locale/lang/en.js +3 -3
- package/src/locale/lang/pt-br.js +3 -3
- package/src/main.js +3 -6
- package/src/mixins/locale.js +2 -2
- package/src/utils/currency.js +15 -15
- package/src/utils/filters.js +9 -14
package/package.json
CHANGED
|
@@ -1,13 +1,14 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tagplus/components",
|
|
3
3
|
"description": "Componentes customizados TagPlus Baseados no ElementUI",
|
|
4
|
+
"target": "web",
|
|
4
5
|
"maintainers": [
|
|
5
6
|
{
|
|
6
7
|
"name": "Bruno Barbosa",
|
|
7
8
|
"email": "bruno@tagplus.com.br"
|
|
8
9
|
}
|
|
9
10
|
],
|
|
10
|
-
"version": "0.
|
|
11
|
+
"version": "1.0.0",
|
|
11
12
|
"main": "./dist/tp.common.js",
|
|
12
13
|
"directories": {
|
|
13
14
|
"lib": "src/lib"
|
|
@@ -29,7 +30,7 @@
|
|
|
29
30
|
"doc": "yarn docs",
|
|
30
31
|
"docs": "nodemon --exec \"vuese gen && vuese serve\" --watch ./src -e js,vue,scss",
|
|
31
32
|
"docs:gen": "vuese gen",
|
|
32
|
-
"lint": "vue-
|
|
33
|
+
"lint": "eslint --cache --ext .js,.vue --ignore-path .gitignore .",
|
|
33
34
|
"pub": "yarn build && yarn publish --access public",
|
|
34
35
|
"pub:beta": "yarn build && yarn publish --tag beta",
|
|
35
36
|
"serve": "vue-cli-service serve --open ./examples/main.js",
|
|
@@ -44,33 +45,38 @@
|
|
|
44
45
|
"axios": "^0.27.0",
|
|
45
46
|
"core-js": "^3.21.1",
|
|
46
47
|
"element-theme-chalk": "^2.13",
|
|
47
|
-
"element-ui": "^2.
|
|
48
|
+
"element-ui": "^2.15.9",
|
|
48
49
|
"js-cookie": "^3.0.1",
|
|
49
50
|
"vue": "^2.6.14",
|
|
50
51
|
"vue-axios": "^2.1.5",
|
|
51
52
|
"vue-i18n": "^8.14.0"
|
|
52
53
|
},
|
|
53
54
|
"devDependencies": {
|
|
55
|
+
"@babel/core": "^7.18.5",
|
|
56
|
+
"@babel/eslint-parser": "^7.17.0",
|
|
54
57
|
"@vue/cli-plugin-babel": "^5.0.3",
|
|
55
|
-
"@vue/cli-plugin-eslint": "^5.0.3",
|
|
56
58
|
"@vue/cli-plugin-unit-jest": "^5.0.3",
|
|
57
59
|
"@vue/cli-service": "^5.0.3",
|
|
58
|
-
"@vue/
|
|
59
|
-
"@vue/test-utils": "1.0.0-beta.30",
|
|
60
|
+
"@vue/test-utils": "^1.0.0-beta.31",
|
|
60
61
|
"@vuese/cli": "^2.10.0",
|
|
61
|
-
"babel-core": "7.0.0-bridge.0",
|
|
62
|
-
"babel-eslint": "^10.0.1",
|
|
63
62
|
"babel-jest": "^24.9.0",
|
|
64
63
|
"babel-plugin-module-resolver": "^3.2.0",
|
|
65
|
-
"
|
|
66
|
-
"eslint
|
|
67
|
-
"eslint-
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"
|
|
64
|
+
"babel-plugin-require-context-hook": "^1.0.0",
|
|
65
|
+
"eslint": "^8.9.0",
|
|
66
|
+
"eslint-config-prettier": "^8.4.0",
|
|
67
|
+
"eslint-config-standard": "^17.0.0",
|
|
68
|
+
"eslint-import-resolver-babel-module": "^5.3.1",
|
|
69
|
+
"eslint-plugin-import": "^2.25.2",
|
|
70
|
+
"eslint-plugin-n": "^15.0.0",
|
|
71
|
+
"eslint-plugin-prettier": "^4.0.0",
|
|
72
|
+
"eslint-plugin-promise": "^6.0.0",
|
|
73
|
+
"eslint-plugin-vue": "^9.1.1",
|
|
74
|
+
"node-sass": "^4.14.1",
|
|
75
|
+
"nodemon": "^2.0.2",
|
|
76
|
+
"prettier": "^2.5.1",
|
|
71
77
|
"sass-loader": "^7.1.0",
|
|
78
|
+
"vue": "^2.6.14",
|
|
72
79
|
"vue-template-compiler": "^2.6.10",
|
|
73
|
-
"webpack": "
|
|
74
|
-
"webpack-bundle-analyzer": "^3.5.0"
|
|
80
|
+
"webpack": "4.46.0"
|
|
75
81
|
}
|
|
76
82
|
}
|
|
@@ -276,17 +276,17 @@ export default {
|
|
|
276
276
|
}
|
|
277
277
|
},
|
|
278
278
|
|
|
279
|
-
data() {
|
|
279
|
+
data () {
|
|
280
280
|
return {
|
|
281
281
|
tooltipVisible: false
|
|
282
282
|
}
|
|
283
283
|
},
|
|
284
284
|
|
|
285
285
|
computed: {
|
|
286
|
-
_id() {
|
|
286
|
+
_id () {
|
|
287
287
|
return this.id || this.$options.name
|
|
288
288
|
},
|
|
289
|
-
newItem() {
|
|
289
|
+
newItem () {
|
|
290
290
|
return this.query
|
|
291
291
|
? this.$tpI18n.t('autosuggests.cadastrar', { nameItem: this.query })
|
|
292
292
|
: this.$tpI18n.t(`autosuggests.newItem.${this.$parent.$options.name}`)
|
|
@@ -295,7 +295,7 @@ export default {
|
|
|
295
295
|
/**
|
|
296
296
|
* Trata o caso que o autosuggest recebe um objeto com o valueKey e labelKey
|
|
297
297
|
*/
|
|
298
|
-
formatedValue() {
|
|
298
|
+
formatedValue () {
|
|
299
299
|
let newVal = ''
|
|
300
300
|
if (typeof this.value === 'boolean') {
|
|
301
301
|
newVal = ''
|
|
@@ -315,25 +315,25 @@ export default {
|
|
|
315
315
|
|
|
316
316
|
return newVal
|
|
317
317
|
},
|
|
318
|
-
iconClass() {
|
|
318
|
+
iconClass () {
|
|
319
319
|
return this.visible ? 'arrow-up is-reverse' : 'arrow-up'
|
|
320
320
|
},
|
|
321
|
-
showNewOption() {
|
|
322
|
-
|
|
321
|
+
showNewOption () {
|
|
322
|
+
const hasExistingOption = this.options
|
|
323
323
|
.filter(option => !option.created)
|
|
324
324
|
.some(option => option.currentLabel === this.query)
|
|
325
325
|
return this.filterable && this.allowCreate && !hasExistingOption
|
|
326
326
|
},
|
|
327
327
|
// Monta a lista com ou sem "Cadastrar Novo Item"
|
|
328
|
-
suggestionsList() {
|
|
328
|
+
suggestionsList () {
|
|
329
329
|
if (this.loading) return []
|
|
330
|
-
//transformando em Array
|
|
331
|
-
|
|
330
|
+
// transformando em Array
|
|
331
|
+
const list =
|
|
332
332
|
typeof this.suggestions === 'object'
|
|
333
333
|
? Object.values(this.suggestions)
|
|
334
334
|
: this.suggestions
|
|
335
335
|
if (this.allowCreate) {
|
|
336
|
-
|
|
336
|
+
const createdSuggestion = { created: true }
|
|
337
337
|
createdSuggestion[this.valueKey] = this.query !== '' ? this.query : null
|
|
338
338
|
createdSuggestion[this.labelKey] = ''
|
|
339
339
|
list.push(createdSuggestion)
|
|
@@ -341,12 +341,13 @@ export default {
|
|
|
341
341
|
return list
|
|
342
342
|
},
|
|
343
343
|
|
|
344
|
-
emptyText() {
|
|
344
|
+
emptyText () {
|
|
345
345
|
if (this.loading) {
|
|
346
346
|
return this.loadingText || this.t('el.select.loading')
|
|
347
347
|
} else {
|
|
348
348
|
if (this.remote && this.query === '' && this.options.length === 0) {
|
|
349
|
-
return this.noDataText || this.$tpI18n.t('autosuggests.sem_dados')
|
|
349
|
+
return this.noDataText || this.$tpI18n.t('autosuggests.sem_dados')
|
|
350
|
+
}
|
|
350
351
|
if (this.filterable && this.query && this.options.length > 0 && this.filteredOptionsCount === 0) {
|
|
351
352
|
return this.noMatchText || this.t('el.select.noMatch')
|
|
352
353
|
}
|
|
@@ -358,7 +359,7 @@ export default {
|
|
|
358
359
|
}
|
|
359
360
|
},
|
|
360
361
|
|
|
361
|
-
created() {
|
|
362
|
+
created () {
|
|
362
363
|
this.debouncedOnInputChange = debounce(this.debounce, e => {
|
|
363
364
|
// Correção para mobile ativar a busca enquanto digita
|
|
364
365
|
if (e.isComposing) {
|
|
@@ -374,7 +375,7 @@ export default {
|
|
|
374
375
|
})
|
|
375
376
|
},
|
|
376
377
|
|
|
377
|
-
beforeMount() {
|
|
378
|
+
beforeMount () {
|
|
378
379
|
this.doRequest = false
|
|
379
380
|
|
|
380
381
|
if (this.loadOnCreate) {
|
|
@@ -387,10 +388,10 @@ export default {
|
|
|
387
388
|
}
|
|
388
389
|
},
|
|
389
390
|
|
|
390
|
-
mounted() {
|
|
391
|
+
mounted () {
|
|
391
392
|
this.$nextTick(() => {
|
|
392
393
|
// Componente tooltip -> autosuggest -> input
|
|
393
|
-
|
|
394
|
+
const componenteInputInterno = this.$children[1].$refs.input
|
|
394
395
|
// Mostra o tooltip só quando
|
|
395
396
|
this.createHandler(componenteInputInterno, 'mouseenter', () => {
|
|
396
397
|
if (this.selectedLabel) {
|
|
@@ -406,7 +407,7 @@ export default {
|
|
|
406
407
|
})
|
|
407
408
|
},
|
|
408
409
|
|
|
409
|
-
beforeDestroy() {
|
|
410
|
+
beforeDestroy () {
|
|
410
411
|
document.removeEventListener('focusin', this.fixElSelect, false)
|
|
411
412
|
document.removeEventListener('click', this.fixElSelect, false)
|
|
412
413
|
document.removeEventListener('touchstart', this.fixElSelect, false)
|
|
@@ -419,11 +420,11 @@ export default {
|
|
|
419
420
|
* @args ev {String} Nome do listener (mouseenter, click, etc)
|
|
420
421
|
* @args func {Function} Função a ser executada
|
|
421
422
|
*/
|
|
422
|
-
createHandler(el, ev, func) {
|
|
423
|
+
createHandler (el, ev, func) {
|
|
423
424
|
if (el) {
|
|
424
425
|
el.addEventListener(
|
|
425
426
|
ev,
|
|
426
|
-
function() {
|
|
427
|
+
function () {
|
|
427
428
|
func()
|
|
428
429
|
},
|
|
429
430
|
false
|
|
@@ -431,14 +432,14 @@ export default {
|
|
|
431
432
|
}
|
|
432
433
|
},
|
|
433
434
|
|
|
434
|
-
onInputChange() {
|
|
435
|
+
onInputChange () {
|
|
435
436
|
if (this.filterable && this.query !== this.selectedLabel) {
|
|
436
437
|
this.query = this.selectedLabel
|
|
437
438
|
this.handleQueryChange(this.query)
|
|
438
439
|
}
|
|
439
440
|
},
|
|
440
441
|
|
|
441
|
-
emitChange(val) {
|
|
442
|
+
emitChange (val) {
|
|
442
443
|
if (!valueEquals(this.formatedValue, val)) {
|
|
443
444
|
this.$nextTick(() => {
|
|
444
445
|
this.$emit('change', val, this.createdSelected)
|
|
@@ -447,7 +448,7 @@ export default {
|
|
|
447
448
|
},
|
|
448
449
|
|
|
449
450
|
// eslint-disable-next-line no-unused-vars
|
|
450
|
-
clearTags(event) {
|
|
451
|
+
clearTags (event) {
|
|
451
452
|
this.selectedLabel = ''
|
|
452
453
|
// Faz uma requisição limpa
|
|
453
454
|
this.query = ''
|
|
@@ -467,7 +468,7 @@ export default {
|
|
|
467
468
|
/**
|
|
468
469
|
* Sobrescreve o getOption do select para mostrar o labelValue em vez do idValue
|
|
469
470
|
*/
|
|
470
|
-
getOption(val) {
|
|
471
|
+
getOption (val) {
|
|
471
472
|
let value = ''
|
|
472
473
|
let initialLabel = false
|
|
473
474
|
|
|
@@ -514,16 +515,16 @@ export default {
|
|
|
514
515
|
}
|
|
515
516
|
if (option) return option
|
|
516
517
|
const label = !isObject && !isNull && !isUndefined ? value : ''
|
|
517
|
-
|
|
518
|
-
value
|
|
519
|
-
currentLabel: initialLabel
|
|
518
|
+
const newOption = {
|
|
519
|
+
value,
|
|
520
|
+
currentLabel: initialLabel || label
|
|
520
521
|
}
|
|
521
522
|
if (this.multiple) {
|
|
522
523
|
newOption.hitState = false
|
|
523
524
|
}
|
|
524
525
|
return newOption
|
|
525
526
|
},
|
|
526
|
-
checkDefaultFirstOption() {
|
|
527
|
+
checkDefaultFirstOption () {
|
|
527
528
|
this.$nextTick(() => {
|
|
528
529
|
this.hoverIndex = -1
|
|
529
530
|
|
|
@@ -548,7 +549,7 @@ export default {
|
|
|
548
549
|
/**
|
|
549
550
|
* Sobrescreve a função de abrir menu do select para fazer a busca quando loadOnCreate = false
|
|
550
551
|
*/
|
|
551
|
-
toggleMenu() {
|
|
552
|
+
toggleMenu () {
|
|
552
553
|
if (!this.selectDisabled) {
|
|
553
554
|
// Se mantem visivel quando clica nele aberto
|
|
554
555
|
if (this.menuVisibleOnFocus) {
|
|
@@ -564,7 +565,7 @@ export default {
|
|
|
564
565
|
}
|
|
565
566
|
},
|
|
566
567
|
|
|
567
|
-
handleClose() {
|
|
568
|
+
handleClose () {
|
|
568
569
|
this.visible = false
|
|
569
570
|
// Limpa busca quando fecha
|
|
570
571
|
this.doRequest = true
|
|
@@ -573,14 +574,13 @@ export default {
|
|
|
573
574
|
/**
|
|
574
575
|
* Sobrescreve função do select
|
|
575
576
|
*/
|
|
576
|
-
handleQueryChange(val) {
|
|
577
|
-
|
|
577
|
+
handleQueryChange (val) {
|
|
578
|
+
const _this6 = this
|
|
578
579
|
// Correção aqui para forçar primeeira request com createOnLoad = false
|
|
579
580
|
if (
|
|
580
581
|
(!this.doRequest && this.previousQuery === val) ||
|
|
581
582
|
this.isOnComposition
|
|
582
|
-
)
|
|
583
|
-
return
|
|
583
|
+
) { return }
|
|
584
584
|
if (
|
|
585
585
|
this.previousQuery === null &&
|
|
586
586
|
(typeof this.filterMethod === 'function' ||
|
|
@@ -590,13 +590,13 @@ export default {
|
|
|
590
590
|
return
|
|
591
591
|
}
|
|
592
592
|
this.previousQuery = val
|
|
593
|
-
this.$nextTick(function() {
|
|
593
|
+
this.$nextTick(function () {
|
|
594
594
|
if (_this6.visible) _this6.broadcast('ElSelectDropdown', 'updatePopper')
|
|
595
595
|
})
|
|
596
596
|
this.hoverIndex = -1
|
|
597
597
|
if (this.multiple && this.filterable) {
|
|
598
|
-
this.$nextTick(function() {
|
|
599
|
-
|
|
598
|
+
this.$nextTick(function () {
|
|
599
|
+
const length = _this6.$refs.input.value.length * 15 + 20
|
|
600
600
|
_this6.inputLength = _this6.collapseTags
|
|
601
601
|
? Math.min(50, length)
|
|
602
602
|
: length
|
|
@@ -625,11 +625,11 @@ export default {
|
|
|
625
625
|
},
|
|
626
626
|
|
|
627
627
|
// Correção para habilitar teclado mobile em iOS
|
|
628
|
-
fixElSelect() {
|
|
628
|
+
fixElSelect () {
|
|
629
629
|
document
|
|
630
630
|
.querySelectorAll('.el-select[data-is-search="true"]:hover')
|
|
631
631
|
.forEach(() => {
|
|
632
|
-
|
|
632
|
+
const elInput = document.querySelector(
|
|
633
633
|
'.el-select[data-is-search="true"]:hover input[readonly]'
|
|
634
634
|
)
|
|
635
635
|
if (elInput) {
|
|
@@ -73,39 +73,38 @@ export default {
|
|
|
73
73
|
}
|
|
74
74
|
},
|
|
75
75
|
|
|
76
|
-
data() {
|
|
76
|
+
data () {
|
|
77
77
|
return {
|
|
78
|
-
hideInput: true
|
|
78
|
+
hideInput: true
|
|
79
79
|
}
|
|
80
80
|
},
|
|
81
81
|
|
|
82
82
|
computed: {
|
|
83
|
-
_id(){
|
|
83
|
+
_id () {
|
|
84
84
|
return this.id || this.$options.name
|
|
85
85
|
}
|
|
86
86
|
},
|
|
87
87
|
|
|
88
|
-
mounted() {
|
|
88
|
+
mounted () {
|
|
89
89
|
this.hideInput = this.inputHidden
|
|
90
90
|
},
|
|
91
91
|
|
|
92
92
|
methods: {
|
|
93
|
-
toggleInput() {
|
|
93
|
+
toggleInput () {
|
|
94
94
|
const status = !this.hideInput
|
|
95
95
|
|
|
96
96
|
if (this.readonly) {
|
|
97
97
|
this.hideInput = true
|
|
98
|
-
}
|
|
99
|
-
else if (!this.readonly) {
|
|
98
|
+
} else if (!this.readonly) {
|
|
100
99
|
this.hideInput = status
|
|
101
100
|
if (!this.hideInput) {
|
|
102
|
-
this.$nextTick(function() {
|
|
101
|
+
this.$nextTick(function () {
|
|
103
102
|
this.$refs.inlineInput.focus()
|
|
104
103
|
})
|
|
105
104
|
}
|
|
106
105
|
}
|
|
107
106
|
},
|
|
108
|
-
input(event){
|
|
107
|
+
input (event) {
|
|
109
108
|
this.$emit('input', event)
|
|
110
109
|
}
|
|
111
110
|
}
|
|
@@ -137,4 +136,4 @@ export default {
|
|
|
137
136
|
}
|
|
138
137
|
}
|
|
139
138
|
}
|
|
140
|
-
</style>
|
|
139
|
+
</style>
|
|
@@ -14,7 +14,7 @@ export default {
|
|
|
14
14
|
},
|
|
15
15
|
|
|
16
16
|
computed: {
|
|
17
|
-
displayValue() {
|
|
17
|
+
displayValue () {
|
|
18
18
|
if (this.userInput !== null) {
|
|
19
19
|
return this.userInput
|
|
20
20
|
}
|
|
@@ -44,12 +44,12 @@ export default {
|
|
|
44
44
|
},
|
|
45
45
|
|
|
46
46
|
methods: {
|
|
47
|
-
handleInput(value) {
|
|
47
|
+
handleInput (value) {
|
|
48
48
|
this.userInput = value
|
|
49
49
|
this.$emit('change', Number(value.replace(',', '.')))
|
|
50
50
|
},
|
|
51
51
|
|
|
52
|
-
handleInputChange(value) {
|
|
52
|
+
handleInputChange (value) {
|
|
53
53
|
let newVal
|
|
54
54
|
if (value === '') {
|
|
55
55
|
newVal = 0
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
<div class="tp-loader">
|
|
3
3
|
<div class="wrapper">
|
|
4
4
|
<svg xmlns="http://www.w3.org/2000/svg" width="150px" height="150px">
|
|
5
|
-
<mask id="mascara">
|
|
5
|
+
<mask id="mascara">
|
|
6
6
|
<rect x="0" y="0" width="100%" height="100%" fill="white" />
|
|
7
7
|
<circle id="circulo-interno" class="circulo" cx="45" cy="50" r="40" fill="black" />
|
|
8
8
|
</mask>
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
</template>
|
|
36
36
|
|
|
37
37
|
<script>
|
|
38
|
-
/*
|
|
38
|
+
/*
|
|
39
39
|
Cria componente de loader com overlayer em toda a página
|
|
40
40
|
`<tp-loader />`
|
|
41
41
|
*/
|
|
@@ -65,7 +65,7 @@ export default {
|
|
|
65
65
|
'fad fa-chart-pie-alt'
|
|
66
66
|
])
|
|
67
67
|
}
|
|
68
|
-
}
|
|
68
|
+
}
|
|
69
69
|
}
|
|
70
70
|
</script>
|
|
71
71
|
|
|
@@ -166,7 +166,7 @@ export default {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
}
|
|
169
|
-
|
|
169
|
+
|
|
170
170
|
#bola {
|
|
171
171
|
.residuo {
|
|
172
172
|
animation-name: residuo;
|
|
@@ -179,7 +179,7 @@ export default {
|
|
|
179
179
|
&.top {
|
|
180
180
|
transform-origin: #{$oCenter} #{$oTop};
|
|
181
181
|
|
|
182
|
-
&.right {
|
|
182
|
+
&.right {
|
|
183
183
|
transform-origin: 45% 5%;
|
|
184
184
|
transform: translate(#{$oTrans}, -#{$oTrans}) scale(0.1);
|
|
185
185
|
}
|
|
@@ -224,4 +224,4 @@ export default {
|
|
|
224
224
|
|
|
225
225
|
}
|
|
226
226
|
}
|
|
227
|
-
</style>
|
|
227
|
+
</style>
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
|
|
19
19
|
<template
|
|
20
20
|
v-for="(_, slot) of $scopedSlots"
|
|
21
|
-
|
|
21
|
+
#[slot]="scope"
|
|
22
22
|
>
|
|
23
23
|
<slot
|
|
24
24
|
:name="slot"
|
|
@@ -46,27 +46,27 @@ export default {
|
|
|
46
46
|
|
|
47
47
|
// remove o simbolo em prepend
|
|
48
48
|
removePrepend: {
|
|
49
|
-
type:Boolean,
|
|
49
|
+
type: Boolean,
|
|
50
50
|
default: false
|
|
51
|
-
},
|
|
52
|
-
//valor do campo. Pode ser usado como v-model também
|
|
51
|
+
},
|
|
52
|
+
// valor do campo. Pode ser usado como v-model também
|
|
53
53
|
value: {
|
|
54
54
|
type: [Number, String],
|
|
55
55
|
default: 0
|
|
56
56
|
},
|
|
57
57
|
|
|
58
|
-
//tamanho máximo do campo. limitado por padrão a 21 caracteres por limitações do JS
|
|
58
|
+
// tamanho máximo do campo. limitado por padrão a 21 caracteres por limitações do JS
|
|
59
59
|
maxlength: {
|
|
60
60
|
type: Number,
|
|
61
61
|
default: 21
|
|
62
|
-
}
|
|
62
|
+
}
|
|
63
63
|
},
|
|
64
|
-
|
|
64
|
+
|
|
65
65
|
computed: {
|
|
66
|
-
_id(){
|
|
66
|
+
_id () {
|
|
67
67
|
return this.id || this.$options.name
|
|
68
68
|
},
|
|
69
|
-
|
|
69
|
+
|
|
70
70
|
prepend () {
|
|
71
71
|
return this.t('tp.money.currency')
|
|
72
72
|
}
|