123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604 |
- <!doctype html>
- <html class="no-js" lang="">
- <head>
- <meta charset="utf-8">
- <meta http-equiv="x-ua-compatible" content="ie=edge">
- <title>time1 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">
- <link rel="stylesheet" href="../styles/dark.css">
- </head>
- <body>
- <script>
- // Blocking script to avoid flickering dark mode
- // Dark mode toggle button
- var useDark = window.matchMedia('(prefers-color-scheme: dark)');
- var darkModeState = useDark.matches;
- var $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
- var $darkModeToggles = document.querySelectorAll('.dark-mode-switch');
- var darkModeStateLocal = localStorage.getItem('compodoc_darkmode-state');
- function checkToggle(check) {
- for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
- $darkModeToggleSwitchers[i].checked = check;
- }
- }
- function toggleDarkMode(state) {
- if (window.localStorage) {
- localStorage.setItem('compodoc_darkmode-state', state);
- }
- checkToggle(state);
- const hasClass = document.body.classList.contains('dark');
- if (state) {
- for (var i = 0; i < $darkModeToggles.length; i++) {
- $darkModeToggles[i].classList.add('dark');
- }
- if (!hasClass) {
- document.body.classList.add('dark');
- }
- } else {
- for (var i = 0; i < $darkModeToggles.length; i++) {
- $darkModeToggles[i].classList.remove('dark');
- }
- if (hasClass) {
- document.body.classList.remove('dark');
- }
- }
- }
- useDark.addEventListener('change', function (evt) {
- toggleDarkMode(evt.matches);
- });
- if (darkModeStateLocal) {
- darkModeState = darkModeStateLocal === 'true';
- }
- toggleDarkMode(darkModeState);
- </script>
- <div class="navbar navbar-default navbar-fixed-top d-md-none p-0">
- <div class="d-flex">
- <a href="../" class="navbar-brand">time1 documentation</a>
- <button type="button" class="btn btn-default btn-menu ion-ios-menu" id="btn-menu"></button>
- </div>
- </div>
- <div class="xs-menu menu" id="mobile-menu">
- <div id="book-search-input" role="search"><input type="text" placeholder="Type to search"></div> <compodoc-menu></compodoc-menu>
- </div>
- <div class="container-fluid main">
- <div class="row main">
- <div class="d-none d-md-block menu">
- <compodoc-menu mode="normal"></compodoc-menu>
- </div>
- <!-- START CONTENT -->
- <div class="content component">
- <div class="content-data">
- <ol class="breadcrumb">
- <li class="breadcrumb-item">Components</li>
- <li class="breadcrumb-item"
- >
- HomePage</li>
- </ol>
- <ul class="nav nav-tabs" role="tablist">
- <li class="nav-item">
- <a href="#info" class="nav-link active"
- role="tab" id="info-tab" data-bs-toggle="tab" data-link="info">Info</a>
- </li>
- <li class="nav-item">
- <a href="#source" class="nav-link"
- role="tab" id="source-tab" data-bs-toggle="tab" data-link="source">Source</a>
- </li>
- <li class="nav-item">
- <a href="#templateData" class="nav-link"
- role="tab" id="templateData-tab" data-bs-toggle="tab" data-link="template">Template</a>
- </li>
- <li class="nav-item">
- <a href="#styleData" class="nav-link"
- role="tab" id="styleData-tab" data-bs-toggle="tab" data-link="style">Styles</a>
- </li>
- <li class="nav-item">
- <a href="#tree" class="nav-link"
- role="tab" id="tree-tab" data-bs-toggle="tab" data-link="dom-tree">DOM Tree</a>
- </li>
- </ul>
- <div class="tab-content">
- <div class="tab-pane fade active in" id="info"><p class="comment">
- <h3>File</h3>
- </p>
- <p class="comment">
- <code>src/app/home/home.page.ts</code>
- </p>
- <section data-compodoc="block-metadata">
- <h3>Metadata</h3>
- <table class="table table-sm table-hover metadata">
- <tbody>
- <tr>
- <td class="col-md-3">selector</td>
- <td class="col-md-9"><code>app-home</code></td>
- </tr>
- <tr>
- <td class="col-md-3">styleUrls</td>
- <td class="col-md-9"><code>home.page.scss</code></td>
- </tr>
- <tr>
- <td class="col-md-3">templateUrl</td>
- <td class="col-md-9"><code>home.page.html</code></td>
- </tr>
- </tbody>
- </table>
- </section>
- <section data-compodoc="block-index">
- <h3 id="index">Index</h3>
- <table class="table table-sm table-bordered index-table">
- <tbody>
- <tr>
- <td class="col-md-4">
- <h6><b>Properties</b></h6>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <ul class="index-list">
- <li>
- <a href="#tasks" >tasks</a>
- </li>
- </ul>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <h6><b>Methods</b></h6>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <ul class="index-list">
- <li>
- <a href="#onCheckinClick" >onCheckinClick</a>
- </li>
- <li>
- <a href="#onUnfinishedClick" >onUnfinishedClick</a>
- </li>
- </ul>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- <section data-compodoc="block-constructor">
- <h3 id="constructor">Constructor</h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <code>constructor()</code>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-line">Defined in <a href="" data-line="13" class="link-to-prism">src/app/home/home.page.ts:13</a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- <section data-compodoc="block-methods">
-
- <h3 id="methods">
- Methods
- </h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <a name="onCheckinClick"></a>
- <span class="name">
- <span ><b>onCheckinClick</b></span>
- <a href="#onCheckinClick"><span class="icon ion-ios-link"></span></a>
- </span>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <code>onCheckinClick()</code>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-line">Defined in <a href="" data-line="21"
- class="link-to-prism">src/app/home/home.page.ts:21</a></div>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-description">
- <b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <a name="onUnfinishedClick"></a>
- <span class="name">
- <span ><b>onUnfinishedClick</b></span>
- <a href="#onUnfinishedClick"><span class="icon ion-ios-link"></span></a>
- </span>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <code>onUnfinishedClick()</code>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-line">Defined in <a href="" data-line="17"
- class="link-to-prism">src/app/home/home.page.ts:17</a></div>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-description">
- <b>Returns : </b> <code><a href="https://www.typescriptlang.org/docs/handbook/basic-types.html" target="_blank" >void</a></code>
- </div>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- <section data-compodoc="block-properties">
-
- <h3 id="inputs">
- Properties
- </h3>
- <table class="table table-sm table-bordered">
- <tbody>
- <tr>
- <td class="col-md-4">
- <a name="tasks"></a>
- <span class="name">
- <span ><b>tasks</b></span>
- <a href="#tasks"><span class="icon ion-ios-link"></span></a>
- </span>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <i>Type : </i> <code>[]</code>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <i>Default value : </i><code>[
- { time: '08:00:00', content: '早间任务' },
- { time: '12:00:00', content: '中间任务' },
- { time: '18:00:00', content: '晚间任务' }
- ]</code>
- </td>
- </tr>
- <tr>
- <td class="col-md-4">
- <div class="io-line">Defined in <a href="" data-line="9" class="link-to-prism">src/app/home/home.page.ts:9</a></div>
- </td>
- </tr>
- </tbody>
- </table>
- </section>
- </div>
- <div class="tab-pane fade tab-source-code" id="source">
- <pre class="line-numbers compodoc-sourcecode"><code class="language-typescript">import { Component } from '@angular/core';
- @Component({
- selector: 'app-home',
- templateUrl: 'home.page.html',
- styleUrls: ['home.page.scss'],
- })
- export class HomePage {
- tasks = [
- { time: '08:00:00', content: '早间任务' },
- { time: '12:00:00', content: '中间任务' },
- { time: '18:00:00', content: '晚间任务' }
- ];
- constructor() {}
- onUnfinishedClick() {
- console.log('未完成按钮点击');
- }
- onCheckinClick() {
- console.log('打卡按钮点击');
- }
- }
- </code></pre>
- </div>
- <div class="tab-pane fade " id="templateData">
- <pre class="line-numbers"><code class="language-html"><ion-header>
- </ion-header>
- <ion-content>
- <div class="top-section">
- <div class="left">
- <div class="task-time">08:00:00 - 11:30:00</div>
- <div class="task-time">12:00:00 - 17:30:00</div>
- <div class="task-time">18:00:00 - 11:30:00</div>
- </div>
- <div class="right">
- <div class="task-content">早间任务</div>
- <div class="task-content">中间任务</div>
- <div class="task-content">晚间任务</div>
- </div>
- </div>
- <div class="bottom-section">
- <ion-button expand="block" shape="round" color="danger" class="unfinished-button">
- 未完成
- </ion-button>
- <ion-button expand="block" shape="round" color="success" class="checkin-button">
- 打卡
- </ion-button>
- </div>
- </ion-content>
- </code></pre>
- </div>
- <div class="tab-pane fade " id="styleData">
- <p class="comment">
- <code>home.page.scss</code>
- </p>
- <pre class="line-numbers"><code class="language-scss">ion-content {
- --padding-top: 0;
- --padding-bottom: 0;
- --padding-start: 0;
- --padding-end: 0;
-
- .top-section {
- display: flex;
- height: 73vh; // 占据3/4的高度
-
- .left, .right {
- display: flex;
- flex-direction: column;
- justify-content: space-between;
- align-items: center;
- }
-
- .left {
- width: 33.33%; // 左侧宽度1/3
- background-color: #f0f0f0;
- }
-
- .right {
- width: 66.66%; // 右侧宽度2/3
- background-color: #e0e0e0;
- }
-
- .task-time, .task-content {
- display: flex;
- justify-content: center;
- align-items: center;
- height: 33.33%; // 每项高度1/3
- font-size: 1.2em;
- }
- }
-
- .bottom-section {
- display: flex;
- justify-content: space-around;
- align-items: center;
- height: 20vh; // 占据1/4的高度
-
- ion-button {
- width: 40%; // 按钮宽度40%
- height: 40%; // 按钮高度40%
- border-radius: 50%;
- font-size: 1.2em;
- }
- }
- }
- </code></pre>
- </div>
- <div class="tab-pane fade " id="tree">
- <div id="tree-container"></div>
- <div class="tree-legend">
- <div class="title">
- <b>Legend</b>
- </div>
- <div>
- <div class="color htmlelement"></div><span>Html element</span>
- </div>
- <div>
- <div class="color component"></div><span>Component</span>
- </div>
- <div>
- <div class="color directive"></div><span>Html element with directive</span>
- </div>
- </div>
- </div>
-
- </div>
- <script src="../js/libs/vis.min.js"></script>
- <script src="../js/libs/htmlparser.js"></script>
- <script src="../js/libs/deep-iterator.js"></script>
- <script>
- var COMPONENT_TEMPLATE = '<div><ion-header></ion-header><ion-content> <div class="top-section"> <div class="left"> <div class="task-time">08:00:00 - 11:30:00</div> <div class="task-time">12:00:00 - 17:30:00</div> <div class="task-time">18:00:00 - 11:30:00</div> </div> <div class="right"> <div class="task-content">早间任务</div> <div class="task-content">中间任务</div> <div class="task-content">晚间任务</div> </div> </div> <div class="bottom-section"> <ion-button expand="block" shape="round" color="danger" class="unfinished-button"> 未完成 </ion-button> <ion-button expand="block" shape="round" color="success" class="checkin-button"> 打卡 </ion-button> </div></ion-content></div>'
- var COMPONENTS = [{'name': 'AppComponent', 'selector': 'app-root'},{'name': 'ExploreContainerComponent', 'selector': 'app-explore-container'},{'name': 'HomePage', 'selector': 'app-home'},{'name': 'ProfilePage', 'selector': 'app-profile'},{'name': 'ServicesPage', 'selector': 'app-services'},{'name': 'TabsPage', 'selector': 'app-tabs'},{'name': 'TasksPage', 'selector': 'app-tasks'}];
- var DIRECTIVES = [];
- var ACTUAL_COMPONENT = {'name': 'HomePage'};
- </script>
- <script src="../js/tree.js"></script>
- </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>
- <!-- END CONTENT -->
- </div>
- </div>
- <label class="dark-mode-switch">
- <input type="checkbox">
- <span class="slider">
- <svg class="slider-icon" viewBox="0 0 24 24" fill="none" height="20" stroke="#000" stroke-linecap="round" stroke-linejoin="round" stroke-width="2" width="20" xmlns="http://www.w3.org/2000/svg">
- <path d="M21 12.79A9 9 0 1111.21 3 7 7 0 0021 12.79z"></path>
- </svg>
- </span>
- </label>
- <script>
- var COMPODOC_CURRENT_PAGE_DEPTH = 1;
- var COMPODOC_CURRENT_PAGE_CONTEXT = 'component';
- var COMPODOC_CURRENT_PAGE_URL = 'HomePage.html';
- var MAX_SEARCH_RESULTS = 15;
- </script>
- <script>
- $darkModeToggleSwitchers = document.querySelectorAll('.dark-mode-switch input');
- checkToggle(darkModeState);
- if ($darkModeToggleSwitchers.length > 0) {
- for (var i = 0; i < $darkModeToggleSwitchers.length; i++) {
- $darkModeToggleSwitchers[i].addEventListener('change', function (event) {
- darkModeState = !darkModeState;
- toggleDarkMode(darkModeState);
- });
- }
- }
- </script>
- <script src="../js/libs/custom-elements.min.js"></script>
- <script src="../js/libs/lit-html.js"></script>
- <script src="../js/menu-wc.js" defer></script>
- <script nomodule src="../js/menu-wc_es5.js" defer></script>
- <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/tabs.js"></script>
- <script src="../js/menu.js"></script>
- <script src="../js/libs/clipboard.min.js"></script>
- <script src="../js/libs/prism.js"></script>
- <script src="../js/sourceCode.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/search/search_index.js"></script>
- <script src="../js/lazy-load-graphs.js"></script>
- </body>
- </html>
|