Skip to content

Commit

Permalink
perf: 优化头像组件 @0.8.6-6
Browse files Browse the repository at this point in the history
  • Loading branch information
BoBoooooo committed Feb 4, 2021
1 parent 5941a6d commit 59c963a
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "element-pro-crud",
"version": "0.8.6-5",
"version": "0.8.6-6",
"author": "BoBo<[email protected]>",
"main": "lib/ProCrud.umd.min.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<!-- 服务器地址 -->
<script>window.__HOST__URL__ = 'http://server.boboooooo.top:7788'</script>
<!-- 后台url地址 -->
<script>window.__PREFIX__URL__ = '/';</script>
<script>window.__PREFIX__URL__ = '';</script>
</head>
<body>
<noscript>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,9 @@ export default {
},
methods: {
handleAvatarSuccess(res, file) {
const __GLOBAL__URL__ = window.__HOST__URL__ + window.__PREFIX__URL__;
this.imageUrl = URL.createObjectURL(file.raw);
this.$emit('change', res.data);
this.$emit('change', __GLOBAL__URL__ + res.data);
},
beforeUpload() {
// 只读时禁止上传
Expand Down
2 changes: 1 addition & 1 deletion src/component/form-designer/src/componentsConfig.ts
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ export const advanceComponents = [
labelWidth: '',
options: {
resourceId: 'id',
uploadUrl: '',
uploadUrl: '/file/upload',
width: '180px',
hiddenLabel: true,
},
Expand Down

0 comments on commit 59c963a

Please sign in to comment.