抖音小程序发布平台
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 
 
 

39 rindas
744 B

  1. <template>
  2. <div>
  3. <file-upload fname="file" :url="imageUploadUrl" :completed-callback="uploadCb"></file-upload>
  4. {{filePath}}
  5. </div>
  6. </template>
  7. <script>
  8. import commonUtil from '../../core/tool/commonUtil';
  9. import FileUpload from "../../core/comps/upload/upload.vue";
  10. export default {
  11. name: 'ImgUpload',
  12. components: {FileUpload},
  13. data () {
  14. return {
  15. imageUploadUrl:"/api/upload/awsFileUpload",
  16. filePath:""
  17. }
  18. },
  19. methods:{
  20. uploadCb(d){
  21. if(d.success){
  22. this.filePath = d.data.data.url;
  23. }
  24. }
  25. },
  26. mounted(){
  27. }
  28. }
  29. </script>
  30. <!-- Add "scoped" attribute to limit CSS to this component only -->
  31. <style scoped>
  32. </style>