1111
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
<text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue <= min || disabled }"
|
<text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue <= min || disabled }"
|
||||||
:style="{color}">-</text>
|
:style="{color}">-</text>
|
||||||
</view>
|
</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}" />
|
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}">
|
<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 }"
|
<text class="uni-numbox--text" :class="{ 'uni-numbox--disabled': inputValue >= max || disabled }"
|
||||||
:style="{color}">+</text>
|
:style="{color}">+</text>
|
||||||
@@ -65,6 +65,10 @@
|
|||||||
disabled: {
|
disabled: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
},
|
||||||
|
showTextView: {
|
||||||
|
type: Boolean,
|
||||||
|
default: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
@@ -90,12 +94,6 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
showText() {
|
|
||||||
this.showText = true
|
|
||||||
},
|
|
||||||
showEdit() {
|
|
||||||
this.showText = false
|
|
||||||
},
|
|
||||||
_calcValue(type) {
|
_calcValue(type) {
|
||||||
if (this.disabled) {
|
if (this.disabled) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user