Changeset View
Changeset View
Standalone View
Standalone View
src/resources/vue/Widgets/ListInput.vue
Show All 18 Lines | <div class="list-input" :id="id"> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</div> | </div> | ||||
</template> | </template> | ||||
<script> | <script> | ||||
export default { | export default { | ||||
props: { | props: { | ||||
'list': { type: Array, default: () => [] }, | list: { type: Array, default: () => [] }, | ||||
'id': { type: String, default: '' } | id: { type: String, default: '' } | ||||
}, | }, | ||||
methods: { | methods: { | ||||
addItem() { | addItem() { | ||||
let input = $(this.$el).find('.main-input') | let input = $(this.$el).find('.main-input') | ||||
let value = input.val() | let value = input.val() | ||||
if (value) { | if (value) { | ||||
this.list.push(value) | this.list.push(value) | ||||
Show All 19 Lines |