You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: demo/src/markdown/iconpicker.md
+85-1Lines changed: 85 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -64,7 +64,7 @@ export default {
64
64
65
65
If you are using a large icon set and find it is taking too long to load, you can pre-cache the UMD variant.
66
66
67
-
You can do this by adding to your **App.vue** (or, any other appropriate) file:
67
+
You can do this by adding to your **App.vue** (or, any other appropriate) file, one or more of the UMD icon-set variants:
68
68
69
69
:::
70
70
```html
@@ -195,3 +195,87 @@ Most icon sets are very large which may cause performance issues.
195
195
::: tip
196
196
In order to work properly, QIconPicker needs a specified height in it's style (or parent style).
197
197
:::
198
+
199
+
# Categories (tags)
200
+
Added in **v1.0.7**, you can now get categories (tags) for the associated loaded icon set.
201
+
202
+
As of this writing, the **Eva** and **Material Design** icon sets are done. The **Fontawesome v5** icon set is partially done. If you need an icon set that **needs** to be completed and is not, PRs are welcomed or DM me on the Discord channel.
203
+
204
+
You can get the tags viw the `tag` event.
205
+
206
+
```html
207
+
<q-icon-picker
208
+
v-model="name"
209
+
:filter="filter"
210
+
:icon-set="iconSet"
211
+
:tags="tags"
212
+
font-size="3em"
213
+
tooltips
214
+
:pagination.sync="pagination"
215
+
@tags="onTags"
216
+
style="height: calc(100vh-140px)"
217
+
/>
218
+
```
219
+
220
+
Notice the `@tags="onTags"`. Capturing this is a bit tricky. You need to set a guard to stop potential end-less loop in your Vue code (depending on how you use it). In your `data ()` function set a guard variable; in this case `loaded`:
221
+
222
+
```js
223
+
data () {
224
+
return {
225
+
loaded:false, // guard var
226
+
tags: [], // user selected tags to pass to QIconPicker
227
+
categories: [], // keep track of categories
228
+
selected: {} // keep track of user selected categories
229
+
}
230
+
```
231
+
232
+
in your `methods` section, add the event handler, and put the guard in to stop potential recursion:
0 commit comments