随笔分类 -  微信小程序 - 开发 / 框架 / 框架接口

1 2 下一页
clearInterval
摘要:clearInterval(number intervalID) 以 Promise 风格 调用:不支持 小程序插件:支持 取消由 setInterval 设置的定时器。 参数 number intervalID 要取消的定时器的 ID 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(7) 评论(0) 推荐(0)
setInterval
摘要:number setInterval(function callback, number delay, any rest) 以 Promise 风格 调用:不支持 小程序插件:支持 设定一个定时器。按照指定的周期(以毫秒计)来执行注册的回调函数 参数 function callback 回调函数 n 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(13) 评论(0) 推荐(0)
clearTimeout
摘要:clearTimeout(number timeoutID) 以 Promise 风格 调用:不支持 小程序插件:支持 取消由 setTimeout 设置的定时器。 参数 number timeoutID 要取消的定时器的 ID 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(10) 评论(0) 推荐(0)
setTimeout
摘要:number setTimeout(function callback, number delay, any rest) 以 Promise 风格 调用:不支持 小程序插件:支持 设定一个定时器。在定时到期以后执行注册的回调函数 参数 function callback 回调函数 number de 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(14) 评论(0) 推荐(0)
console.warn
摘要:console.warn() 向调试面板中打印 warn 日志 参数 any ...args 日志内容,可以有任意多个。 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(7) 评论(0) 推荐(0)
console.log
摘要:console.log() 向调试面板中打印 log 日志 参数 any ...args 日志内容,可以有任意多个。 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(5) 评论(0) 推荐(0)
console.info
摘要:console.info() 向调试面板中打印 info 日志 参数 any ...args 日志内容,可以有任意多个。 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(4) 评论(0) 推荐(0)
console.groupEnd
摘要:console.groupEnd() 结束由 console.group 创建的分组 注意事项 仅在工具中有效,在 vConsole 中为空函数实现。 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(4) 评论(0) 推荐(0)
console.group
摘要:console.group(string label) 在调试面板中创建一个新的分组。随后输出的内容都会被添加一个缩进,表示该内容属于当前分组。调用 console.groupEnd之后分组结束。 参数 string label 分组标记,可选。 注意事项 仅在工具中有效,在 vConsole 中为 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(9) 评论(0) 推荐(0)
console.error
摘要:console.error() 向调试面板中打印 error 日志 参数 any ...args 日志内容,可以有任意多个。 阅读全文
posted @ 2024-12-29 17:50 AtlasLapetos 阅读(4) 评论(0) 推荐(0)
console.debug
摘要:console.debug() 向调试面板中打印 debug 日志 参数 any ...args 日志内容,可以有任意多个。 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(7) 评论(0) 推荐(0)
console
摘要:console 向调试面板中打印日志。console 是一个全局对象,可以直接访问。在微信客户端中,向 vConsole 中输出日志。 方法 console.debug() 向调试面板中打印 debug 日志 console.log() 向调试面板中打印 log 日志 console.info() 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(20) 评论(0) 推荐(0)
requireMiniProgram
摘要:any requireMiniProgram() 基础库 2.11.1 开始支持,低版本需做兼容处理。 插件引入当前使用者小程序。返回使用者小程序通过插件配置中 export 暴露的接口。参考 使用插件 - 导出到插件 该接口仅在插件中存在。 参数 该接口不需要参数 示例代码 // in plugi 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(14) 评论(0) 推荐(0)
requirePlugin
摘要:any requirePlugin(string path) 引入插件。返回插件通过 main 暴露的接口。参考 使用插件 - js 接口 参数 名称 类型 说明 module string 需要引入的插件的 alias。基础库 2.14.0 起,也可以是插件的 AppID 示例代码 var myP 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(28) 评论(0) 推荐(0)
exports
摘要:Object exports module.exports 的引用 示例代码 // common.js function sayHello(name) { console.log(`Hello ${name} !`) } function sayGoodbye(name) { console.log 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(18) 评论(0) 推荐(0)
module
摘要:Object module 当前模块对象 属性 属性 类型 说明 exports Object 模块向外暴露的对象,使用require引用该模块时可以获取 示例代码 // common.js function sayHello(name) { console.log(`Hello ${name} ! 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(4) 评论(0) 推荐(0)
require
摘要:require 引入模块。返回模块通过 module.exports 或 exports 暴露的接口。 需要引入其他分包的模块的时候,可以通过配置 callback 回调函数来异步获取指定模块。异步获取失败的时候,将会触发 error 回调函数。 参数 名称 类型 必填 说明 path string 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(16) 评论(0) 推荐(0)
Behavior
摘要:Behavior(Object object) 注册一个 behavior,接受一个 Object 类型的参数。 参数 Object object 定义段 类型 是否必填 描述 最低版本 properties Object Map 否 组件的对外属性,是属性名到属性设置的映射表 data Objec 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(11) 评论(0) 推荐(0)
Component
摘要:Component(Object object) 创建自定义组件,接受一个 Object 类型的参数。 参数 Object object 定义段 类型 是否必填 描述 最低版本 properties Object Map 否 组件的对外属性,是属性名到属性设置的映射表 data Object 否 组 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(19) 评论(0) 推荐(0)
Router
摘要:Router 基础库 2.16.1 开始支持,低版本需做兼容处理。 页面路由器对象。可以通过 this.pageRouter 或 this.router 获得当前页面或自定义组件的路由器对象。 路由的相对路径 页面路由器有 switchTab reLaunch redirectTo navigate 阅读全文
posted @ 2024-12-29 17:49 AtlasLapetos 阅读(41) 评论(0) 推荐(0)

1 2 下一页