InputNumber add editable
property.
This commit is contained in:
parent
9271ce9d42
commit
7309b43422
3 changed files with 9 additions and 5 deletions
|
@ -6,7 +6,7 @@
|
|||
<!--<div @click="changeMax">change max</div>-->
|
||||
<!--<Input-number disabled :max="10" :min="1" :step="1.2" v-model="v2"></Input-number>-->
|
||||
<!--<Input-number :max="10" :min="1" v-model="obj.v"></Input-number>-->
|
||||
<InputNumber :max="10" :min="1" :step="1.2" v-model="value2"></InputNumber>
|
||||
<InputNumber :editable="false" :max="10" :min="1" :step="1.2" v-model="value2"></InputNumber>
|
||||
<InputNumber :precision="1" :max="10" :min="1" :step="0.1" v-model="value1"></InputNumber>
|
||||
</div>
|
||||
</template>
|
||||
|
|
|
@ -182,15 +182,15 @@
|
|||
watch: {
|
||||
hours (val) {
|
||||
if (!this.compiled) return;
|
||||
this.scroll('hours', this.hoursList.findIndex(obj => obj.text == val));
|
||||
this.scroll('hours', this.hoursList.findIndex(obj => obj.text == val));
|
||||
},
|
||||
minutes (val) {
|
||||
if (!this.compiled) return;
|
||||
this.scroll('minutes', this.minutesList.findIndex(obj => obj.text == val));
|
||||
this.scroll('minutes', this.minutesList.findIndex(obj => obj.text == val));
|
||||
},
|
||||
seconds (val) {
|
||||
if (!this.compiled) return;
|
||||
this.scroll('seconds', this.secondsList.findIndex(obj => obj.text == val));
|
||||
this.scroll('seconds', this.secondsList.findIndex(obj => obj.text == val));
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
@blur="blur"
|
||||
@keydown.stop="keyDown"
|
||||
@change="change"
|
||||
:readonly="readonly"
|
||||
:readonly="readonly || !editable"
|
||||
:name="name"
|
||||
:value="precisionValue">
|
||||
</div>
|
||||
|
@ -102,6 +102,10 @@
|
|||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
editable: {
|
||||
type: Boolean,
|
||||
default: true
|
||||
},
|
||||
name: {
|
||||
type: String
|
||||
},
|
||||
|
|
Loading…
Add table
Reference in a new issue