123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731 |
- <!doctype html>
- <html class="no-js" lang="">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>app-angular documentation</title>
- <meta name="description" content="">
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <link rel="icon" type="image/x-icon" href="../images/favicon.ico">
- <link rel="stylesheet" href="../styles/style.css">
- </head>
- <body>
- <div class="navbar navbar-default navbar-fixed-top visible-xs">
- <a href="../" class="navbar-brand">app-angular documentation</a>
- <button type="button" class="btn btn-default btn-menu fa fa-bars" id="btn-menu"></button>
- </div>
- <div class="xs-menu menu" id="mobile-menu">
- <div id="book-search-input" role="search">
- <input type="text" placeholder="Type to search">
- </div>
- <nav>
-
- <ul class="list">
-
- <li class="title">
- <a href="../">app-angular documentation</a>
- </li>
-
- <li class="divider"></li>
-
-
- <li class="chapter">
- <a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
- <ul class="links">
- <li class="link">
- <a href="../" ><span class="fa fa-file-text-o"></span>README</a>
- </li>
- <li class="link">
- <a
-
- href="../overview.html"
- href="../overview.html"
- >
- <span class="fa fa-th"></span>Overview
- </a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <a data-type="chapter-link" href="./modules.html" >
- <span class="fa fa-archive"></span>
- <span>Modules</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#xs-modules-links"
- ></span>
- </a>
- <ul class="links collapse in"
- id="xs-modules-links"
- >
- <li class="link">
- <a href="../modules/AppModule.html" >AppModule</a>
- </li>
- <li class="link">
- <a href="../modules/LessonModule.html" >LessonModule</a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-cogs"></span>
- <span>Components</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#xs-components-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="xs-components-links"
- >
- <li class="link">
- <a href="../components/AppComponent.html" >AppComponent</a>
- </li>
- <li class="link">
- <a href="../components/BblComponent.html" >BblComponent</a>
- </li>
- <li class="link">
- <a href="../components/DetailComponent.html" >DetailComponent</a>
- </li>
- <li class="link">
- <a href="../components/EcharsComponent.html" >EcharsComponent</a>
- </li>
- <li class="link">
- <a href="../components/EchartsExempleComponent.html" >EchartsExempleComponent</a>
- </li>
- <li class="link">
- <a href="../components/EditComponent.html" >EditComponent</a>
- </li>
- <li class="link">
- <a href="../components/FlowfatherComponent.html" class="active" >FlowfatherComponent</a>
- </li>
- <li class="link">
- <a href="../components/FlowtestComponent.html" >FlowtestComponent</a>
- </li>
- <li class="link">
- <a href="../components/HomeComponent.html" >HomeComponent</a>
- </li>
- <li class="link">
- <a href="../components/NavTabsComponent.html" >NavTabsComponent</a>
- </li>
- <li class="link">
- <a href="../components/PageMineComponent.html" >PageMineComponent</a>
- </li>
- <li class="link">
- <a href="../components/PageSpotDetailComponent.html" >PageSpotDetailComponent</a>
- </li>
- </ul>
- </li>
-
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-file-code-o"></span>
- <span>Classes</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#xs-classes-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="xs-classes-links"
- >
- <li class="link">
- <a href="../classes/TestChatCompletion.html" >TestChatCompletion</a>
- </li>
- </ul>
- </li>
-
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-long-arrow-down"></span>
- <span>Injectables</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#xs-injectables-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="xs-injectables-links"
- >
- <li class="link">
- <a href="../injectables/DataServiceService.html" >DataServiceService</a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-info"></span>
- <span>Interfaces</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#xs-interfaces-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="xs-interfaces-links"
- >
- <li class="link">
- <a href="../interfaces/TestChatMessage.html" >TestChatMessage</a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-plus"></span>
- <span>Pipes</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#xs-pipes-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="xs-pipes-links"
- >
- <li class="link">
- <a href="../pipes/TokPipe.html" >TokPipe</a>
- </li>
- </ul>
- </li>
-
-
- <li class="chapter">
- <a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
- </li>
-
- <li class="divider"></li>
- <li class="copyright">
- Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
- <img src="..//images/compodoc-vectorise.svg" class="img-responsive">
- </a>
- </li>
-
- </ul>
-
- </nav>
- </div>
- <div class="container-fluid main">
- <div class="row main">
- <div class="hidden-xs menu">
- <nav>
-
- <ul class="list">
-
- <li class="title">
- <a href="../">app-angular documentation</a>
- </li>
-
- <li class="divider"></li>
-
- <div id="book-search-input" role="search">
- <input type="text" placeholder="Type to search">
- </div>
-
- <li class="chapter">
- <a data-type="chapter-link" href="../"><span class="fa fa-home"></span>Getting started</a>
- <ul class="links">
- <li class="link">
- <a href="../" ><span class="fa fa-file-text-o"></span>README</a>
- </li>
- <li class="link">
- <a
-
- href="../overview.html"
- href="../overview.html"
- >
- <span class="fa fa-th"></span>Overview
- </a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <a data-type="chapter-link" href="./modules.html" >
- <span class="fa fa-archive"></span>
- <span>Modules</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#modules-links"
- ></span>
- </a>
- <ul class="links collapse in"
- id="modules-links"
- >
- <li class="link">
- <a href="../modules/AppModule.html" >AppModule</a>
- </li>
- <li class="link">
- <a href="../modules/LessonModule.html" >LessonModule</a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-cogs"></span>
- <span>Components</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#components-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="components-links"
- >
- <li class="link">
- <a href="../components/AppComponent.html" >AppComponent</a>
- </li>
- <li class="link">
- <a href="../components/BblComponent.html" >BblComponent</a>
- </li>
- <li class="link">
- <a href="../components/DetailComponent.html" >DetailComponent</a>
- </li>
- <li class="link">
- <a href="../components/EcharsComponent.html" >EcharsComponent</a>
- </li>
- <li class="link">
- <a href="../components/EchartsExempleComponent.html" >EchartsExempleComponent</a>
- </li>
- <li class="link">
- <a href="../components/EditComponent.html" >EditComponent</a>
- </li>
- <li class="link">
- <a href="../components/FlowfatherComponent.html" class="active" >FlowfatherComponent</a>
- </li>
- <li class="link">
- <a href="../components/FlowtestComponent.html" >FlowtestComponent</a>
- </li>
- <li class="link">
- <a href="../components/HomeComponent.html" >HomeComponent</a>
- </li>
- <li class="link">
- <a href="../components/NavTabsComponent.html" >NavTabsComponent</a>
- </li>
- <li class="link">
- <a href="../components/PageMineComponent.html" >PageMineComponent</a>
- </li>
- <li class="link">
- <a href="../components/PageSpotDetailComponent.html" >PageSpotDetailComponent</a>
- </li>
- </ul>
- </li>
-
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-file-code-o"></span>
- <span>Classes</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#classes-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="classes-links"
- >
- <li class="link">
- <a href="../classes/TestChatCompletion.html" >TestChatCompletion</a>
- </li>
- </ul>
- </li>
-
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-long-arrow-down"></span>
- <span>Injectables</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#injectables-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="injectables-links"
- >
- <li class="link">
- <a href="../injectables/DataServiceService.html" >DataServiceService</a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-info"></span>
- <span>Interfaces</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#interfaces-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="interfaces-links"
- >
- <li class="link">
- <a href="../interfaces/TestChatMessage.html" >TestChatMessage</a>
- </li>
- </ul>
- </li>
-
- <li class="chapter">
- <div class="simple">
- <span class="fa fa-plus"></span>
- <span>Pipes</span>
- <span class="menu-toggler fa fa-angle-up" data-toggle="collapse"
- data-target="#pipes-links"
- ></span>
- </div>
- <ul class="links collapse in"
- id="pipes-links"
- >
- <li class="link">
- <a href="../pipes/TokPipe.html" >TokPipe</a>
- </li>
- </ul>
- </li>
-
-
- <li class="chapter">
- <a data-type="chapter-link" href="../coverage.html" ><span class="fa fa-tasks"></span>Documentation coverage</a>
- </li>
-
- <li class="divider"></li>
- <li class="copyright">
- Documentation generated using <a href="https://compodoc.github.io/compodoc/" target="_blank">
- <img src="..//images/compodoc-vectorise.svg" class="img-responsive">
- </a>
- </li>
-
- </ul>
-
- </nav>
- </div>
- <div class="content component">
- <div class="content-data">
- <ol class="breadcrumb">
- <li>Components</li>
- <li>FlowfatherComponent</li>
- </ol>
- <ul class="nav nav-tabs" role="tablist">
- <li class="active">
- <a href="#infos" id="infos-tab" role="tab" data-toggle="tab">Infos</a>
- </li>
- <li>
- <a href="#source" role="tab" id="source-tab" data-toggle="tab">Source</a>
- </li>
- </ul>
- <div class="tab-content">
- <div class="tab-pane fade active in" id="infos"><p class="comment">
- <h3>File</h3>
- </p>
- <p class="comment">
- <code>src/modules/lesson/flowtest/flowfather/flowfather.component.ts</code>
- </p>
- <section>
- <h3>Metadata</h3>
- <table class="table table-sm table-hover">
- <tbody>
- <tr>
- <td class="col-md-3">selector</td>
- <td class="col-md-9"><code>app-flowfather</code></td>
- </tr>
- <tr>
- <td class="col-md-3">styleUrls</td>
- <td class="col-md-9"><code>flowfather.component.scss</code></td>
- </tr>
- <tr>
- <td class="col-md-3">templateUrl</td>
- <td class="col-md-9"><code>flowfather.component.html</code></td>
- </tr>
- </tbody>
- </table>
- </section>
- <section>
- <h3 id="inputs">Inputs</h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-2">
- <code>list</code>
- </td>
- <td class="col-md-10">
- <div><p>根据@Input传参数组,实现分组效果</p>
- </div>
- <p>
- <em>Type:</em> <code>any[]</code>
- </p>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- <section>
- <h3 id="constructor">Constructor</h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <code>constructor()</code>
- </td>
- </tr>
-
- </tbody>
- </table>
- </section>
- <section>
- <h3 id="methods">Methods</h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <b> convertListToDisplay</b>
- </td>
- </tr>
-
- <tr>
- <td class="col-md-4">
- <code>convertListToDisplay(list: any[])</code>
- </td>
- </tr>
-
- <tr>
- <td class="col-md-4">
- <div class="io-description">
- <b>Returns: </b> <code>void</code>
-
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <b> convertListToDisplayByHeight</b>
- </td>
- </tr>
-
- <tr>
- <td class="col-md-4">
- <code>convertListToDisplayByHeight()</code>
- </td>
- </tr>
-
- <tr>
- <td class="col-md-4">
- <div class="io-description"><p>排列方式2: 列高度填满优先</p>
- </div>
- <div class="io-description">
- </div>
- <div class="io-description">
- <b>Returns: </b> <code>void</code>
-
- </div>
- <div class="io-description">
-
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- <section>
- <h3 id="inputs">Properties</h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <b> columnCount</b>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <code>columnCount: <code>number</code>
- </bcode>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <i>Default value: </i><code>4</code>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-description"><p>排列方式1: 列元素数量优先</p>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <b> displayColumnIdList</b>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <code>displayColumnIdList: <code>number[]</code>
- </bcode>
- </td>
- </tr>
- </tbody>
- </table>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <b> displayList</b>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <code>displayList: <code>any[][]</code>
- </bcode>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- </div>
- <div class="tab-pane fade tab-source-code" id="source">
- <pre><code class="hljs javascript">import { Component, Input, OnInit } from '@angular/core';
- import { CommonModule } from '@angular/common';
- import { IonicModule } from '@ionic/angular';
- @Component({
- selector: 'app-flowfather',
- templateUrl: './flowfather.component.html',
- styleUrls: ['./flowfather.component.scss'],
- })
- export class FlowfatherComponent {
- /**
- * 根据@Input传参数组,实现分组效果
- */
- @Input() list: Array<any> = []
- displayList: Array<Array<any>> = []
- constructor() {
- console.log("list contructor", this.list)
- }
- ngOnInit(): void {
- console.log("list ngOnInit", this.list)
- this.displayList = this.convertListToDisplay(this.list)
- }
- /**
- * 排列方式1: 列元素数量优先
- * @desc 根据列数取余
- * 用于列元素高度相差不大的情况下
- * 外层传入的列表,进行分组排列,实现瀑布流
- */
- columnCount = 4
- displayColumnIdList: Array<number> = []
- convertListToDisplay(list: any[]) {
- let displayList: Array<Array<any>> = [[]]
- list.forEach((item: any, index: number) => {
- let colIndex = index % this.columnCount
- if (!displayList[colIndex]) displayList[colIndex] = [] // 空值校验并补全空数组
- displayList[colIndex].push(item)
- })
- this.displayColumnIdList = displayList.map((item, index) => index)
- return displayList
- }
- /**
- * 排列方式2: 列高度填满优先
- * @desc 根据三列最低高度推送元素
- * 用于列元素高度相差较大的情况下
- */
- convertListToDisplayByHeight() {
- }
- }
- </code></pre>
- </div>
- </div>
- </div><div class="search-results">
- <div class="has-results">
- <h1 class="search-results-title"><span class='search-results-count'></span> results matching "<span class='search-query'></span>"</h1>
- <ul class="search-results-list"></ul>
- </div>
- <div class="no-results">
- <h1 class="search-results-title">No results matching "<span class='search-query'></span>"</h1>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script src="../js/libs/bootstrap-native.js"></script>
- <script src="../js/libs/es6-shim.min.js"></script>
- <script src="../js/libs/EventDispatcher.js"></script>
- <script src="../js/libs/promise.min.js"></script>
- <script src="../js/libs/zepto.min.js"></script>
- <script src="../js/compodoc.js"></script>
- <script src="../js/search/search.js"></script>
- <script src="../js/search/lunr.min.js"></script>
- <script src="../js/search/search-lunr.js"></script>
- <script src="../js/menu.js"></script>
- <script src="../js/libs/highlight.pack.js"></script>
- <script src="../js/libs/highlightjs-line-numbers.min.js"></script>
- <script src="../js/search/search_index.js"></script>
- <script>
- document.addEventListener('DOMContentLoaded', function() {
- hljs.initHighlightingOnLoad();
- hljs.initLineNumbersOnLoad();
- });
- </script>
- </body>
- </html>
|