diff --git a/components/search/search.vue b/components/search/search.vue index 8c28043d..e1f1e0d5 100644 --- a/components/search/search.vue +++ b/components/search/search.vue @@ -8,7 +8,7 @@ type="text" confirm-type="search" :class="'input round wh-auto dis-block '+propClass" - :placeholder="(propPlaceholder || this.$t('search.search.660us5'))" + :placeholder="(propPlaceholder || propPlaceholderValue || this.$t('search.search.660us5'))" :placeholder-class="propPlaceholderClass" :value="propDefaultValue" :focus="propFocus" @@ -40,14 +40,18 @@ propFormName: { type: String, default: 'keywords', + }, + propDefaultValue: { + type: String, + default: '', }, propPlaceholder: { type: String, default: '', - }, - propDefaultValue: { - type: String, - default: '', + }, + propPlaceholderValue: { + type: String, + default: '', }, propPlaceholderClass: { type: String, @@ -169,24 +173,25 @@ // 搜索确认事件 search_submit_confirm_event() { - // 是否验证必须要传值 - if (this.propIsRequired && this.input_value === '') { + // 是否验证必须要传值 + var value = this.input_value || this.propPlaceholderValue; + if (this.propIsRequired && value === '') { app.globalData.showToast(this.$t('search.search.ic9b89')); return false; } // 是否回调事件 if (this.propIsOnEvent) { - this.$emit('onsearch', this.input_value); + this.$emit('onsearch', value); } else { // 进入搜索页面 - app.globalData.url_open(this.propUrl + '?' + this.propFormName + '=' + this.input_value); + app.globalData.url_open(this.propUrl + '?' + this.propFormName + '=' + value); } }, // 搜索确认(外部调用直接跳转搜索) - search_submit_confirm(input_value = '') { - app.globalData.url_open(this.propUrl + '?' + this.propFormName + '=' + input_value); + search_submit_confirm(value = '') { + app.globalData.url_open(this.propUrl + '?' + this.propFormName + '=' + value); }, // icon事件 diff --git a/pages/goods-search-start/goods-search-start.css b/pages/goods-search-start/goods-search-start.css index e2b6d6a3..4833c839 100644 --- a/pages/goods-search-start/goods-search-start.css +++ b/pages/goods-search-start/goods-search-start.css @@ -7,4 +7,7 @@ } .ranking-list .goods-list .goods-title { width: calc(100% - 120rpx); +} +.ranking-list .goods-list .single-text { + width: 54vw; } \ No newline at end of file diff --git a/pages/goods-search-start/goods-search-start.vue b/pages/goods-search-start/goods-search-start.vue index d1304d2b..bdc16497 100644 --- a/pages/goods-search-start/goods-search-start.vue +++ b/pages/goods-search-start/goods-search-start.vue @@ -3,7 +3,7 @@ - + @@ -42,8 +42,21 @@ - - {{item2.title}} + + + + {{index2}} + + {{item2.title}} + + + + + {{index2}} + + + {{item2.title}} + @@ -75,6 +88,7 @@ history_keywords: [], recommend_keywords: [], ranking_list: [], + search_placeholder_keywords_value: '', search_keywords_value: '', }; }, @@ -93,7 +107,7 @@ params = app.globalData.launch_params_handle(params); this.setData({ params: params, - search_keywords_value: params.keywords || '', + search_placeholder_keywords_value: params.keywords || '', }); }, diff --git a/pages/password/password.vue b/pages/password/password.vue index 546738a3..4464cc56 100644 --- a/pages/password/password.vue +++ b/pages/password/password.vue @@ -8,15 +8,15 @@ - + - + - + diff --git a/pages/plugins/ask/components/ask-comments/ask-comments.vue b/pages/plugins/ask/components/ask-comments/ask-comments.vue index 2efe0bd8..10276704 100644 --- a/pages/plugins/ask/components/ask-comments/ask-comments.vue +++ b/pages/plugins/ask/components/ask-comments/ask-comments.vue @@ -6,15 +6,15 @@ - + {{$t('ask-comments.ask-comments.2zlnb5')}}{{ data.comments_count }}) - + {{$t('ask-comments.ask-comments.du7rcv')}}{{ data.give_thumbs_count }}) - + {{$t('common.share')}} @@ -50,11 +50,11 @@ {{ item.content }} - + {{$t('ask-comments.ask-comments.3fcnme')}}{{ item.comments_count }}) - + {{$t('ask-comments.ask-comments.du7rcv')}}{{ item.give_thumbs_count }}) @@ -72,11 +72,11 @@ {{ comments.content }} - + {{$t('ask-comments.ask-comments.3fcnme')}}{{ comments.comments_count }}) - + {{$t('ask-comments.ask-comments.du7rcv')}}{{ comments.give_thumbs_count }}) diff --git a/pages/plugins/binding/detail/detail.vue b/pages/plugins/binding/detail/detail.vue index b5c229fd..38e008cb 100644 --- a/pages/plugins/binding/detail/detail.vue +++ b/pages/plugins/binding/detail/detail.vue @@ -34,7 +34,7 @@ - + diff --git a/pages/plugins/blog/components/blog-comments/blog-comments.vue b/pages/plugins/blog/components/blog-comments/blog-comments.vue index 1abf7f14..af2852ef 100644 --- a/pages/plugins/blog/components/blog-comments/blog-comments.vue +++ b/pages/plugins/blog/components/blog-comments/blog-comments.vue @@ -6,15 +6,15 @@ - + {{$t('ask-comments.ask-comments.2zlnb5')}}{{ data.comments_count }}) - + {{$t('ask-comments.ask-comments.du7rcv')}}{{ data.give_thumbs_count }}) - + {{$t('common.share')}} @@ -50,11 +50,11 @@ {{ item.content }} - + {{$t('ask-comments.ask-comments.3fcnme')}}{{ item.comments_count }}) - + {{$t('ask-comments.ask-comments.du7rcv')}}{{ item.give_thumbs_count }}) @@ -72,7 +72,7 @@ {{ comments.content }} - + {{$t('ask-comments.ask-comments.3fcnme')}}{{ comments.comments_count }}) - + {{$t('ask-comments.ask-comments.du7rcv')}}{{ comments.give_thumbs_count }}) diff --git a/pages/plugins/coin/detail/detail.vue b/pages/plugins/coin/detail/detail.vue index 5126f58b..013394d7 100644 --- a/pages/plugins/coin/detail/detail.vue +++ b/pages/plugins/coin/detail/detail.vue @@ -21,7 +21,7 @@ - + diff --git a/pages/plugins/coin/user/user.vue b/pages/plugins/coin/user/user.vue index 40e1647e..03ef9142 100644 --- a/pages/plugins/coin/user/user.vue +++ b/pages/plugins/coin/user/user.vue @@ -10,7 +10,7 @@ {{ is_price_show ? accounts_summary : '***' }} - + diff --git a/pages/plugins/wallet/user/user.vue b/pages/plugins/wallet/user/user.vue index ec3ccaf2..39fa5ba8 100644 --- a/pages/plugins/wallet/user/user.vue +++ b/pages/plugins/wallet/user/user.vue @@ -27,7 +27,7 @@ - +