1111
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
<text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue <= min || disabled }"
|
||||
:style="{color}">-</text>
|
||||
</view>
|
||||
<input v-if="!showText" :disabled="disabled" @focus="_onFocus" @blur="_onBlur" class="uni-numbox__value"
|
||||
<input v-if="!showTextView" :disabled="disabled" @focus="_onFocus" @blur="_onBlur" class="uni-numbox__value"
|
||||
type="number" v-model="inputValue" :style="{background, color}" />
|
||||
<view v-if="showText" class="uni-numbox__value" :style="{background, color}">{{inputValue}}</view>
|
||||
<view v-if="showTextView" class="uni-numbox__value" :style="{background, color}">{{inputValue}}</view>
|
||||
<view @click="_calcValue('plus')" class="uni-numbox__plus uni-numbox-btns" :style="{background}">
|
||||
<text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue >= max || disabled }"
|
||||
:style="{color}">+</text>
|
||||
@@ -65,6 +65,10 @@
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
showTextView: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
},
|
||||
data() {
|
||||
@@ -90,12 +94,6 @@
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
showText() {
|
||||
this.showText = true
|
||||
},
|
||||
showEdit() {
|
||||
this.showText = false
|
||||
},
|
||||
_calcValue(type) {
|
||||
if (this.disabled) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user