Current section

Files

Jump to
weapp src wechat component.gleam
Raw

src/wechat/component.gleam

//// component module provides miniprogram `component` bindings
//// details in [wechat document](https://developers.weixin.qq.com/miniprogram/en/dev/framework/)
////
import wechat/object.{type JsObject}
/// SelectorQuery type
///
pub type SelectorQuery
/// component constructor `Component({...})`
///
@external(javascript, "../wechat_ffi.mjs", "run_component")
pub fn run_component(o: JsObject) -> Nil
/// `component.selectComponent()` for the specified component
///
@external(javascript, "../wechat_ffi.mjs", "select_component")
pub fn select_component(component c: JsObject, selector s: String) -> JsObject