@tinyuploader/vuenext
v1.2.0-beta
Published
## 安装
Downloads
1
Readme
Quick Start
安装
npm i @tinyuploader/vuenext -S
使用
// main.js
import { createApp } from 'vue'
import App from './App.vue'
import Uploader from '@tinyuploader/vuenext'
import '@tinyuploader/vuenext/dist/style.css'
const app = createApp(App)
app.use(Uploader)
app.mount('#app')
// App.vue
<template>
<div>
<Uploader :fileList="fileList" ref="uploaderRef" />
</div>
</template>
<script setup>
import { ref } from 'vue'
const uploaderRef = ref()
const fileList = ref([{ name: '哈哈', path: 'https://baidu.com' }])
const clear = () => {
uploaderRef.value.clear()
}
const submit = () => {
uploaderRef.value.submit()
}
</script>
属性、方法用法参考@tinyuploader/vue