@finema/core 1.4.135 → 1.4.137
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/module.json
CHANGED
package/dist/module.mjs
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
{
|
|
8
8
|
[ui.disabled]: isDisabled,
|
|
9
9
|
[ui.background.default]: !isOverDropZone && !isDisabled,
|
|
10
|
-
[ui.background.dragover]: isOverDropZone && !isDisabled,
|
|
10
|
+
[ui.background.dragover]: isOverDropZone && (!isDisabled || !isReadonly),
|
|
11
11
|
[ui.failed]: upload.status.value.isError,
|
|
12
12
|
},
|
|
13
13
|
]"
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
class="hidden"
|
|
19
19
|
:name="name"
|
|
20
20
|
:accept="fileAllocate.acceptFile.value"
|
|
21
|
-
:disabled="isDisabled"
|
|
21
|
+
:disabled="isDisabled || isReadonly"
|
|
22
22
|
@change="handleChange"
|
|
23
23
|
/>
|
|
24
24
|
<div :class="[ui.wrapper]">
|
|
@@ -105,6 +105,7 @@
|
|
|
105
105
|
@click="handleDownloadFile"
|
|
106
106
|
/>
|
|
107
107
|
<Icon
|
|
108
|
+
v-if="!(isDisabled || isReadonly)"
|
|
108
109
|
:name="ui.action.deleteIcon"
|
|
109
110
|
:class="[ui.action.iconClass]"
|
|
110
111
|
title="ลบไฟล์"
|
|
@@ -246,7 +247,7 @@ const { isOverDropZone } = useDropZone(dropzoneRef as unknown as HTMLElement, {
|
|
|
246
247
|
})
|
|
247
248
|
|
|
248
249
|
const handleChange = (e: Event) => {
|
|
249
|
-
if (props.isDisabled) return
|
|
250
|
+
if (props.isDisabled || props.isReadonly) return
|
|
250
251
|
|
|
251
252
|
const file = (e.target as HTMLInputElement).files?.[0]
|
|
252
253
|
const result = handleCheckFileCondition(file)
|