For AI agents: the complete documentation index is available at /next/zh/llms.txt, the full documentation bundle is available at /next/zh/llms-full.txt, and this page is available as Markdown at /next/zh/api/lynx-native-api/lynx-update-meta.md.
Lynx
  • 简体中文
  • LynxUpdateMeta

    LynxUpdateMeta 是 LynxView 用于更新模板数据的元数据结构。它将作为 UpdateData 的输入参数。用户可以通过 LynxUpdateMeta 指定更新所需的各种参数,例如模板数据和 globalProps 等。

    Android:

    成员

    LynxUpdateMeta 具有如下成员:

    • updateData: TemplateData:更新模板的数据内容;
    • globalProps: TemplateData:用于更新模板的 globalProps 内容;

    构造

    在 Android 平台上需要利用 LynxUpdateMeta.Builder 来构造 LynxUpdateMeta 对象:

    LynxUpdateMeta.Builder builder = new LynxUpdateMeta.Builder();
    builder.setUpdatedData(data);
    builder.setUpdatedGlobalProps(globalProps);
    LynxUpdateMeta meta = builder.build();

    iOS

    成员

    LynxUpdateMeta 具有以下成员:

    • updateData: TemplateData:更新模板的数据内容;
    • globalProps: TemplateData:用于更新模板的 globalProps 内容;

    构造

    在 iOS 平台上按照如下方式构造 LynxLoadMeta 对象:

    LynxUpdateMeta* meta = [LynxUpdateMeta init];
    meta.data = nil;
    meta.globalProps = nil;

    Harmony

    成员

    MetaData 具有以下成员:

    • templateData: TemplateData:更新模板的数据内容;
    • globalProps: TemplateData:用于更新模板的 globalProps 内容;

    构造

    在 HarmonyOS 平台上,按如下方式构造 MetaData 对象:

    metaData = new MetaData(
      new TemplateData('{"text":"TD"}'),
      new TemplateData({ "theme": "Light" }));

    Desktop (C++)

    使用默认构造函数创建 LynxUpdateMeta,再通过 setter 配置:

    auto meta = std::make_shared<lynx::pub::LynxUpdateMeta>();
    meta->SetUpdateData(data);
    meta->SetGlobalProps(global_props);
    除非另有说明,本项目采用知识共享署名 4.0 国际许可协议进行许可,代码示例采用 Apache License 2.0 许可协议进行许可。