修改部分自写公共组件代码
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
<view class="left-line" :class="{hide:index==list.length-1}"></view>
|
||||
</view>
|
||||
<view class="u-p-l-12 ">
|
||||
<view class="u-font-20">{{item[titleKey]||''}}</view>
|
||||
<view class="u-font-20">{{formatTitle(item[titleKey]||'') }}</view>
|
||||
<view class="u-font-24 u-m-t-2">{{item[contentKey]||''}}</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -14,6 +14,7 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import dayjs from 'dayjs';
|
||||
const props = defineProps({
|
||||
active: {
|
||||
type: [String, Number],
|
||||
@@ -32,6 +33,10 @@
|
||||
default: 'content'
|
||||
}
|
||||
})
|
||||
|
||||
function formatTitle(time){
|
||||
return dayjs(time).format('YYYY-M-D HH:MM:ss')
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
Reference in New Issue
Block a user