Using a single file component with a pug template, I am faced with multiple input fields that have the same formatting. Here is an example:
.input-group.input-group-sm
.input-group-addon Purchase Price
input.form-control(v-model='purchase_price')
.input-group.input-group-sm
.input-group-addon Net Rental Income
input.form-control(v-model='rental_income_net')
All of these input fields have data properties that are altered using v-model within the component.
I am looking for a way to achieve the same formatting and output while simplifying the process by extracting the bootstrap field boilerplate. Ideally, I would like to be able to write something like this:
cell(title='Purchase Price' v-model='purchase_price')
cell(title='Net Rental Income' v-model='rental_income_net')
However, the above approach does not work as input fields do not seem to accept slots. Additionally, I want to avoid writing extensive event listeners and instead have clean code similar to the example provided. Is this possible?