患者1.2

This commit is contained in:
zoujiandong
2024-01-10 08:57:23 +08:00
parent 49c01e8922
commit 5d865d1bbb
339 changed files with 23720 additions and 267 deletions
+18 -8
View File
@@ -49,11 +49,19 @@ var props_1 = require("./props");
this.setData({ innerValue: this.value });
},
methods: {
formatValue: function (value) {
var maxlength = this.data.maxlength;
if (maxlength !== -1 && value.length > maxlength) {
return value.slice(0, maxlength);
}
return value;
},
onInput: function (event) {
var _a = (event.detail || {}).value, value = _a === void 0 ? '' : _a;
this.value = value;
var formatValue = this.formatValue(value);
this.value = formatValue;
this.setShowClear();
this.emitChange(event.detail);
return this.emitChange(__assign(__assign({}, event.detail), { value: formatValue }));
},
onFocus: function (event) {
this.focused = true;
@@ -102,14 +110,16 @@ var props_1 = require("./props");
this.$emit('keyboardheightchange', event.detail);
},
emitChange: function (detail) {
var _this = this;
var extraEventParams = this.data.extraEventParams;
this.setData({ value: detail.value });
(0, utils_1.nextTick)(function () {
var data = extraEventParams ? detail : detail.value;
_this.$emit('input', data);
_this.$emit('change', data);
});
var result;
var data = extraEventParams
? __assign(__assign({}, detail), { callback: function (data) {
result = data;
} }) : detail.value;
this.$emit('input', data);
this.$emit('change', data);
return result;
},
setShowClear: function () {
var _a = this.data, clearable = _a.clearable, readonly = _a.readonly, clearTrigger = _a.clearTrigger;