@everchron/ec-shards 7.4.13 → 7.4.15

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": "@everchron/ec-shards",
3
- "version": "7.4.13",
3
+ "version": "7.4.15",
4
4
  "private": false,
5
5
  "description": "Everchron Shards UI Library",
6
6
  "repository": "https://github.com/everchron/ec-shards.git",
@@ -1,6 +1,6 @@
1
1
  <template>
2
2
  <input v-if="type != 'textarea'" class="ecs-form-control"
3
- @input="$emit('input', $event)"
3
+ @input="$emit('input', $event.target.value)"
4
4
  @change="$emit('change', $event)"
5
5
  @keyup="$emit('keyup', $event)"
6
6
  @blur="$emit('blur', $event)"
@@ -24,7 +24,7 @@
24
24
  :id="refr"
25
25
  />
26
26
  <textarea v-else class="ecs-form-control"
27
- @input="$emit('input', $event)"
27
+ @input="$emit('input', $event.target.value)"
28
28
  @change="$emit('change', $event)"
29
29
  @keyup="$emit('keyup', $event)"
30
30
  @blur="$emit('blur', $event)"
@@ -7,7 +7,8 @@
7
7
  v-bind="{ id, name, disabled, required }"
8
8
  :id="id"
9
9
  :name="name"
10
- :class="hasPlaceholder? 'placeholder' : ''" >
10
+ :class="hasPlaceholder? 'placeholder' : ''"
11
+ v-model="currentValue">
11
12
  <option v-if="placeholder" selected hidden disabled>{{placeholder}}</option>
12
13
  <slot></slot>
13
14
  </select>
@@ -96,6 +97,7 @@ export default {
96
97
  this.currentValue = event.target.value;
97
98
  this.hasPlaceholder = false
98
99
  this.$emit('change', event)
100
+ this.$emit('input', this.currentValue)
99
101
  }
100
102
  },
101
103
 
@@ -109,6 +111,7 @@ export default {
109
111
  if (newValue !== this.currentValue) {
110
112
  this.currentValue = newValue
111
113
  this.$emit('change', { target: { value: newValue } });
114
+ this.$emit('input', this.currentValue)
112
115
  }
113
116
  }
114
117
  }
@@ -7,8 +7,14 @@ export default {
7
7
 
8
8
  export const input = () => ({
9
9
  components: { EcsInput },
10
+ data() {
11
+ return {
12
+ name: '',
13
+ }
14
+ },
10
15
  template: `<div>
11
- <ecs-input placeholder="Enter your name" class="mb-2" />
16
+ <div class="mb-2">Name: {{ name }}</div>
17
+ <ecs-input v-model="name" placeholder="Enter your name" class="mb-2" />
12
18
  <ecs-input readonly value="Readonly" class="mb-2" />
13
19
  <ecs-input disabled value="Disabled" />
14
20
  </div>`,
@@ -21,7 +21,8 @@ export const select = () => ({
21
21
  Set to: <button @click="value = 'admin'">admin</button>
22
22
  <button @click="value = 'basic'">basic</button>
23
23
  <button @click="value = 'guest'">guest</button>
24
- <ecs-select class="mb-4" :value="value" @change="update($event.target.value)" id="test" name="testname">
24
+ <div>Set: {{ value }}</div>
25
+ <ecs-select class="mb-4" v-model="value" id="test" name="testname">
25
26
  <option value="admin">Admin</option>
26
27
  <option value="basic">Basic</option>
27
28
  <option value="guest">Guest</option>