Skip to content

Commit

Permalink
fix: 修复 form demo 上传图片失败的问题 (#1106)
Browse files Browse the repository at this point in the history
Co-authored-by: DiamondYuan <[email protected]>
  • Loading branch information
DiamondYuan and DiamondYuan authored Feb 19, 2024
1 parent cfa5d19 commit ded72c0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 10 deletions.
11 changes: 1 addition & 10 deletions compiled/alipay/demo/pages/FormImageUploadRules/index.js
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
import { Form } from '../../../src/Form/form';
Page({
data: {
onUpload(localFile) {
return new Promise((resolve) => {
console.log('上传的图片为:', localFile);
setTimeout(() => {
resolve('https://gw.alipayobjects.com/mdn/rms_226d75/afts/img/A*5m0ZQYhxhjEAAAAAAAAAAAAAARQnAQ');
}, 2000);
});
},
},
data: {},
onLoad() {
this.form = new Form({
rules: {
Expand Down
2 changes: 2 additions & 0 deletions demo/pages/FormImageUploadRules/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import { Form } from '../../../src/Form/form';

Page({
data: {
/// #if WECHAT
onUpload(localFile) {
return new Promise((resolve) => {
console.log('上传的图片为:', localFile);
Expand All @@ -12,6 +13,7 @@ Page({
}, 2000);
});
},
/// #endif
},
onLoad() {
this.form = new Form({
Expand Down

0 comments on commit ded72c0

Please sign in to comment.