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