Skip to content
This repository was archived by the owner on Dec 13, 2019. It is now read-only.

feat(QInput, QChipsInput, QUploader): Add custom loading slot as QBtn #586

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions source/components/chips-input.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@ framework: {

<!-- On error state -->
<q-chips-input v-model="model" error />

<!-- With custom loading spinner -->
<q-chips-input v-model="model">
<q-spinner-oval slot="loading" />
</q-chips-input>
```

> The model variable must be an Array.
Expand Down
5 changes: 5 additions & 0 deletions source/components/input-textfield.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@ framework: {
:max-height="100"
rows="7"
/><!-- max-height refers to pixels -->

<!-- With custom loading spinner -->
<q-input v-model="text">
<q-spinner-oval slot="loading" />
</q-input>
```

## Vue Properties
Expand Down
14 changes: 14 additions & 0 deletions source/components/uploader.md
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,20 @@ Examples:
/>
```

### Custom Spinner
By default, when the Uploader component is in `uploading` state, it displays the default theme spinner to indicate such state. It is possible to customize the spinner used by defining a `loading` slot, as below:

```html
<q-uploader
:url="url">
<!--
Notice slot="loading". This is optional.
If missing, the default theme spinner will be used.
-->
<q-spinner-bars slot="loading" />
</q-uploader>
```

## Vue Methods
| Vue Method | Description |
| --- | --- |
Expand Down