tanxin-ui 1.2.4 → 1.2.7
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/dist/tanxin-ui.es.js +9 -5
- package/dist/tanxin-ui.umd.js +6 -6
- package/es/form/src/form-item.js +4 -2
- package/es/upload/index.d.ts +7 -3
- package/es/upload/src/upload.d.ts +2 -1
- package/es/upload/src/upload.js +5 -3
- package/lib/form/src/form-item.js +4 -2
- package/lib/upload/index.d.ts +7 -3
- package/lib/upload/src/upload.d.ts +2 -1
- package/lib/upload/src/upload.js +5 -3
- package/package.json +1 -1
package/dist/tanxin-ui.es.js
CHANGED
|
@@ -4559,12 +4559,14 @@ var FormItem = defineComponent({
|
|
|
4559
4559
|
});
|
|
4560
4560
|
const blurRules = computed(() => {
|
|
4561
4561
|
return rules2.value.filter((rule) => {
|
|
4562
|
-
|
|
4562
|
+
var _a;
|
|
4563
|
+
return (_a = rule.trigger) == null ? void 0 : _a.split(",").includes("blur");
|
|
4563
4564
|
});
|
|
4564
4565
|
});
|
|
4565
4566
|
const changeRules = computed(() => {
|
|
4566
4567
|
return rules2.value.filter((rule) => {
|
|
4567
|
-
|
|
4568
|
+
var _a;
|
|
4569
|
+
return (_a = rule.trigger) == null ? void 0 : _a.split(",").includes("change");
|
|
4568
4570
|
});
|
|
4569
4571
|
});
|
|
4570
4572
|
const defaultSlot = useGetSlot(slots, "default");
|
|
@@ -15931,7 +15933,7 @@ var Upload = defineComponent({
|
|
|
15931
15933
|
TImagePreview: ImagePreview
|
|
15932
15934
|
},
|
|
15933
15935
|
props: uploadProps,
|
|
15934
|
-
emits: ["update:fileList", "update:value"],
|
|
15936
|
+
emits: ["update:fileList", "update:value", "blur"],
|
|
15935
15937
|
setup(props, {
|
|
15936
15938
|
slots,
|
|
15937
15939
|
emit
|
|
@@ -16162,7 +16164,7 @@ var Upload = defineComponent({
|
|
|
16162
16164
|
file.status = "success";
|
|
16163
16165
|
if (props.onSuccess)
|
|
16164
16166
|
props.onSuccess(res, rawFile);
|
|
16165
|
-
emit("update:fileList",
|
|
16167
|
+
emit("update:fileList", fileList.value);
|
|
16166
16168
|
emit("update:value", isArray$2(props.value) ? fileList.value.map((item) => item.url) : fileList.value[0].url);
|
|
16167
16169
|
};
|
|
16168
16170
|
const handleOnError = (err, rawFile) => {
|
|
@@ -16238,6 +16240,7 @@ var Upload = defineComponent({
|
|
|
16238
16240
|
console.log("handleRemove", fileList.value);
|
|
16239
16241
|
const index2 = fileList.value.findIndex((file) => file.uid === uid);
|
|
16240
16242
|
if (index2 >= 0) {
|
|
16243
|
+
console.log("index=", index2);
|
|
16241
16244
|
const removeFile = cloneDeep(fileList.value[index2]);
|
|
16242
16245
|
const url2 = fileList.value[index2].url;
|
|
16243
16246
|
URL.revokeObjectURL(url2);
|
|
@@ -16249,8 +16252,9 @@ var Upload = defineComponent({
|
|
|
16249
16252
|
if (valueIndex >= 0)
|
|
16250
16253
|
modelValue.value.splice(valueIndex, 1);
|
|
16251
16254
|
}
|
|
16255
|
+
console.log("modelValue", modelValue.value);
|
|
16252
16256
|
emit("update:fileList", fileList.value);
|
|
16253
|
-
emit("update:value", props.limit > 1 ? fileList.value.map((item) => item.url) :
|
|
16257
|
+
emit("update:value", props.limit > 1 ? fileList.value.map((item) => item.url) : modelValue.value);
|
|
16254
16258
|
if (props.onRemove) {
|
|
16255
16259
|
props.onRemove(removeFile, fileList.value);
|
|
16256
16260
|
}
|