INNER CODE UNIT · JavaScript

renderView

Tencent-TDS/KuiklyUI · miniApp-js/src/index.js:86

function renderView(json) {
  json = json || {};
  
  // ========== 步骤 1:按需加载页面 Bundle ==========
  // 每个页面的 bundle 包含页面初始化逻辑,必须在 renderView 之前加载
  var pageName = json.pageName;
  if (pageName) {
    var g = getGlobal();
    if (typeof g.loadPageBundle === 'function') {
      console.log('[renderView] Loading page bundle for:', pageName);
      g.loadPageBundle(pageName);
    } else {
      console.warn('[renderView] global.loadPageBundle not found, page bundle may not be loaded');
    }
  }
  
  // ========== 步骤 2:获取 Kotlin MiniDocument ==========
  var KotlinMiniDocument = getKotlinMiniDocument();

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…