diff --git a/pages/plugins/video/components/search.vue b/pages/plugins/video/components/search.vue index c0f0a6f5..5f981b41 100644 --- a/pages/plugins/video/components/search.vue +++ b/pages/plugins/video/components/search.vue @@ -1,12 +1,12 @@ @@ -26,11 +26,16 @@ export default { propIsDisabled: { type: Boolean, default: false + }, + propWidth: { + type: Number, + default: 0 } }, data() { return { - search_keywords: '' + search_keywords: '', + search_width_style: '', } }, watch: { @@ -39,6 +44,15 @@ export default { this.search_keywords = newVal; }, immediate: true + }, + propWidth: { + handler(newVal, oldVal) { + console.log(newVal, oldVal); + if (newVal !== oldVal && newVal > 0) { + this.search_width_style = 'width:' + newVal - 40 + 'px;'; + } + }, + immediate: true } }, created() { @@ -66,44 +80,46 @@ export default { /* 搜索框 */ .search-bar { display: flex; + flex-direction: row; align-items: center; background: rgba(255,255,255,0.5); border-radius: 38rpx; border: 2rpx solid #313131; - height: 100%; + height: 80rpx; margin: 0 24rpx; - .search-iconfont-container { - padding: 16rpx 30rpx; - padding-right: 20rpx; - } - input { - flex: 1; - height: 100%; - padding: 16rpx 0; - box-sizing: border-box; - background: transparent; - } - .search-line { - width: 2rpx; - height: 100%; - padding: 16rpx 0; - margin-left: 20rpx; - background-color: #eee; - } - .search-button { - font-weight: 500; - font-size: 28rpx; - color: #333333; - line-height: 20px; - padding: 16rpx 30rpx 16rpx 20rpx; - } - .search-mask { - position: absolute; - top: 0; - left: 0; - width: 100%; - height: 100%; - z-index: 99; - } +} +.search-iconfont-container { + padding: 16rpx 30rpx; + padding-right: 20rpx; +} +input { + flex: 1; + height: 76rpx; + padding: 16rpx 0; + box-sizing: border-box; + background: transparent; +} +.search-line { + width: 2rpx; + height: 44rpx; + margin: 16rpx 0; + margin-left: 20rpx; + box-sizing: border-box; + background-color: #eee; +} +.search-button { + font-weight: 500; + font-size: 28rpx; + color: #333333; + line-height: 20px; + padding: 16rpx 30rpx 16rpx 20rpx; +} +.search-mask { + position: absolute; + top: 0; + left: 0; + width: 100%; + height: 80rpx; + z-index: 99; } \ No newline at end of file diff --git a/pages/plugins/video/detail/detail.nvue b/pages/plugins/video/detail/detail.nvue index bd3b9ad5..8dd37184 100644 --- a/pages/plugins/video/detail/detail.nvue +++ b/pages/plugins/video/detail/detail.nvue @@ -65,21 +65,20 @@ - - - - - - - - - - - - - - - + + + + + + + + + + + + + +