|
|
@ -302,7 +302,13 @@ |
|
|
|
|
|
|
|
<slot v-if="!!$slots.default"/> |
|
|
|
<view v-else-if="/^text$|^number$|^digit$|^password$/.test(type)" class="textinput"> |
|
|
|
<u-input :placeholder="placeholder||`请输入${labelName}`" :type="type" :disabled="disabled" :value="value" @input="$emit('input',$event)" @blur="/^number$|^digit$/.test(type) && $emit('input', /^\d+$/.test($event)?parseFloat($event):$event)"> |
|
|
|
<u-input |
|
|
|
:placeholder="placeholder||`请输入${labelName}`" |
|
|
|
:type="type" |
|
|
|
:disabled="disabled" |
|
|
|
:value="value" |
|
|
|
@input="$emit('input',$event)" |
|
|
|
@blur="inputBlur"> |
|
|
|
<text v-if="suffix" slot="suffix" style="color:#999;" @click="$emit('suffixFun')">{{typeof suffix=='function'?suffix():suffix}}</text> |
|
|
|
</u-input> |
|
|
|
<button v-if="btnText || btnIcon" @click="btnFun" class="cu-btn bg-green shadow" :class="btnIcon">{{btnText}}</button> |
|
|
@ -506,6 +512,10 @@ import {computeArea} from '@/common/utils' |
|
|
|
type:Function, |
|
|
|
default:()=>'' |
|
|
|
}, |
|
|
|
filter:{ |
|
|
|
type:[Function,Object], |
|
|
|
default:null |
|
|
|
}, |
|
|
|
startPlaceholder:"", |
|
|
|
endPlaceholder:"", |
|
|
|
}, |
|
|
@ -663,6 +673,13 @@ import {computeArea} from '@/common/utils' |
|
|
|
this.$refs.picker.setColumnValues(e.columnIndex+1,e.value[0].children) |
|
|
|
} |
|
|
|
}, |
|
|
|
inputBlur(e){ |
|
|
|
if(/^number$|^digit$/.test(this.type)){ |
|
|
|
this.$emit('input', /^[\d\.]+$/.test(e)?parseFloat(e):e) |
|
|
|
}else if(this.type=='text'&&typeof this.filter=='function'){ |
|
|
|
this.$emit("input",this.filter(e)) |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
openMap(){ |
|
|
|
// uni.navigateTo({url:"/plantPages/massif/mapEditor"}) |
|
|
|