This commit is contained in:
2020-10-08 15:11:08 +00:00
parent 09ad8af59d
commit ef5027fae1
3 changed files with 11 additions and 8 deletions

View File

@@ -319,7 +319,7 @@ export default {
break;
case 8:
case 7:
if (!window.$gz._.isNumber(ret)) {
if (!window.$gz.util.isNumeric(ret)) {
ret = window.$gz.util.stringToFloat(ret);
break;

View File

@@ -107,7 +107,7 @@ export default {
methods: {
addTag() {
let theTag = this.tagSearchEntry;
theTag = this.normalizeTag(theTag);
theTag = window.$gz.util.normalizeTag(theTag);
//Maybe need to make sure there are no existing of the same tag? Although that shouldn't be possible technically
this.sourcetags.push(theTag);
this.value.push(theTag);
@@ -115,11 +115,7 @@ export default {
this.$emit("input", this.value);
},
normalizeTag(tagName) {
//kebab case takes care of all the things we need for tags in one go
tagName = window.$gz._.kebabCase(tagName);
//No longer than 255 characters
tagName = tagName.length > 255 ? tagName.substr(0, 255 - 1) : tagName;
return tagName;
return window.$gz.util.normalizeTag(tagName);
}
}
};