Skip to content

04 Buttons - v_button

v_button

Standard button component.

Features:

  • Optional confirmation dialog before action
  • Loading indicator and lock button during action

Notes:

  • To disable button use class xd-disabled

Props:

  • url { type: String, required: true },
  • model Object,
  • confirm { type: Boolean, default: false },
  • confirmtext { type: String, default: "v_modal_confirm_header" },
  • method default: 'post' optional 'get'
  • standard html title, class ...

Events:

  • @updated

Examples

Example 1

HTML
1
2
3
4
5
<v_button 
  url="/api/core/system/ping" 
  @updated="YourFunction($event)">
  Hello
</v_button>

Example 2

Post + confirm

HTML
1
2
3
4
5
6
<v_button 
  :confirm="true" 
  :url="'/api/srs/536/api?pscope=setAsRejected&invoiceID=' + $route.query.invoiceid"
  @updated="parentTriggerFetchData()">
  Reject invoice
</v_button>