WeChat applet 0.11.122100 version update details

Source: Internet
Author: User
This article mainly introduces the minor program 0.11.122100 version update details 0.11.122100 update overview


  • Four new APIs and two new components are added.

  • Extended 10 component attributes and added 6 new component events

  • Fixes dozens of API and component bugs to optimize some interactive experience

  • Debugging support for new APIs and components added to developer tools

  • Developer tools support payment debugging

The detailed update log is as follows:


Basic Library update

  • A adds API wx. switchTab details

  • A adds API wx. scanCode

  • A adds API wx. createMapContext

  • A adds API wx. createCanvasContext

  • A adds the API wx. showToast call parameter mask.

  • A new Page method Page. ondomainappmessage is used to customize the shared content.

  • A adds the framework method App. onError.

  • A new page configuration disabelScroll

  • A new Components

  • A new Component used to display the customer service Session button

  • A new Component property openType

  • A new Component attribute color

  • A new Component attributes objectFit

  • A newComponent property markers polyline circles include-points controls show-location

  • A new Component properties circular control linkage slide

  • A newComponent attribute cursor-spacing

  • A newComponent attribute cursor-spacing </p> </li>

  • A new Component property disabled

  • A new Component property hover-class

  • A new Support for dynamic modification of component attributes scroll-x and scroll-y

  • A newComponent event bindtap bindmarkertap bindcontrolstap bindregionchange

  • A newComponent event bindconfirm

  • A new Bindtimeupdate

  • A newComponent event bindconfirm </p> </li>

  • A newBindinput </p> </li>

  • A new Component event bindlongtap

  • A adds the AudioContext. setSrc () context API.

  • A adds CanvasContext context

  • A adds CanvasContext. arc () context API

  • A added CanvasContext. fillRect () context API

  • A adds CanvasContext. strokeRect () context API

  • A adds CanvasContext. createLinearGradient () context API

  • A adds CanvasContext. createCircularGradient () context API

  • A new Page scrolling is prohibited when the component shows scrolling

  • U Updates API wx. getSystemInfo and adds platform return parameters

  • U Update API wx. downloadFile: When the HTTP status code is 200 or 304, tmpFilePath is returned.

  • U Update API wx. showModal call parameter confirmText cancelText limit

  • U updates WXML dataset and returns objects and arrays.

  • U UpdateComponent attribute mode (optional) widthFix

  • U Update Added ObjectArray support for component attribute range.

  • U Update Default style

  • U update CanvasContext. save () CanvasContext. restore () context API save paint style

  • U updates CanvasContext. arc () context API parameters and adds eAngle and counterclockwise to remove sweepAngle.

  • U optimization Slide experience

  • U optimization In Interactive Experience

  • U optimization Component click experience

  • F fixed the issue that the wx. request method can only use uppercase values on Android.

  • F fixed the issue where the wx. uploadFile cannot set the header on iOS.

  • F: The wx. getLocation type = gcj02 does not take effect on iOS.

  • F fixed the issue where wx. showToast is still displayed after exiting the applet.

  • F fixed the inconsistent Android and iOS parameters returned by wx. showModal.

  • F fixed layout disorder when wx. showModal content is too long or title is empty

  • F The default value is not displayed when wx. showModal cancelText and confirmText are empty.

  • F fixed the keyboard pop-up during wx. showModal and the keyboard could not be folded.

  • F fixed the issue where wx. getImageInfo could not get http link images on Android.

  • F fixed the issue that wx. getSystemInfo caused inconsistent screen height due to tabbar.

  • F the image cannot be displayed after wx. downloadFile is downloaded on Android.

  • F fixed the issue where wx. request does not have the correct encode for the request data.

  • F fixed the issue where the wx. login App. onLaunch in iOS has no callback.

  • F fixed the issue where wx. createAnimationContext sets transformOrigin exceptions and the animation cannot proceed to the next step.

  • F fixed the issue where Page. onLoad could not be called by wx. navigateTo wx. redirectTo on iOS.

  • F. The default behavior of the catch block event is invalid.

  • F fixed the problem of page freezing caused by parameter passing error of setInterval in iOS.

  • F fixed the problem of onReachBottom triggering multiple times.

  • F. repair An error occurred when having a text node descendant

  • F. repair Invalid hidden attribute

  • F. repair The label cannot take effect.

  • F. repair Problem of sliding to the top or bottom of the screen

  • F. repair The event does not take effect on iOS.

  • F. repair The audio will continue to exist when iOS is removed.

  • F. repair Embedded Classes and styles are not dynamically updated.

  • F. repairIncorrect text color when disabled

  • F. repairThe focus attribute is invalid.

  • F. repairWhen iOS9 uses display: flex, the first input is not displayed.

  • F. repairAn exception occurs when the initial value is undefined.

  • F. repairPlaceholder shadow

  • F. repair Abnormal color before and after focus

  • F. repairPosition: fixed locates exceptions. </p> </li>

  • F. repairThe problem that the blur event is not triggered after picker is enabled </p> </li>

  • F. repairHeight change when auto-height is set </p> </li>

  • F. repairDestruction exceptions </p> </li>

  • F. repair In Android, the full-screen button is clicked twice to take effect.

  • F fixed the problem of using the same id conflict in multiple pages.

  • F. repair DrawImage cannot be displayed normally

  • F. repairIn the bindload event, the setData will have an endless loop.

  • F. repair Scroll-into-view failure

  • F. repair

    The submit cannot obtain the input content.

  • D is about to be removed Redirect attributes

  • D. The wx. createContext interface will be removed soon.

  • D is about to be removedUse the auto-focus attribute directly.

  • D is about to be removedCovers attributes



Basic functions of developer tools

  • A new wx. switchTab debugging support

  • A adds wx. startRecord wx. stopRecord wx. playVoice wx. pauseVoice wx. stopVoice API debugging support.

  • A new payment debugging support

  • A added support for QR code scanning and debugging

  • A. added A prompt that the page file is repeatedly defined in app. json, leading to incorrect preview submission.

  • A. added A message indicating A network error occurred when the simulator was loaded.

  • A adds the initialization page and parameter setting function during compilation.

  • A adds the initialization page and parameter setting function during preview submission.

  • F optimizes the appdata panel page view data and supports dynamic update and code mode display.

  • F fixed the issue where wx. getBackgroundAudioPlayerState does not return when no music is played.

  • F fixed the issue where wx. getBackgroundAudioPlayerState obtained the status incorrectly.

  • F. fixed the white screen problem in some cases of wxml panel.

  • F. The wxml panel attribute cannot be copied and the copy contains carriage return characters.

  • F fixed the problem of non-alignment in the display of a single text node in the wxml panel.

  • F. The simulator displays an error when the position of tabbar in app. json is set to top.

  • F fixed the problem of an error in clicking an external link in devtools and editor.

  • F. The wx. requst request cannot be sent because of the cache.

Update details are as follows:


Wx. switchTab (OBJECT)

Go to the tabBar page and close all other non-tabBar pages.
OBJECT parameter description:
[Tr] parameter type required description [/tr]
Url String Yes The path of the tabBar page to jump to (on the page defined by the app. json field). The path cannot contain parameters.
Success Function No Callback function for successful API call
Fail Function No Callback function for interface call failure
Complete Function No The callback function after the interface call ends. (the callback function is executed if the call succeeds or fails)
Sample code:
{"TabBar": {"list": [{"pagePath": "index", "text": "homepage" },{ "pagePath": "other ", "text": "Other"}]} wx. switchTab ({url: '/index '})




Wx. scanCode (OBJECT)

Call the client scan interface and return the corresponding result after the scan is successful.
Object parameter description:
[Tr] parameter type required description [/tr]
Success Function No The callback function that is successfully called by the API. for details about the returned content, see the return parameter description.
Fail Function No Callback function for interface call failure
Complete Function No The callback function after the interface call ends. (the callback function is executed if the call succeeds or fails)
Success return parameters:
[Tr] parameter description [/tr]
Result Code content
Sample code:
Wx. scanCode ({success: (res) =>{ console. log (res )}})




Onsellappmessage

Define the ondeskappmessage function in the Page to set the sharing information of the Page.
  • The "share" button is displayed in the menu in the upper right corner only when this event processing function is defined.

  • When you click the Share button

  • This event needs to return an Object for customizing to share content

Custom sharing Field
[Tr] field description default value [/tr]
Title Share title Current applet name
Desc Share description Current applet name
Path Share Path Path of the current page, which must start/
Sample code:
Page ({ondeskappmessage: function () {return {title: 'Custom share title', desc: 'Custom share description', path: '/page/user? Id = 123 '}}})




Wx. showToast (OBJECT)

Display message prompt box
OBJECT parameter description:
[Tr] parameter type required description [/tr]
Title String Yes Prompt content
Icon String No Icon. only "success" and "loading" are supported"
Duration Number No Delay time, in milliseconds. default value: 1500. maximum value: 10000
Mask Boolean No Whether to display transparent masked layer to prevent touch penetration. default value: false
Success Function No Callback function for successful API call
Fail Function No Callback function for interface call failure
Complete Function No The callback function after the interface call ends. (the callback function is executed if the call succeeds or fails)
Sample code:
Wx. showToast ({title: 'success', icon: 'success', duration: 2000 })


Onsellappmessage

Define the ondeskappmessage function in the Page to set the sharing information of the Page.
  • The "share" button is displayed in the menu in the upper right corner only when this event processing function is defined.

  • When you click the Share button

  • This event needs to return an Object for customizing to share content

Custom sharing Field
[Tr] field description default value [/tr]
Title Share title Current applet name
Desc Share description Current applet name
Path Share Path Path of the current page, which must start/
Sample code:
Page ({ondeskappmessage: function () {return {title: 'Custom share title', desc: 'Custom share description', path: '/page/user? Id = 123 '}}})




Wx. createCanvasContext (canvasId)

Definition

Create a canvas drawing context (specify canvasId)
Tip: You must specify the canvasId. this drawing context only applies to the corresponding



Parameters

[Tr] parameter type description [/tr]
CanvasId String Canvas, which is defined in Canvas-id



Add component:


AudioContext

AudioContext is bound to a component through audioId, through which the corresponding component can be operated.
Method list of the audioContext object:
[Tr] method parameter description [/tr]
SetSrc Src Audio address
Play None Play
Pause None Pause
Seek Position Jump to the specified position, in seconds
Sample code:
Play Pause Set the current playback time to 14 seconds Return to the beginning// Audio. jsPage ({onReady: function (e) {// use wx. createAudioContext get audio context this. audioCtx = wx. createAudioContext ('myaudio') this. audioCtx. setSrc ('http: // ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3? Guid = ffffff82def4af4b12b3cd9337d5e7 & uin = 346897220 & vkey = found & fromtag = 46') this. audioCtx. play ()}, data: {src: ''}, audioPlay: function () {this. audioCtx. play ()}, audioPause: function () {this. audioCtx. pause ()}, audio14: function () {this. audioCtx. seek (14)}, audioStart: function () {this. audioCtx. seek (0 )}})

Ctx. draw ()

The above is the detailed description of the updated mini-program version 0.11.122100. For more information, see other related articles in the first PHP community!

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.