goodteditor-ui 1.0.34 → 1.0.36

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": "goodteditor-ui",
3
- "version": "1.0.34",
3
+ "version": "1.0.36",
4
4
  "main": "index.js",
5
5
  "homepage": "https://goodt-ui.netlify.app/",
6
6
  "scripts": {
@@ -177,19 +177,16 @@ export default {
177
177
  value: {
178
178
  handler(v) {
179
179
  const a = String(v).match(withUnitRegExp);
180
+ const [_, n, u] = a ?? [];
180
181
  const { units } = this;
181
182
  let unit = units.length ? units[0] : '';
182
- let value = '';
183
+ let value = Number.isNaN(Number(v)) ? '' : v;
183
184
 
184
- if (!a) {
185
- value = v;
186
- } else {
187
- const [_, n, u] = a;
188
- if (units.includes(u)) {
189
- value = n;
190
- unit = u;
191
- }
185
+ if (units.includes(u)) {
186
+ value = n;
187
+ unit = u;
192
188
  }
189
+
193
190
  this.dataListCursorIndex = units.indexOf(unit);
194
191
  this.model = { value, unit };
195
192
  },
@@ -149,7 +149,7 @@
149
149
  }"
150
150
  :key="index"
151
151
  :title="getOptionLabel(option)"
152
- @click="toggleOption(option)"
152
+ @click.stop="toggleOption(option)"
153
153
  >
154
154
  <div class="row row-collapse" v-if="multiple">
155
155
  <div class="col col-vmid text-truncate">