1
0
mirror of synced 2025-01-31 23:01:39 +03:00

Adds a new data-classification attribute on formulate-element-input-wrapper

This commit is contained in:
Justin Schroeder 2018-02-26 22:23:34 -05:00
parent d4c517c8bc
commit 94e52d4221

View File

@ -3,6 +3,7 @@
<div
class="formulate-element-input-wrapper"
:data-type="type"
:data-type-classification="classification"
>
<!-- TEXT STYLE INPUTS -->
<label
@ -169,6 +170,13 @@ export default {
}
},
computed: {
classification () {
if (this.isBoxInput) return 'box'
if (this.isButtonInput) return 'button'
if (this.isSelectInput) return 'select'
if (this.hasCustomInput) return 'custom'
return 'unsupported'
},
hasCustomInput () {
return (this.$slots.default && this.$slots.default.length)
},