登录
文档目录
图片名称

5.cloudpivot-list/application应用

2025-04-14 23:20:59(最后一次修改:2025-04-21 14:20:05)

应用模块主要用以 admin 创建的应用在mobile 与 pc 前台的展示,分为 mobile 与 pc 两端 渲染不同页面


mobile


  • AppsIndex 将整个应用模块导出,可以在路由直接引用

  • SingleApp 导出移动端单应用某块,使用方式与 AppsIndex 相同


使用方式

import * as  applicationList from '@cloudpivot/list'; // 将怎么模块导出

applicationList: {
    path: 'application-list/:schemaCode',
    name: 'applicationList',
    component: applicationList.components.pc.ApplicationList
}

// 通过 . 索引到对应组件引入使用

AppsIndex


作为引用列表页面的出入口,由下面三部分组成:


  • search-bar 引用是搜索功能,目前不对外开放

  • search-panel  搜索结果的展示,不对外开放

  • app-list 应用列表的主体内容, 不对外开放


app-list


  • side-bar 侧边栏

  • app-content 应用展示区域组成


PC


pc 应用主要导出两个部分,可以直接导入使用:


  • ApplicationHeader顶部导航条应用的列表

  • AppsMenu 左侧数据模型树

  • AppHomeContent 单应用首页内容

  • AppHomeHeader 单应用首页头部


使用方式:

import * as ApplicationComponents from '@cloudpivot/application';


@Component({
  name: 'common-header',
  components: {
    ApplicationHeader: ApplicationComponents.components.pc.ApplicationHeader
  }
})


单应用引用示例:


  • AppHomeContent的引用

<template>
  <app-home-content :appCode="code"></app-home-content>
</template>
import * as Application from '@cloudpivot/application';

@Component({
  name: 'app-home',
  components: {
    AppHomeContent: Application.components.pc.AppHomeContent
  }
})

  • AppHomeHeader的引用

<template>
    <app-home-header>
      <!-- AppHomeHeader组件的插槽 -->
      <div slot="left"><!--单应用头部左侧自定义代码 --></div>
      <div slot="right"><!--单应用头部右侧自定义代码 --></div>
    </app-home-header>
</template>
import * as Application from '@cloudpivot/application';

@Component({
  name: 'app-home',
  components: {
    AppHomeHeader: Application.components.pc.AppHomeHeader
  }
})

单应用参数列表

  • AppHomeContent 参数

/**
 * 应用编码
*/
@Prop() appCode!: string;


  • 没有用(0

本文链接:https://open.hetusaas.com/?id=23

图片名称

网友评论

图片名称