Skip to content

Commit 3fbde6c

Browse files
committed
feat: Allow normal and inverted setup for QSearch
1 parent 0c25ceb commit 3fbde6c

File tree

3 files changed

+15
-2
lines changed

3 files changed

+15
-2
lines changed

dev/components/form/search.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,15 @@
1414
<q-search stack-label="Stack Label" v-model="search" color="amber" icon="local_hotel" placeholder="Hotels"></q-search>
1515
</div>
1616

17+
<div style="margin-top: 15px">
18+
<q-search inverted v-model="search" align="right" suffix="Quasar" style="width: 300px"></q-search>
19+
<q-search inverted v-model="search" color="orange"></q-search>
20+
<q-search inverted v-model="search" color="secondary" icon="explore" placeholder="PlacesPlacesPlacesPlacesPlacesPlacesPlaces"></q-search>
21+
<q-search inverted v-model="search" color="primary" icon="local_airport" placeholder="Airports"></q-search>
22+
<q-search inverted v-model="search" color="dark" icon="local_hotel" placeholder="Hotels"></q-search>
23+
<q-search inverted stack-label="Stack Label" v-model="search" color="amber" icon="local_hotel" placeholder="Hotels"></q-search>
24+
</div>
25+
1726
<p class="caption">Numeric Format</p>
1827
<div class="label bg-secondary text-white">
1928
Model <span class="right-detail"><em>{{numberModel}}</em></span>

src/components/input-frame/QInputFrame.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<q-icon
99
v-for="item in before"
1010
:key="item"
11-
class="q-if-control"
11+
class="q-if-control q-if-control-before"
1212
:class="{hidden: item.content && !length}"
1313
:name="item.icon"
1414
@click="item.handler"

src/components/search/QSearch.vue

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,11 @@ export default {
9797
return [{icon: this.icon, handler: this.focus}]
9898
},
9999
controlAfter () {
100-
return [{icon: 'clear', content: true, handler: this.clearAndFocus}]
100+
return [{
101+
icon: this.inverted ? 'clear' : 'cancel',
102+
content: true,
103+
handler: this.clearAndFocus
104+
}]
101105
}
102106
},
103107
methods: {

0 commit comments

Comments
 (0)