微信小程式開發文件 畫布

2021-09-11 21:02:03 字數 754 閱讀 5126

canvas

屬性名型別預設值

說明canvas-id

string

canvas 元件的唯一識別符號

disable-scroll

boolean

false

當在 canvas 中移動時且有繫結手勢事件時,禁止螢幕滾動以及下拉重新整理

bindtouchstart

eventhandle

手指觸控動作開始

bindtouchmove

eventhandle

手指觸控後移動

bindtouchend

eventhandle

手指觸控動作結束

bindtouchcancel

eventhandle

手指觸控動作被打斷,如來電提醒,彈窗

bindlongtap

eventhandle

手指長按 500ms 之後觸發,觸發了長按事件後進行移動不會觸發螢幕的滾動

binderror

eventhandle

當發生錯誤時觸發 error 事件,detail =

// canvas.js

page(,

onready(e)

})

微信小程式怎麼開發 小程式開發文件

2.建立專案 我們需要通過開發者工具,來完成小程式建立和 編輯。3.編寫 建立小程式例項 建立頁面 每乙個小程式頁面是由同路徑下同名的四個不同字尾檔案的組成,如 index.js index.wxml index.wxss index.json。js字尾的檔案是指令碼檔案,json字尾的檔案是配置檔...

微信小程式開發文件 樣式基礎

1.尺寸寬 weight rpx 最小寬度 min weight rpx 最大寬度 max weight rpx 高 height rpx 最小高度 min height rpx 最大高度 max height rpx 2.背景 背景顏色 background color 背景 background...

WXSS 微信開發文件

wxss weixin style sheets 是一套樣式語言,用於描述 wxml 的元件樣式。wxss 用來決定 wxml 的元件應該怎麼顯示。與 css 相比,wxss 擴充套件的特性有 裝置rpx換算px 螢幕寬度 750 px換算rpx 750 螢幕寬度 iphone5 1rpx 0.42...