input number now has a option to hide the controls
gitea/salix/test This commit looks good
Details
gitea/salix/test This commit looks good
Details
This commit is contained in:
parent
6068ede6ee
commit
43f26d1bc9
|
@ -3,7 +3,7 @@
|
|||
<div class="textField">
|
||||
<div class="leftIcons">
|
||||
<vn-icon-button
|
||||
ng-if="::$ctrl.step"
|
||||
ng-if="$ctrl.controls"
|
||||
icon="remove"
|
||||
ng-click="$ctrl.remove()"
|
||||
tabindex="-1"
|
||||
|
@ -27,7 +27,7 @@
|
|||
<div class="selected underline"></div>
|
||||
<div class="suffix">
|
||||
<vn-icon-button
|
||||
ng-if="::$ctrl.step"
|
||||
ng-if="$ctrl.controls"
|
||||
icon="add"
|
||||
ng-click="$ctrl.add()"
|
||||
tabindex="-1"
|
||||
|
|
|
@ -5,7 +5,7 @@ import './style.scss';
|
|||
export default class InputNumber extends Textfield {
|
||||
constructor($element, $scope, $attrs, vnTemplate, $transclude) {
|
||||
super($element, $scope, $attrs, vnTemplate, $transclude);
|
||||
|
||||
this.displayControls = true;
|
||||
this.input.addEventListener('change', () => {
|
||||
this.validateValue();
|
||||
});
|
||||
|
@ -94,6 +94,7 @@ ngModule.component('vnInputNumber', {
|
|||
min: '<?',
|
||||
max: '<?',
|
||||
step: '<?',
|
||||
displayControls: '<?',
|
||||
rule: '@?',
|
||||
value: '=model',
|
||||
validate: '&',
|
||||
|
|
|
@ -37,7 +37,8 @@
|
|||
min="0"
|
||||
step="1"
|
||||
label="Traveling days"
|
||||
field="$ctrl.zone.travelingDays">
|
||||
field="$ctrl.zone.travelingDays"
|
||||
display-controls="false">
|
||||
</vn-input-number>
|
||||
<vn-input-time
|
||||
vn-two
|
||||
|
@ -50,13 +51,15 @@
|
|||
label="Price"
|
||||
field="$ctrl.zone.price"
|
||||
min="0.00"
|
||||
step="0.50">
|
||||
step="0.20"
|
||||
display-controls="false">
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one
|
||||
label="Bonus"
|
||||
field="$ctrl.zone.bonus"
|
||||
min="0.00"
|
||||
step="0.50">
|
||||
step="0.20"
|
||||
display-controls="false">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
|
|
|
@ -39,7 +39,8 @@
|
|||
value="$ctrl.zone.travelingDays"
|
||||
step="1"
|
||||
label="Traveling days"
|
||||
field="$ctrl.zone.travelingDays">
|
||||
field="$ctrl.zone.travelingDays"
|
||||
display-controls="false">
|
||||
</vn-input-number>
|
||||
<vn-input-time
|
||||
vn-two
|
||||
|
@ -51,12 +52,16 @@
|
|||
<vn-input-number vn-one
|
||||
label="Price"
|
||||
field="$ctrl.zone.price"
|
||||
min="0.00">
|
||||
min="0.00"
|
||||
step="0.20"
|
||||
display-controls="false">
|
||||
</vn-input-number>
|
||||
<vn-input-number vn-one
|
||||
label="Bonus"
|
||||
field="$ctrl.zone.bonus"
|
||||
min="0.00">
|
||||
min="0.00"
|
||||
step="0.20"
|
||||
display-controls="false">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
</vn-card>
|
||||
|
|
Loading…
Reference in New Issue