update moment全局化

This commit is contained in:
2021-04-28 09:32:40 +08:00
parent bfb61e728c
commit a52dd1bdb2
7 changed files with 22 additions and 33 deletions

View File

@@ -3,7 +3,10 @@
<a href="#" slot="extra">更多</a>
<a-list :data-source="data" item-layout="horizontal">
<a-list-item slot="renderItem" slot-scope="item">
<a-list-item-meta :description="moment().format('YYYY-MM-DD HH:mm:ss')" :title="item.title">
<a-list-item-meta
:description="$moment().format('YYYY-MM-DD HH:mm:ss')"
:title="item.title"
>
<a-icon :style="{ fontSize: '18px' }" slot="avatar" theme="twoTone" type="message" />
</a-list-item-meta>
</a-list-item>
@@ -11,8 +14,6 @@
</a-card>
</template>
<script>
import moment from 'moment';
export default {
data() {
return {
@@ -23,8 +24,5 @@ export default {
],
};
},
methods: {
moment,
},
};
</script>