WeChat Mini Program 0.11.122100 version update details introduction
高洛峰
Release: 2017-03-08 17:11:27
Original
2613 people have browsed it
0.11.122100 Update Overview
Added 4 new APIs, 2 new components
Expansion Added 10 component properties and added 6 component events
Fixed dozens of API and component bugs and optimized some interactive experiences
Development The developer tool adds debugging support for new APIs and components
The developer tool adds debugging support for WeChat payment
The detailed update log is as follows:
Basic library update
A New API wx.switchTab Details
A New API wx .scanCode
A New API wx.createMapContext
A New API wx.createCanvasContext
A Added new API wx.showToast calling parameter mask
A Added new page method Page.onShareAppMessage for customizing sharing content
A New framework method App.onError
A New page configuration disabelScroll
A New component
A Added component, used to display customer service session button
A Added Component attribute openType
A Added Component attribute color
A Added component attribute objectFit
A Added component attribute markers polyline circles include-points controls show-location
A Added component attribute circular to control connection sliding
A Added component attribute cursor- spacing
A Added component attribute cursor-spacing
A Added component attribute disabled
A Add component attribute hover-class
A Add Component attributes scroll-x, scroll-y support dynamic modification
A Added component event bindtap bindmarkertap bindcontrolstap bindregionchange
A Add component event bindconfirm
A Add component event bindtimeupdate
A New component event bindconfirm
A New component event bindinput
A New Component event bindlongtap
A Added AudioContext.setSrc() context API
A Added CanvasContext context
A Added CanvasContext.arc() context API
A Added CanvasContext.fillRect() context API
A New CanvasContext.strokeRect() context API
A New CanvasContext.createLinearGradient() context API
A New Added CanvasContext.createCircularGradient() context API
A Added component to prevent the page from scrolling when scrolling
U Update API wx.getSystemInfo Add platform return parameters
U Update API wx.downloadFile When the HTTP status code is 200 or 304, tmpFilePath will be returned
U Update the character limit of API wx.showModal call parameter confirmText cancelText
U Update WXML dataset return to support Object and Array
U Update component attribute mode optional widthFix
U Update component attribute range Add ObjectArray type support
U Update default style
U Update CanvasContext.save() CanvasContext.restore() Context API Save brush style
U Update CanvasContext.arc() Context API parameter adjustment, add eAngle, counterclockwise, remove sweepAngle
U Optimize the sliding experience of
U Optimize the interactive experience of in
U Optimize component click experience
F Fix wx.request method on Android can only use uppercase letters Value problem
F Fix the problem that wx.uploadFile cannot set header on iOS
F Fix wx.getLocation type=gcj02 on iOS The problem that it does not take effect
F Fix the problem that wx.showToast is still displayed after exiting the applet
F Fix the wx.showModal return parameter in Inconsistency between Android and iOS
F Fixed the layout disorder problem when wx.showModal content is too long or the title is empty
F Fix the problem that the default value is not displayed when wx.showModal cancelText and confirmText are empty
F Fix the problem that the keyboard pops up during wx.showModal and the keyboard cannot be closed
F Fix the problem that wx.getImageInfo cannot obtain http link images on Android
F Fixed the problem of inconsistent screen height obtained by wx.getSystemInfo due to tabbar appearance
F Fixed wx.downloadFile image not being displayed after downloading on Android Problem
F Fix the problem that wx.request does not correctly encode the request data
F Fix wx.login App.onLaunch in iOS No callback problem
F Fix wx.createAnimationContext setting transformOrigin exception and animation cannot proceed to the next step
F Fix wx.navigateTo wx .redirectTo On iOS, the problem that Page.onLoad cannot be called
F Fixed the problem that the default behavior of catch blocking events is invalid
F Fixed SetInterval parameter-passing error on iOS causes the page to freeze.
F Fixed the problem of onReachBottom triggering multiple times
F Fixed Problem with error when having descendants of text nodes
##F Fix < The problem that the video/> hidden attribute does not take effect
F Fix the problem that the label does not take effect
F Fix the problem of sliding to the top or bottom of the splash screen
F Fix the problem of event not taking effect on iOS
F Fix the problem that the sound of will continue to exist after it is removed on iOS
F Fix The problem that class and style will not be dynamically updated when embedded
F Fixed the problem of incorrect text color when disabled
F Fix the issue where focus attribute is invalid
F Fix When using display:flex in iOS9, the first input is not displayed Problem
F Fix the problem of displaying exception when the initial value is undefined
F Fix
F Fix color abnormality problem before and after focusing
F Fix the problem of abnormal positioning of position:fixed
F Fix the problem of not triggering the blur event after opening the picker
F Fix the problem of height change when setting auto-height in
##F Fix the problem of destruction exception of
F Fixed the problem that the full screen button in needs to be clicked twice to take effect on Android
##F Fixed the problem in The problem of conflicting use of the same id in multiple pages
##F Fixed the problem that drawImage cannot be displayed normally
F Fixed In the bindload event, setData will have an infinite loop problem
F Fix the problem of scroll-into-view failure
F Fix the problem that
submit cannot get the input content
D The redirect attribute will be removed soon
D The wx.createContext interface will be removed soon
D The auto-focus attribute will be removed soon, use focus directly Attributes
D will be removed covers attribute
Basic functions of developer tools
A Added debugging support for wx.switchTab
A Added wx.startRecord wx.stopRecord wx.playVoice wx. pauseVoice wx.stopVoice API debugging support
A Added WeChat payment debugging support
A Added QR code scanning debugging support
A Added a new message about app.json repeatedly defining the page file, resulting in a submission preview error
A Added a new message about network error when loading images in the simulator
A Added the function of setting the initialization page and parameters when compiling
A Added the function of setting the initialization page and parameters when submitting the preview
F Optimize the appdata panel to view data in separate pages, support dynamic updates and code mode display
F Fix wx.getBackgroundAudioPlayerState when there is no music playing No return problem
F Fix wx.getBackgroundAudioPlayerState getting status incorrect problem
F Fix wxml panel white screen in some cases Problem
F Fixed the problem that wxml panel attributes cannot be copied, and the copy contains a carriage return
F Fixed the problem that wxml panel single text node is not displayed Alignment problem
F Fix the simulator display error when the tabbar position in app.json is set to top
F Fix devtools and The problem of incorrect clicking on external links in the editor
F Fixed the problem of wx.requst being unable to send the request due to cache
The following are the update details:
wx.switchTab(OBJECT)
Jump to the tabBar page and close all other non-tabBar pages OBJECT parameters Description: [tr]Parameter type required description[/tr]
url
String
is
The path of the tabBar page that needs to be jumped (the page that needs to be defined in the field of app.json), the path cannot be followed by parameters
success
Function
No
Callback function for successful interface call
fail
Function
No
Interface call Failed callback function
complete
Function
No
The callback function that ends the interface call (will be executed if the call is successful or failed) )
Launch the client QR code scanning interface, and return the corresponding result after successful scanning. Object parameter description: [tr]Parameter type required description[/tr]
success
Function
No
The interface calls the callback function successfully. For details of the return content, see the return parameter description.
fail
Function
No
Callback function that fails to call the interface
complete
Function
No
The callback function at the end of the interface call (will be executed if the call is successful or failed)
Create canvas drawing context (specify canvasId) Tip: Need to specify canvasId, this drawing context only acts on the corresponding
parameter
[tr]Parameter type description[/tr]
canvasId
String
Canvas representation, pass in the canvas-id defined in
##New component:
audioContext
audioContext is bound to an component through audioId, through which the corresponding component. AudioContext object method list: [tr]Method parameter description[/tr]
##setSrc
src
Audio Address
play
None
Play
pause
None
Pause
seek
position
Jump to the specified position, unit s
Sample code: // audio.jsPage({ onReady: function (e) { / / Use wx.createAudioContext to get the audio context context this.audioCtx = wx.createAudioContext('myAudio') this.audioCtx.setSrc('http://ws.stream.qqmusic.qq.com/M500001VfvsJ21xFqb.mp3?guid=ffffffff82def4af4b12b3cd9337d5e7 &uin= 346897220&vkey=6292F51E1E384E06DCBDC9AB7C49FD713D632D313AC4858BACB8DDD29067D3C601481D36E62053BF8DFEAF74C0A5CCFADD6471160CAF3E6A&fromtag=46') Ctx.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) }})
picker-view
Scroll selector embedded in the page [tr]Attribute name type default value description[/tr]
value
Number Array
The numbers in the array sequentially represent the number selected by the picker-view-colume in the picker-view (the subscript starts from 0), the number When the length of the picker-view-column options is greater than the length, the last item is selected.
indicator-style
String
##Set the style of the selected box in the middle of the selector
bindchange
EventHandle
The change event is triggered when the value changes during scroll selection, event.detail = {value: value} ;value is an array, indicating which item is currently selected in the picker-view-column in the picker-view (the subscript starts from 0)
Note: Only the component can be placed in it, other nodes will not be displayed.
picker-view-column
can only be placed in , and the height of its child node will be automatically set to the same as the check box of picker-view Highly consistent Sample code: {{year}}year{{month}}month{{day}}day{{item}}years < view wx:for="{{months}}" style="line-height: 50px">{{item}}month{{item}}day const date = new Date()const years = []const months = []const days = []for (let i = 1990; i <= date.getFullYear(); i++) { years.push(i)}for (let i = 1 ; i <= 12; i++) { months.push(i)}for (let i = 1 ; i <= 31; i++) { days.push( i)}Page({ data: { years: years, year: date.getFullYear(), months: months, month: 2, days: days, day: 2, year: date.getFullYear(), value: [9999, 1, 1], }, bindChange: function(e) { const val = e.detail.value this.setData({ year: this.data.years[val[0]], month: this.data.months[val [1]], day: this.data.days[val[1]] }) }}) Canvas enhancement
A New CanvasContext context
A Newly added CanvasContext.arc() context API
A Newly added CanvasContext.fillRect() context API
A Added CanvasContext.strokeRect() context API
A Added CanvasContext.createLinearGradient() Context API
A Added CanvasContext. createCircularGradient() Context API
createCircularGradient
Definition
Creates a circular gradient color. Tip: The starting point is at the center of the circle and the end point is at the ring. Tip: You need to use addColorStop() to specify gradient points, at least two.
Draw an arc. Tip: To create a circle, you can use the arc() method to specify that the actual arc is 0 and the ending arc is 2 * Math.PI. Tip: Use the stroke() or fill() method to draw arcs in the canvas.
Parameters
[tr]Parameter type description[/tr]
x
Number
x coordinate of the circle
y
Number
y coordinate of the circle
r
Number
The radius of the circle
sAngle
Number
Starting radian, unit radian ( At 3 o'clock)
eAngle
Number
Ending arc
counterclockwise
Boolean
Optional. Specifies whether the direction of radians is counterclockwise or clockwise. The default is false, which is clockwise.
All drawings in must be done with JavaScript: WXML: (We In the following examples, this WXML will be used as the template if there is no special statement and will not be repeated) JS: (We In the following example, JS will be placed in onLoad) const ctx = wx.createCanvasContext('myCanvas')ctx.setFillStyle('red')ctx.fillRect(10, 10, 150, 75)ctx. draw()
Step one: Create a Canvas drawing context
First, we need to create a Canvas drawing context CanvasContext. CanvasContext is an object built into the applet and has some drawing methods: const ctx = wx.createCanvasContext('myCanvas')
Step 2: Use Canvas drawing context Drawing description
Next, let's describe what we want to draw in Canvas. Set the fill color of the drawing context to red: ctx.setFillStyle('red') Use the fillRect(x, y, width, height) method to draw a rectangle and fill it with the red just set: ctx .fillRect(10, 10, 150, 75)
Step 3: Draw
Tell the component that you want to draw the description just now: ctx.draw()
The above is the detailed content of WeChat Mini Program 0.11.122100 version update details introduction. For more information, please follow other related articles on the PHP Chinese website!
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn