@nixweb/nixloc-ui 0.0.68 → 0.0.69

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.68",
3
+ "version": "0.0.69",
4
4
  "description": "Componentes UI",
5
5
  "author": "Fábio Ávila <fabio@nixweb.com.br>",
6
6
  "private": false,
@@ -91,7 +91,7 @@ export default {
91
91
  }
92
92
 
93
93
  .pequeno {
94
- padding: 5px 10px;
94
+ padding: 4px 8px;
95
95
  font-size: 13px;
96
96
  }
97
97
 
@@ -5,6 +5,7 @@
5
5
  v-model="selecionado"
6
6
  :options="opcoes"
7
7
  :stacked="empilhado"
8
+ @click.native="executar"
8
9
  ></b-form-checkbox-group>
9
10
  </b-form-group>
10
11
  </div>
@@ -16,6 +17,10 @@ export default {
16
17
  props: {
17
18
  titulo: String,
18
19
  opcoes: Array,
20
+ params: Object,
21
+ alterou: Function,
22
+ clicou: Function,
23
+ valorInicial: Array,
19
24
  value: Array,
20
25
  empilhado: {
21
26
  type: Boolean,
@@ -28,11 +33,22 @@ export default {
28
33
  };
29
34
  },
30
35
  mounted() {
31
- this.selecionado = this.value;
36
+ this.selecionado = this.valorInicial;
37
+ },
38
+ methods: {
39
+ executar(event) {
40
+ this.$emit("input", this.selecionado);
41
+ let self = this;
42
+ setTimeout(function () {
43
+ // adicionado o pointerId para previnir que não seja executado em duplicidade
44
+ if (self.clicou && event.pointerId === 1) self.clicou(self.params);
45
+ }, 100);
46
+ },
32
47
  },
33
48
  watch: {
34
49
  selecionado() {
35
50
  this.$emit("input", this.selecionado);
51
+ if (this.alterou) this.alterou(this.params);
36
52
  },
37
53
  },
38
54
  };
@@ -1,7 +1,7 @@
1
1
  <template>
2
2
  <div class="principal">
3
3
  <b-row>
4
- <b-col xs="6" sm="6" md="6" lg="4" xl="4">
4
+ <b-col xs="6" sm="6" md="6" lg="6" xl="6">
5
5
  <div class="lado-a-lado titulo">{{ titulo }}</div>
6
6
  </b-col>
7
7
  <b-col xs="6" sm="6" md="6" lg="4" xl="4">