mirror of
https://github.com/tusen-ai/naive-ui.git
synced 2025-01-12 12:25:16 +08:00
19 lines
375 B
Markdown
19 lines
375 B
Markdown
# Change File on Finish
|
|
You can change file's property when upload finishes.
|
|
```html
|
|
<n-upload
|
|
@finish="handleFinish"
|
|
action="http://www.mocky.io/v2/5e4bafc63100007100d8b70f"
|
|
>
|
|
<n-button>Upload</n-button>
|
|
</n-upload>
|
|
```
|
|
```js
|
|
export default {
|
|
methods: {
|
|
handleFinish ({ file }) {
|
|
file.url = 'http://www.mocky.io/v2/5e4bafc63100007100d8b70f'
|
|
}
|
|
}
|
|
}
|
|
``` |