1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- <template>
- <view class="container">
- <!-- <img style="width:100%;height:100%" ref="img"
- :src="imageData"
- alt="" /> -->
- <uni-section title="自定义图片大小" type="line">
- <view class="example-body ">
- <uni-file-picker readonly :modelValue="imageList" :imageStyles="imageStyles" file-mediatype="image">
- </uni-file-picker>
- </view>
- </uni-section>
- <uni-file-picker :readonly="true" limit="4" :modelValue="imageList"></uni-file-picker>
-
- </view>
- </template>
- <script setup>
- import { defineProps,defineEmits,watch,ref, computed, onMounted } from 'vue';
- import http from '@/utils/request'
- import {uploadImageModelValue} from './OssService.js'
- onMounted(()=>{
- download("0245b5f852e94d68858be242a1d60c48,17c46c50f0f048ee848f0de61775feed,8305cfc469bd4e2bbcd299d44f68c642,0c3ce0ebf0294a42a53fb2ecb0dbe860,62f4bab183554a358ace6dcda78de923")
- })
- const imageData = ref("")
- const imageList = ref([])
- const imageStyles = ref({
- width: 64,
- height: 64,
- border: {
- radius: '50%'
- }
- })
- const download = (id)=> {
-
- // console.log(uploadImageModelValue(["b34e4e223b3245f497ae0031195fa3ed","b34e4e223b3245f497ae0031195fa3ed","b34e4e223b3245f497ae0031195fa3ed"]));
-
- imageList.value = uploadImageModelValue(id)
- console.log(imageList.value);
- }
- const doDownload = (id, url)=> {
- return http.oss(url,{id:id})
- }
- </script>
- <style>
- .example-body {
- padding: 10px;
- padding-top: 0;
- }
- </style>
|