细节修改

在创建商品的时候保证只有数字能输入,首页搜索框文字更改
This commit is contained in:
英树 2019-06-27 04:47:59 +08:00
parent b5d2213ca0
commit 602bacdc60
2 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,8 @@
// components/createProj/createProj.js
//去除字符串两边留白
String.prototype.trim=function(){
  return this.replace(/(^\s*)|(\s*$)/g, "");
}
var App = getApp();
Page({
@ -172,6 +176,7 @@ Page({
})
break;
case 3: //price
e.detail.value = e.detail.value.trim();
if(e.detail.value) {
let judgePrice = isNaN(e.detail.value)
if(parseInt(e.detail.value)===0){

View File

@ -4,7 +4,7 @@
<view class="cu-bar search bg-white" bindtap="jumpToFuzzy">
<view class="search-form round">
<text class="icon-search"></text>
<input type="text" placeholder="搜索名称、标签" disabled="{{true}}" confirm-type="search"></input>
<input type="text" placeholder="搜索商品名" disabled="{{true}}" confirm-type="search"></input>
</view>
<view class="action">
<button class="cu-btn bg-red shadow-blur round">搜索</button>