docs_vue2/one/docs/demo/uploader/file.vue

59 lines
968 B
Vue
Raw Normal View History

2020-08-13 11:47:56 +08:00
<template>
<article>
<section>
<h4>Normal size</h4>
<veui-uploader
v-model="files"
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
/>
</section>
<section>
<h4>Small size</h4>
<veui-uploader
v-model="files2"
action="https://app.fakejson.com/q/ELymQ7xh?token=AWFkjMICPSAB_bO_z-Lnog"
ui="s"
/>
</section>
</article>
</template>
<script>
import { Uploader } from 'veui'
import { cloneDeep } from 'lodash'
export default {
components: {
'veui-uploader': Uploader
},
data () {
let files = [
{
name: 'demo-file1.txt',
src: '/file/demo-file1.txt',
key: 0
2020-08-13 11:47:56 +08:00
},
{
name: 'demo-file2.txt',
src: '/file/demo-file2.txt',
key: 1
2020-08-13 11:47:56 +08:00
}
]
return {
files,
files2: cloneDeep(files)
}
}
}
</script>
2021-09-15 20:03:51 +08:00
<style lang="less" scoped>
article {
display: flex;
2020-08-13 11:47:56 +08:00
}
2021-09-15 20:03:51 +08:00
section {
width: 45%;
2020-08-13 11:47:56 +08:00
}
</style>