feat: 添加 page-container 组件并更新相关页面以使用该组件
This commit is contained in:
@@ -1,3 +1,5 @@
|
||||
{
|
||||
"usingComponents": {}
|
||||
"usingComponents": {
|
||||
"page-container": "../../components/page-container/page-container"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -2,18 +2,6 @@
|
||||
.container {
|
||||
padding: 20rpx;
|
||||
background-color: #f5f5f5;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
.header {
|
||||
margin-bottom: 30rpx;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.title {
|
||||
font-size: 36rpx;
|
||||
font-weight: bold;
|
||||
color: #333;
|
||||
}
|
||||
|
||||
.section {
|
||||
|
||||
@@ -1,74 +1,72 @@
|
||||
<!--pages/date/date.wxml-->
|
||||
<view class="container">
|
||||
<view class="header">
|
||||
<text class="title">日期时间格式化示例</text>
|
||||
</view>
|
||||
<page-container title="日期时间格式化示例" backgroundColor="#123321" textColor="#ffffff">
|
||||
<view class="container">
|
||||
<!-- formatTime 函数示例 -->
|
||||
<view class="section">
|
||||
<view class="section-title">formatTime 函数示例</view>
|
||||
<view class="section-desc">固定格式:YYYY/MM/DD HH:mm:ss</view>
|
||||
<view class="example-list">
|
||||
<view class="example-item" wx:for="{{formatTimeExamples}}" wx:key="label">
|
||||
<view class="example-label">{{item.label}}:</view>
|
||||
<view class="example-value">
|
||||
<text class="result-text" selectable="{{true}}">{{item.value}}</text>
|
||||
<text
|
||||
class="copy-btn"
|
||||
data-text="{{item.value}}"
|
||||
bindtap="copyText"
|
||||
wx:if="{{item.value}}"
|
||||
>
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- formatTime 函数示例 -->
|
||||
<view class="section">
|
||||
<view class="section-title">formatTime 函数示例</view>
|
||||
<view class="section-desc">固定格式:YYYY/MM/DD HH:mm:ss</view>
|
||||
<view class="example-list">
|
||||
<view class="example-item" wx:for="{{formatTimeExamples}}" wx:key="label">
|
||||
<view class="example-label">{{item.label}}:</view>
|
||||
<view class="example-value">
|
||||
<text class="result-text" selectable="{{true}}">{{item.value}}</text>
|
||||
<text
|
||||
class="copy-btn"
|
||||
data-text="{{item.value}}"
|
||||
bindtap="copyText"
|
||||
wx:if="{{item.value}}"
|
||||
>
|
||||
复制
|
||||
</text>
|
||||
<!-- formatDateTime 函数示例 - 不同格式模板 -->
|
||||
<view class="section">
|
||||
<view class="section-title">formatDateTime 函数示例 - 不同格式模板</view>
|
||||
<view class="section-desc">支持自定义格式模板,灵活配置日期时间显示格式</view>
|
||||
<view class="example-list">
|
||||
<view class="example-item" wx:for="{{formatDateTimeExamples}}" wx:key="label">
|
||||
<view class="example-label">{{item.label}}</view>
|
||||
<view class="example-format">格式模板:{{item.format}}</view>
|
||||
<view class="example-value">
|
||||
<text class="result-text" selectable="{{true}}">{{item.value}}</text>
|
||||
<text
|
||||
class="copy-btn"
|
||||
data-text="{{item.value}}"
|
||||
bindtap="copyText"
|
||||
wx:if="{{item.value}}"
|
||||
>
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- formatDateTime 函数示例 - 不同输入类型 -->
|
||||
<view class="section">
|
||||
<view class="section-title">formatDateTime 函数示例 - 不同输入类型</view>
|
||||
<view class="section-desc">支持 Date 对象、时间戳、日期字符串等多种输入类型</view>
|
||||
<view class="example-list">
|
||||
<view class="example-item" wx:for="{{inputTypeExamples}}" wx:key="label">
|
||||
<view class="example-label">{{item.label}}</view>
|
||||
<view class="example-format">输入:{{item.input}}</view>
|
||||
<view class="example-value">
|
||||
<text class="result-text" selectable="{{true}}">{{item.value}}</text>
|
||||
<text
|
||||
class="copy-btn"
|
||||
data-text="{{item.value}}"
|
||||
bindtap="copyText"
|
||||
wx:if="{{item.value}}"
|
||||
>
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- formatDateTime 函数示例 - 不同格式模板 -->
|
||||
<view class="section">
|
||||
<view class="section-title">formatDateTime 函数示例 - 不同格式模板</view>
|
||||
<view class="section-desc">支持自定义格式模板,灵活配置日期时间显示格式</view>
|
||||
<view class="example-list">
|
||||
<view class="example-item" wx:for="{{formatDateTimeExamples}}" wx:key="label">
|
||||
<view class="example-label">{{item.label}}</view>
|
||||
<view class="example-format">格式模板:{{item.format}}</view>
|
||||
<view class="example-value">
|
||||
<text class="result-text" selectable="{{true}}">{{item.value}}</text>
|
||||
<text
|
||||
class="copy-btn"
|
||||
data-text="{{item.value}}"
|
||||
bindtap="copyText"
|
||||
wx:if="{{item.value}}"
|
||||
>
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<!-- formatDateTime 函数示例 - 不同输入类型 -->
|
||||
<view class="section">
|
||||
<view class="section-title">formatDateTime 函数示例 - 不同输入类型</view>
|
||||
<view class="section-desc">支持 Date 对象、时间戳、日期字符串等多种输入类型</view>
|
||||
<view class="example-list">
|
||||
<view class="example-item" wx:for="{{inputTypeExamples}}" wx:key="label">
|
||||
<view class="example-label">{{item.label}}</view>
|
||||
<view class="example-format">输入:{{item.input}}</view>
|
||||
<view class="example-value">
|
||||
<text class="result-text" selectable="{{true}}">{{item.value}}</text>
|
||||
<text
|
||||
class="copy-btn"
|
||||
data-text="{{item.value}}"
|
||||
bindtap="copyText"
|
||||
wx:if="{{item.value}}"
|
||||
>
|
||||
复制
|
||||
</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</page-container>
|
||||
|
||||
Reference in New Issue
Block a user