feat: 电子药箱小程序 - 4Tab药品管理
- 电子药箱: 药品库存管理 + 手动录入 + 今日用药打卡 - 药品百科: 搜索 + 分类筛选 + 20种药品静态数据 - 惠教中心: 4条药品使用指南课程 - 我的: 家庭成员信息管理 - 自定义TabBar + navigation-bar组件 - SVG药品分类插图
This commit is contained in:
@@ -0,0 +1 @@
|
||||
"use strict";var _liveDescription=require("../../utils/live-description"),_theme=require("../../utils/theme"),_utils=require("../../utils/utils");Component({properties:{sdkInstance:{type:Object,value:null},isLandscape:{type:Boolean,value:!1}},data:{description:"",descriptionPopupVisible:!1,isDarkTheme:!1},observers:{sdkInstance:function(i){var e=this;i&&("function"==typeof this.unsub&&this.unsub(),this.unsub=null,this.unsub=i.store.get({liveInfo:function(i){var t=(0,_liveDescription.resolveLiveDescription)(i),s=e.data.isLandscape&&(0,_theme.isUseDarkTheme)(null==i?void 0:i.Basic),n={};t!==e.data.description&&(n.description=t,n.descriptionPopupVisible=!!t&&e.data.descriptionPopupVisible),s!==e.data.isDarkTheme&&(n.isDarkTheme=s),(0,_utils.setDataIfChanged)(e,n)}}))}},lifetimes:{detached:function(){"function"==typeof this.unsub&&this.unsub(),this.unsub=null}},methods:{openDescriptionPopup:function(){this.data.description&&this.setData({descriptionPopupVisible:!0})},closeDescriptionPopup:function(){this.data.descriptionPopupVisible&&this.setData({descriptionPopupVisible:!1})},catchNone:function(){}}});
|
||||
+1
@@ -0,0 +1 @@
|
||||
{"component":true,"usingComponents":{"mp-icon":"weui-miniprogram/icon/icon"}}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
<view wx:if="{{description}}" class="live-description {{isLandscape ? 'live-description-landscape' : 'live-description-portrait'}} {{isDarkTheme ? 'live-description-dark' : ''}}" bindtap="openDescriptionPopup">
|
||||
<view class="live-description-track">
|
||||
<text class="live-description-text">{{description}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view wx:if="{{descriptionPopupVisible && description}}" class="live-description-drawer-mask" bindtap="closeDescriptionPopup"></view>
|
||||
<view wx:if="{{descriptionPopupVisible && description}}" class="live-description-drawer-sheet" catchtap="catchNone">
|
||||
<view class="live-description-drawer">
|
||||
<view class="live-description-drawer-header">
|
||||
<text class="live-description-drawer-title">直播描述</text>
|
||||
<view class="live-description-drawer-close" bindtap="closeDescriptionPopup">
|
||||
<view class="live-description-drawer-close-icon">
|
||||
<mp-icon icon="close" size="{{16}}" color="#1d2129"></mp-icon>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<scroll-view scroll-y class="live-description-drawer-body">
|
||||
<view class="live-description-drawer-content">{{description}}</view>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</view>
|
||||
+1
@@ -0,0 +1 @@
|
||||
.live-description{box-sizing:border-box;width:100%;height:calc(64rpx + .5 * (1rem - 16px));padding:0;background:0 0;color:rgba(255,255,255,.94);font-size:calc(26rpx + .5 * (1rem - 16px));line-height:calc(64rpx + .5 * (1rem - 16px));overflow:hidden;z-index:104}.live-description-track{display:flex;align-items:center;width:100%;height:100%;white-space:nowrap;overflow:hidden}.live-description-text{display:inline-block;min-width:100%;box-sizing:border-box;padding-left:100%;padding-right:32rpx;line-height:36rpx;text-align:left;animation:live-description-marquee 8s linear infinite}.live-description-portrait{position:relative;height:calc(60rpx + .5 * (1rem - 16px));line-height:calc(60rpx + .5 * (1rem - 16px));color:rgba(255,255,255,.94)}.live-description-landscape{position:relative;color:#4e5969}.live-description-dark{color:rgba(255,255,255,.5)}.live-description-drawer{background:#fff;border-top-left-radius:36rpx;border-top-right-radius:36rpx;padding:36rpx 32rpx 32rpx;padding-bottom:calc(32rpx + env(safe-area-inset-bottom));box-sizing:border-box;color:#1d2129}.live-description-drawer-mask{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:1200}.live-description-drawer-sheet{position:fixed;left:0;right:0;bottom:0;z-index:1201}.live-description-drawer-header{display:flex;align-items:flex-start;justify-content:space-between;margin-bottom:28rpx}.live-description-drawer-title{font-size:calc(40rpx + .5 * (1rem - 16px));line-height:calc(56rpx + .5 * (1rem - 16px));font-weight:600;color:#1d2129}.live-description-drawer-close{width:60rpx;height:60rpx;border-radius:30rpx;background:#f0f1f5;display:flex;align-items:center;justify-content:center;flex:0 0 auto;line-height:0}.live-description-drawer-close-icon{width:32rpx;height:32rpx;display:flex;align-items:center;justify-content:center}.live-description-drawer-body{max-height:70vh}.live-description-drawer-content{font-size:calc(32rpx + .5 * (1rem - 16px));line-height:calc(52rpx + .5 * (1rem - 16px));color:#1d2129;word-break:break-word;overflow-wrap:anywhere}@keyframes live-description-marquee{0%{transform:translateX(0)}100%{transform:translateX(-100%)}}
|
||||
Reference in New Issue
Block a user