衡阳派盒市场营销有限公司

0
  • 聊天消息
  • 系統消息
  • 評論與回復
登錄后你可以
  • 下載海量資料
  • 學習在線課程
  • 觀看技術視頻
  • 寫文章/發帖/加入社區
會員中心
創作中心

完善資料讓更多小伙伴認識你,還能領取20積分哦,立即完善>

3天內不再提示

HarmonyOS原子化服務-時間管理

鴻蒙時代 ? 來源:鴻蒙時代 ? 作者:鴻蒙時代 ? 2022-04-29 10:37 ? 次閱讀

案例效果

HarmonyOS原子化服務-時間管理-OpenHarmony技術社區


HarmonyOS原子化服務-時間管理-OpenHarmony技術社區


一、創建項目
二、代碼示例
hml代碼部分


{{mouth}}月{{day}}日{{week}}
時間內容
是否刪除該條計劃

復制

css代碼部分

.container {
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    width: 100%;
    height: 100%;
}
.title{
    width: 100%;
    height: 40px;
    font-size: 24px;
    color: #fff;
    text-align: left;
    padding-left: 12px;
    background-color: dodgerblue;
    margin-bottom: 10px;
}
.txt{
    width: 100%;
    text-align: left;
    font-size: 16px;
    color: dodgerblue;
    padding-left: 16px;
}
.showTime{
    flex-direction: row;
    align-items: center;
    justify-content: flex-end;
    width: 100%;
}
.showText{
    font-size: 16px;
    color: #333;
    padding-right: 12px;
}
.boxTitle{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-around;
    width: 100%;
    margin-top: 4px;
    border: 1px;
}
.text{
    font-size: 16px;
    text-align: center;
    height: 40px;
/*    border: 1px;*/
}
.boxContent{
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
}
.hengStyle{
    flex-direction: row;
    align-items: flex-start;
    justify-content: space-between;
    width: 100%;
    border-bottom-width: 1px;
    border-left-width: 1px;
    border-right-width: 1px;
}
.inputTitle{
    width: 30%;
    height: 40px;
    font-size: 16px;
    color: #333;
    border-radius: 0px;
    background-color: #eee;
}
.inputTxt{
    width: 70%;
    font-size: 16px;
    height: 40px;
    border-radius: 0px;
    border-left-width: 1px;
    background-color: #eee;

}
.btnStyle{
    width: 100%;
    justify-content: center;
    align-items: center;
}
.inputBtn{
    width: 20%;
    height: 40px;
    text-align: center;
    font-size: 16px;
    border-radius: 0px;
    background-color: #ccc;
}
.dialogText{
    font-size: 24px;
    color: #333;
    margin-bottom: 10px;
}
.inner-btn {
    width: 80%;
    height: 50px;
    align-items: center;
    justify-content: space-around;
}

復制

js代碼部分:

export default {
    data: {
//        year:"",
        mouth:"",
        day:"",
        week:"",
//        hour:"",
//        min:"",
        planList:[
            {
                id:0,
                time:"選擇時間",
                content:"",
            }
        ],
        timeValue:"",
        inputValue:"",
        selectVal:"2021-06-08",
    },
    onShow(){
        this.getDate();
    },
    getDate:function(){
        let newDate = new Date();
        this.year = newDate.getFullYear();
        this.mouth = newDate.getMonth();
        this.day = newDate.getDay();
        this.hour = newDate.getHours();
        this.min = newDate.getMinutes();

        let weekArray = new Array("周日", "周一", "周二", "周三", "周四", "周五", "周六");
        this.week = weekArray[newDate.getDay()];
    },
    clickTime(idx){//彈出
        this.$element("chooseTime").show(idx);
        this.idx = idx;
    },
    chooseDate(e){//選擇時間
        let idx = this.idx;
        this.timeValue = e.year + "-" + e.month + "-" + e.day;
        this.planList[idx].time = this.timeValue;
    },
    inputPlanValue(e){//監聽輸入
        let idx = this.idx;
        this.inputValue = e.value;
        this.planList[idx].content = this.inputValue;
    },
    addPlan(){//增加計劃表
        this.planList.push({time:"選擇時間",content:""});
    },
    deleteList(idx){//刪除計劃
        this.$element("delDialog").show();
        this.delIdx = idx
    },
    setBack(){
        this.$element("delDialog").close();
    },
    setTure(){
        let idx = this.delIdx
        this.planList.splice(idx,1);
        this.$element("delDialog").close();
        console.log(idx)
    },
}

復制

三.案例效果

HarmonyOS原子化服務-時間管理-OpenHarmony技術社區HarmonyOS原子化服務-時間管理-OpenHarmony技術社區
聲明:本文內容及配圖由入駐作者撰寫或者入駐合作網站授權轉載。文章觀點僅代表作者本人,不代表電子發燒友網立場。文章及其配圖僅供工程師學習之用,如有內容侵權或者其他違規問題,請聯系本站處理。 舉報投訴
  • HarmonyOS
    +關注

    關注

    79

    文章

    1982

    瀏覽量

    30574
  • 原子化服務
    +關注

    關注

    0

    文章

    31

    瀏覽量

    922
收藏 人收藏

    評論

    相關推薦

    #HarmonyOS征文#HarmonyOS實戰—亮眼的原子服務體驗

    HarmonyOS Developer:什么是原子服務來看下幾個火熱的例子:距離HarmonyOS 2.0發布不到一個月
    發表于 07-05 19:19

    HarmonyOS如何高效上架原子服務?這個平臺幫你搞定!

    以往HarmonyOS應用和原子服務都是在AGC(App Gallery Connect)上架,二者的上架流程一樣。但應用的形態更加復雜龐大,上架時有很多必填字段,審核標準也相對復雜
    發表于 01-12 15:13

    HarmonyOS原子服務-時間管理

    ;text" style="width: 30%;"><span>時間</span&
    發表于 04-29 10:52

    直播預告丨 Hello HarmonyOS 進階課程第五課——原子服務

    本周三《Hello HarmonyOS系列應用篇:原子服務》,HDE李洋老師將帶領大家了解HarmonyOS
    發表于 05-30 12:00

    HarmonyOS原子服務案例分享-原卡秀

    一、案例說明原卡秀,原子服務服務卡片場景制作工具,本版本我們定義了個人、公司、門店、問候、使用說明五個場景。讓原子
    發表于 07-22 14:30

    HarmonyOS原子服務案例分享-蛟龍服務

    一、項目說明本HarmonyOS應用服務主要匯總了原子服務服務卡片發展的必然趨勢、使用對象,
    發表于 08-05 16:00

    HarmonyOS原子服務最新概念、呈現形式與觸發方式

    一、HarmonyOS原子服務最新概念總體介紹:原子服務
    發表于 12-27 10:03

    HarmonyOS原子服務卡片原理與實戰》清華大學出版社李洋著

    感謝所有的參與者、付出者;本著作的出版,既是對我本人及團隊兩年多時間HarmonyOS(鴻蒙)和OpenHarmony(開源鴻蒙)應用、原子服務
    發表于 12-29 12:14

    HarmonyOS原子服務開發相關術語

    。AI Search全局搜索用戶可快速搜索關鍵詞,與之匹配的原子服務則會出現在搜索結果中。Smart Service智慧服務用戶訂閱原子
    發表于 01-19 11:16

    HarmonyOS 3.1 Developer Preview 原子服務開發初體驗

    HarmonyOS 3.1 Developer Preview配套IDE下,在選擇原子服務(Atomic service)的時候,沒有stage模式,只有FA模式,API還在8。而在
    發表于 01-28 15:04

    及刻周邊惠:擁抱HarmonyOS原子服務

    及刻周邊惠:擁抱HarmonyOS原子服務 開發背景 及刻周邊惠是夢享網絡旗下本地生活服務平臺,旨在為消費者提供便捷的附近美食優惠。 當下
    發表于 03-13 10:39

    HarmonyOS鴻蒙原生應用開發設計- 元服務原子服務)圖標

    以防止使用別人的元服務圖標侵權意外情況等,減少自主創作元服務圖標的工作量。當然,如果有個性的自主又有能力創作的除外。 元服務原子
    發表于 11-01 16:55

    時間管理手冊

    時間管理手冊時間的寶貴在于它既不能創造,也不能復還。一、“鐘表時間”的終結“鐘表時間”是指鐘表所顯示的物理的、幾何學的時間。這如同一條直線,
    發表于 08-14 19:58 ?30次下載

    HarmonyOS原子服務新賽道:系統級入口服務中心

    10月22日-24日,為期三天的華為開發者大會2021(Together)在東莞舉行。本次大會《HarmonyOS應用與服務體驗創新分享》分論壇中,華為介紹了HarmonyOS全新的原子
    的頭像 發表于 10-26 15:05 ?1.3w次閱讀
    <b class='flag-5'>HarmonyOS</b><b class='flag-5'>原子</b><b class='flag-5'>化</b><b class='flag-5'>服務</b>新賽道:系統級入口<b class='flag-5'>服務</b>中心

    原子服務是什么意思?華為原子服務概述

    原子服務是什么意思?華為原子服務概述 原子
    的頭像 發表于 11-02 17:52 ?1.6w次閱讀
    <b class='flag-5'>原子</b><b class='flag-5'>化</b><b class='flag-5'>服務</b>是什么意思?華為<b class='flag-5'>原子</b><b class='flag-5'>化</b><b class='flag-5'>服務</b>概述
    百家乐玩法教程| 百家乐官网社区| 汝南县| 高档百家乐桌子| 利都百家乐官网国际娱乐网| 香港六合彩的开奖结果| 澳门百家乐赢钱公式不倒翁| 百家乐官网特殊技巧| 栾城县| 大发888游戏平台188| 百家乐设备电子路| 足球百家乐官网投注网出租 | 澳门百家乐官网群官网| 能赚钱的棋牌游戏| 百家乐qq游戏| 缅甸百家乐网站| 缅甸百家乐官网玩家吗| 武宁县| 大发888游戏平台hg| 棋牌百家乐程序破解| 百家乐官网娱乐平台开户| 顶尖百家乐官网学习| 88娱乐城2官方网站| 全迅网百家乐的玩法技巧和规则| 什么风水适合做生意| 百家乐官网2号破解下载| 百家乐官网技巧和规律| 千亿娱乐| 大发888开户博彩吧| 利高百家乐的玩法技巧和规则| 百家乐有破解的吗| 红9百家乐官网的玩法技巧和规则| 澳门百家乐官网网址多少| 临夏市| 太阳城娱乐城备用网址| 威尼斯人娱乐城怎么样| 百家乐必胜课| 百家乐注册赠金| 罗浮宫百家乐官网的玩法技巧和规则 | 大发888手机好玩吗| 威尼斯人娱乐场五星|