Merge branch master into rewrite-watch-video-info
This commit is contained in:
commit
274d5dbc86
|
@ -17758,7 +17758,8 @@
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"schema-utils": {
|
"schema-utils": {
|
||||||
|
@ -20368,7 +20369,8 @@
|
||||||
},
|
},
|
||||||
"minimist": {
|
"minimist": {
|
||||||
"version": "1.2.0",
|
"version": "1.2.0",
|
||||||
"resolved": "",
|
"resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.0.tgz",
|
||||||
|
"integrity": "sha1-o1AIsg9BOD7sH7kU9M1d95omQoQ=",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
"string-width": {
|
"string-width": {
|
||||||
|
|
|
@ -19,10 +19,18 @@ export default Vue.extend({
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
dropdownPosition: {
|
forceDropdown: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
|
},
|
||||||
|
dropdownPositionX: {
|
||||||
type: String,
|
type: String,
|
||||||
default: 'center'
|
default: 'center'
|
||||||
},
|
},
|
||||||
|
dropdownPositionY: {
|
||||||
|
type: String,
|
||||||
|
default: 'bottom'
|
||||||
|
},
|
||||||
dropdownNames: {
|
dropdownNames: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => { return [] }
|
default: () => { return [] }
|
||||||
|
@ -43,7 +51,7 @@ export default Vue.extend({
|
||||||
},
|
},
|
||||||
|
|
||||||
handleIconClick: function () {
|
handleIconClick: function () {
|
||||||
if (this.dropdownNames.length > 0 && this.dropdownValues.length > 0) {
|
if (this.forceDropdown || (this.dropdownNames.length > 0 && this.dropdownValues.length > 0)) {
|
||||||
this.toggleDropdown()
|
this.toggleDropdown()
|
||||||
} else {
|
} else {
|
||||||
this.$emit('click')
|
this.$emit('click')
|
||||||
|
|
|
@ -13,12 +13,14 @@
|
||||||
@click="handleIconClick"
|
@click="handleIconClick"
|
||||||
/>
|
/>
|
||||||
<div
|
<div
|
||||||
v-if="dropdownNames.length > 0 && showDropdown"
|
v-if="showDropdown"
|
||||||
class="iconDropdown"
|
class="iconDropdown"
|
||||||
:class="{
|
:class="{
|
||||||
left: dropdownPosition === 'left',
|
left: dropdownPositionX === 'left',
|
||||||
right: dropdownPosition === 'right',
|
right: dropdownPositionX === 'right',
|
||||||
center: dropdownPosition === 'center'
|
center: dropdownPositionX === 'center',
|
||||||
|
bottom: dropdownPositionY === 'bottom',
|
||||||
|
top: dropdownPositionY === 'top'
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<ul class="list">
|
<ul class="list">
|
||||||
|
@ -31,6 +33,21 @@
|
||||||
{{ label }}
|
{{ label }}
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
<slot>
|
||||||
|
<ul
|
||||||
|
class="list"
|
||||||
|
v-if="dropdownNames.length > 0"
|
||||||
|
>
|
||||||
|
<li
|
||||||
|
v-for="(label, index) in dropdownNames"
|
||||||
|
:key="index"
|
||||||
|
class="listItem"
|
||||||
|
@click="handleDropdownClick(index)"
|
||||||
|
>
|
||||||
|
{{ label }}
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</slot>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
title="More Options"
|
title="More Options"
|
||||||
theme="base"
|
theme="base"
|
||||||
:use-shadow="false"
|
:use-shadow="false"
|
||||||
dropdown-position="left"
|
dropdown-position-x="left"
|
||||||
:dropdown-names="optionsNames"
|
:dropdown-names="optionsNames"
|
||||||
:dropdown-values="optionsValues"
|
:dropdown-values="optionsValues"
|
||||||
@click="handleOptionsClick"
|
@click="handleOptionsClick"
|
||||||
|
|
|
@ -36,6 +36,10 @@ export default Vue.extend({
|
||||||
type: String,
|
type: String,
|
||||||
required: true
|
required: true
|
||||||
},
|
},
|
||||||
|
published: {
|
||||||
|
type: Number,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
viewCount: {
|
viewCount: {
|
||||||
type: Number,
|
type: Number,
|
||||||
required: true
|
required: true
|
||||||
|
|
|
@ -25,6 +25,7 @@
|
||||||
:channel-id="channelId"
|
:channel-id="channelId"
|
||||||
:channel-name="channelName"
|
:channel-name="channelName"
|
||||||
:channel-thumbnail="channelThumbnail"
|
:channel-thumbnail="channelThumbnail"
|
||||||
|
:published="videoPublished"
|
||||||
:subscription-count-text="channelSubscriptionCountText"
|
:subscription-count-text="channelSubscriptionCountText"
|
||||||
:like-count="videoLikeCount"
|
:like-count="videoLikeCount"
|
||||||
:dislike-count="videoDislikeCount"
|
:dislike-count="videoDislikeCount"
|
||||||
|
|
Loading…
Reference in New Issue