upload
文件上传
基础用法
拖拽到这里或者点击上传
<template>
<adv-upload v-model="imgPath"></adv-upload>
<div>{{ imgPath }}</div>
</template>
<script setup lang="ts">
import { onMounted, ref } from 'vue';
const imgPath = ref<any>('');
onMounted(() => {
imgPath.value = [
'fe4e6cbdca5d9be8dbd0fa612706c47d-IMG_5213.JPG',
'52022dc0c82a16b5b67b2a5cd2617cf0-lx3.jpg',
];
});
</script>
<style scoped></style>模型接口
ts
interface PropsI {
text: string;
fillColor?: string;
strokeColor?: string;
}属性
| 属性 | 值 | 是否必填 | 默认值 | 说明 |
|---|---|---|---|---|
| text | string | 是 | '' | 展示的文本 |
| fillColor | string | 否 | '#488acc' | 展示文本底色的填充色 |
| strokeColor | string | 否 | false | 展示文本的边框色 |
插槽
| 插槽名 | 是否必填 | 默认值 | 说明 |
|---|