Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复 form demo 上传图片失败的问题 #1106

Merged
merged 1 commit into from
Feb 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading