@nixweb/nixloc-ui 0.0.297 → 0.0.298

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nixweb/nixloc-ui",
3
- "version": "0.0.297",
3
+ "version": "0.0.298",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -6,7 +6,7 @@
6
6
  <div class="wrapper">
7
7
  <span :class="{ disabled: disabled }" class="minus" @click="decrement">-</span>
8
8
  <span :class="{ disabled: disabled }" class="num" @click="showEdit = true" v-if="!showEdit">{{ number }}</span>
9
- <input v-if="showEdit" class="input" type="number" @keyup.enter.prevent="showEdit = false" :disabled="disabled"
9
+ <input v-if="showEdit" class="input" type="number" @keyup.enter.prevent="enter" :disabled="disabled"
10
10
  v-model="number" />
11
11
  <span v-if="showEdit" :class="{ disabled: disabled }" @click="showEdit = false">
12
12
  <i class="fa-solid fa-check"></i>
@@ -31,6 +31,7 @@ export default {
31
31
  "triggerEvent",
32
32
  "min",
33
33
  "max",
34
+ "changed"
34
35
  ],
35
36
  data() {
36
37
  return {
@@ -56,11 +57,17 @@ export default {
56
57
  this.executeFilter();
57
58
  }
58
59
  },
60
+ enter(){
61
+ this.showEdit = false;
62
+ if (this.changed) this.changed();
63
+ },
59
64
  executeFilter() {
60
65
  if (this.fieldTarget) {
61
66
  let obj = { fieldTarget: this.fieldTarget, value: this.number };
62
67
  this.addFilter(obj);
63
68
  }
69
+
70
+ if (this.changed) this.changed();
64
71
  },
65
72
  },
66
73
  watch: {
@@ -6,20 +6,11 @@
6
6
  <Tip :field="field" :formName="formName" />
7
7
  </label>
8
8
  <div class="inner-addon right-addon">
9
- <i
10
- v-if="notifications.length > 0 && formDirty"
11
- class="required glyphicon fas fa-exclamation-triangle"
12
- ></i>
9
+ <i v-if="notifications.length > 0 && formDirty" class="required glyphicon fas fa-exclamation-triangle"></i>
13
10
  <slot v-else></slot>
14
- <input
15
- type="password"
16
- :placeholder="titlePlaceholder"
17
- v-mask="mask || withoutMask"
18
- v-bind:value="value"
19
- v-on:input="$emit('input', $event.target.value)"
20
- class="form-control"
21
- :class="{ required: notifications.length > 0 && formDirty }"
22
- />
11
+ <input type="password" :disabled="disabled" :placeholder="titlePlaceholder" v-mask="mask || withoutMask"
12
+ v-bind:value="value" v-on:input="$emit('input', $event.target.value)" class="form-control"
13
+ :class="{ required: notifications.length > 0 && formDirty }" />
23
14
  </div>
24
15
  <div v-if="formDirty">
25
16
  <div v-for="message in notifications" :key="message">
@@ -42,6 +33,7 @@ export default {
42
33
  "field",
43
34
  "titleColor",
44
35
  "placeholder",
36
+ "disabled",
45
37
  "mask",
46
38
  "formName",
47
39
  "required",
@@ -144,6 +136,7 @@ input::placeholder {
144
136
  color: #94aa2a;
145
137
  font-size: 14px;
146
138
  }
139
+
147
140
  .invalid {
148
141
  color: #f0134d;
149
142
  font-size: 14px;