Skip to content

Commit

Permalink
updatedocs
Browse files Browse the repository at this point in the history
  • Loading branch information
lian-yue committed Aug 10, 2024
1 parent 11af97d commit 48d9d0e
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 7 deletions.
19 changes: 19 additions & 0 deletions docs/docs/en.md
Original file line number Diff line number Diff line change
Expand Up @@ -1144,6 +1144,25 @@ Is dragging
```


### dropElementActive

Is Dragged to container

* **Type:** `Boolean`

* **Read only:** `true`

* **Default:** `false`

* **Usage:**
```html
<app>
<file-upload ref="upload" :drop="true"></file-upload>
<span v-show="$refs.upload && $refs.upload.dropActive && $refs.upload.dropElementActive">Already dragged here, release the mouse to add the file</span>
</app>
```





Expand Down
21 changes: 20 additions & 1 deletion docs/docs/zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -930,7 +930,26 @@ Add, update, remove pre-filter
```html
<app>
<file-upload ref="upload" :drop="true"></file-upload>
<span v-show="$refs.upload && $refs.upload.dropActive">拖拽到这里上传</span>
<span v-show="$refs.upload && $refs.upload.dropActive">拖拽到此处上传</span>
</app>
```


### dropElementActive

是否拖拽到容器组件内

* **类型:** `Boolean`

* **只读:** `true`

* **默认值:** `false`

* **示例:**
```html
<app>
<file-upload ref="upload" :drop="true"></file-upload>
<span v-show="$refs.upload && $refs.upload.dropActive && $refs.upload.dropElementActive">已拖到此处 释放鼠标即可添加文件</span>
</app>
```

Expand Down
12 changes: 6 additions & 6 deletions docs/views/examples/Multiple.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
:class="{ 'drop-element-active': $refs.upload1 && $refs.upload1.dropElementActive }">
<h3>
{{ $refs.upload1 && $refs.upload1.dropElementActive ?
"Drop files to upload1 (element)"
"Release the mouse to add to upload1 (element)"
:
"Drop files to upload1" }}
"Drag and drop here to upload1" }}
</h3>
</div>

Expand All @@ -22,7 +22,7 @@
<span v-else></span>
</li>
</ul>
<h5 class="drop-title">Drag and drop files into the container to upload</h5>
<h5 class="drop-title">Drag and drop files into the container to upload1</h5>
<div class="example-btn">
<file-upload class="btn btn-primary" input-id="file1" post-action="/upload/post" v-model="files1" ref="upload1"
drop=".upload-drop-container-1" :drop-directory="true" :multiple="true">
Expand Down Expand Up @@ -57,9 +57,9 @@
<h3>
{{ $refs.upload2 && $refs.upload2.dropElementActive
?
"Drop files to upload2 (element)"
"Release the mouse to add to upload2 (element)"
:
"Drop files to upload2" }}
"Drag and drop here to upload2" }}
</h3>
</div>
<ul>
Expand All @@ -72,7 +72,7 @@
<span v-else></span>
</li>
</ul>
<h5 class="drop-title">Drag and drop files into the container to upload</h5>
<h5 class="drop-title">Drag and drop files into the container to upload2</h5>
<div class="example-btn">
<file-upload class="btn btn-primary" input-id="file2" post-action="/upload/post" v-model="files2" ref="upload2"
drop=".upload-drop-container-2" :drop-directory="true" :multiple="true">
Expand Down

0 comments on commit 48d9d0e

Please sign in to comment.