Skip to content

Commit d91c8ed

Browse files
author
Damian Dulisz
committed
[v1.1.1] Fix for partial registering
1 parent 98d866a commit d91c8ed

File tree

8 files changed

+15
-30
lines changed

8 files changed

+15
-30
lines changed

docs/main.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ new Vue({
5959
firstColor: Math.floor(Math.random() * 255),
6060
secondColor: Math.floor(Math.random() * 255),
6161
styleList: [
62-
{ title: 'Space Pirate', desc: 'More space battles!', img: '/static/posters/fleet.png' },
63-
{ title: 'Merchant', desc: 'PROFIT!', img: '/static/posters/trading_post.png' },
64-
{ title: 'Explorer', desc: 'Discovering new species!', img: '/static/posters/creatures.png' },
65-
{ title: 'Miner', desc: 'We need to go deeper!', img: '/static/posters/resource_lab.png' }
62+
{ title: 'Space Pirate', desc: 'More space battles!', img: 'static/posters/fleet.png' },
63+
{ title: 'Merchant', desc: 'PROFIT!', img: 'static/posters/trading_post.png' },
64+
{ title: 'Explorer', desc: 'Discovering new species!', img: 'static/posters/creatures.png' },
65+
{ title: 'Miner', desc: 'We need to go deeper!', img: 'static/posters/resource_lab.png' }
6666
],
67-
selectedStyle: { title: 'Explorer', desc: 'Discovering new species!', img: '/static/posters/creatures.png' }
67+
selectedStyle: { title: 'Explorer', desc: 'Discovering new species!', img: 'static/posters/creatures.png' }
6868
}
6969
},
7070
computed: {

lib/Multiselect.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
@mousedown.prevent="select(option)"
7575
@mouseenter="pointerSet($index)"
7676
class="multiselect__option">
77-
<partial :name="optionPartial"></partial>
77+
<partial :name="optionPartial" v-if="optionPartial.length"></partial>
78+
<span v-else v-text="getOptionLabel(option)"></span>
7879
</li>
7980
</template>
8081
<li v-show="filteredOptions.length === 0 && search">
@@ -90,10 +91,6 @@
9091
<script>
9192
import multiselectMixin from './multiselectMixin'
9293
import pointerMixin from './pointerMixin'
93-
import optionPartial from './optionPartial.html'
94-
import Vue from 'vue'
95-
96-
Vue.partial('multiselectBasicOptionPartial', optionPartial)
9794
9895
export default {
9996
mixins: [multiselectMixin, pointerMixin],
@@ -105,7 +102,7 @@
105102
*/
106103
optionPartial: {
107104
type: String,
108-
default: 'multiselectBasicOptionPartial'
105+
default: ''
109106
},
110107
/**
111108
* String to show when pointing to an option

lib/optionPartial.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

lib/vue-multiselect.min.js

Lines changed: 2 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/vue-multiselect.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vue-multiselect",
3-
"version": "1.1.0",
3+
"version": "1.1.1",
44
"description": "Multiselect component for vue.js",
55
"author": "Damian Dulisz <damian.dulisz@monterail.com>",
66
"private": false,

src/Multiselect.vue

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@
7474
@mousedown.prevent="select(option)"
7575
@mouseenter="pointerSet($index)"
7676
class="multiselect__option">
77-
<partial :name="optionPartial"></partial>
77+
<partial :name="optionPartial" v-if="optionPartial.length"></partial>
78+
<span v-else v-text="getOptionLabel(option)"></span>
7879
</li>
7980
</template>
8081
<li v-show="filteredOptions.length === 0 && search">
@@ -90,10 +91,6 @@
9091
<script>
9192
import multiselectMixin from './multiselectMixin'
9293
import pointerMixin from './pointerMixin'
93-
import optionPartial from './optionPartial.html'
94-
import Vue from 'vue'
95-
96-
Vue.partial('multiselectBasicOptionPartial', optionPartial)
9794
9895
export default {
9996
mixins: [multiselectMixin, pointerMixin],
@@ -105,7 +102,7 @@
105102
*/
106103
optionPartial: {
107104
type: String,
108-
default: 'multiselectBasicOptionPartial'
105+
default: ''
109106
},
110107
/**
111108
* String to show when pointing to an option

src/optionPartial.html

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)