{"action":"created","issue":{"url":"https://api.github.com/repos/waynecz/vue-img-inputer/issues/49","repository_url":"https://api.github.com/repos/waynecz/vue-img-inputer","labels_url":"https://api.github.com/repos/waynecz/vue-img-inputer/issues/49/labels{/name}","comments_url":"https://api.github.com/repos/waynecz/vue-img-inputer/issues/49/comments","events_url":"https://api.github.com/repos/waynecz/vue-img-inputer/issues/49/events","html_url":"https://github.com/waynecz/vue-img-inputer/issues/49","id":335854514,"node_id":"MDU6SXNzdWUzMzU4NTQ1MTQ=","number":49,"title":"上传参数配置问题","user":{"login":"Mcdull-wei","id":3215459,"node_id":"MDQ6VXNlcjMyMTU0NTk=","avatar_url":"https://avatars1.githubusercontent.com/u/3215459?v=4","gravatar_id":"","url":"https://api.github.com/users/Mcdull-wei","html_url":"https://github.com/Mcdull-wei","followers_url":"https://api.github.com/users/Mcdull-wei/followers","following_url":"https://api.github.com/users/Mcdull-wei/following{/other_user}","gists_url":"https://api.github.com/users/Mcdull-wei/gists{/gist_id}","starred_url":"https://api.github.com/users/Mcdull-wei/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Mcdull-wei/subscriptions","organizations_url":"https://api.github.com/users/Mcdull-wei/orgs","repos_url":"https://api.github.com/users/Mcdull-wei/repos","events_url":"https://api.github.com/users/Mcdull-wei/events{/privacy}","received_events_url":"https://api.github.com/users/Mcdull-wei/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-06-26T14:43:30Z","updated_at":"2018-08-02T10:59:26Z","closed_at":null,"author_association":"NONE","body":"大神你好，\r\n\r\n我在用 auto-upload 做图片上传的时候是这样写的\r\n\r\n```html\r\n        <el-table-column\r\n          prop=\"coverurl\"\r\n          label=\"书籍封面\"\r\n          sortable\r\n          width=\"180\" header-align=\"center\">\r\n\r\n          <template slot-scope=\"scope\">\r\n            <!--  <img  :src=\"scope.row.coverurl\" alt=\"\" style=\"width: 70px;height: 70px\">\r\n             -->\r\n            <img-inputer \r\n                action =\"http://localhost:8081/article/uploadimg\"  \r\n                headers=\"{ 'Content-Type': 'multipart/form-data'}\" \r\n                v-model=\"file\" theme=\"light\" size=\"small\" \r\n                auto-upload \r\n                :imgSrc=\"scope.row.coverurl\" \r\n                accept=\"image/jpeg,image/png\"/>\r\n          </template>\r\n        </el-table-column>\r\n```\r\n\r\n然后运行就会提示 XMLHttpRequest cannot load http://localhost:8081/article/uploadimg. Response for preflight is invalid (redirect)\r\n这个提示应该属于跨域问题吧，这个问题怎么解决呢\r\n"},"comment":{"url":"https://api.github.com/repos/waynecz/vue-img-inputer/issues/comments/409888709","html_url":"https://github.com/waynecz/vue-img-inputer/issues/49#issuecomment-409888709","issue_url":"https://api.github.com/repos/waynecz/vue-img-inputer/issues/49","id":409888709,"node_id":"MDEyOklzc3VlQ29tbWVudDQwOTg4ODcwOQ==","user":{"login":"waynecz","id":11238540,"node_id":"MDQ6VXNlcjExMjM4NTQw","avatar_url":"https://avatars3.githubusercontent.com/u/11238540?v=4","gravatar_id":"","url":"https://api.github.com/users/waynecz","html_url":"https://github.com/waynecz","followers_url":"https://api.github.com/users/waynecz/followers","following_url":"https://api.github.com/users/waynecz/following{/other_user}","gists_url":"https://api.github.com/users/waynecz/gists{/gist_id}","starred_url":"https://api.github.com/users/waynecz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/waynecz/subscriptions","organizations_url":"https://api.github.com/users/waynecz/orgs","repos_url":"https://api.github.com/users/waynecz/repos","events_url":"https://api.github.com/users/waynecz/events{/privacy}","received_events_url":"https://api.github.com/users/waynecz/received_events","type":"User","site_admin":false},"created_at":"2018-08-02T10:59:26Z","updated_at":"2018-08-02T10:59:26Z","author_association":"OWNER","body":"@qlfer 可以直接给组件一个 ref\r\n```html\r\n<vue-img-inputer ref=\"img\">\r\n```\r\n\r\n然后代码里\r\n```javascript\r\nthis.$refs.img.dataUrl\r\n```"}}
{"actor":{"display_login":"waynecz"}}