Browse Source

date组件修改

ming 3 years ago
parent
commit
70352b8a07
2 changed files with 4 additions and 3 deletions
  1. 2 1
      components/fs-date-format/fs-date-format.vue
  2. 2 2
      modules/common/setting.vue

+ 2 - 1
components/fs-date-format/fs-date-format.vue

@@ -5,6 +5,7 @@
 </template>
 
 <script setup>
+import { computed } from 'vue'
 import dayjs from 'dayjs'
 
 const props = defineProps({
@@ -16,7 +17,7 @@ const props = defineProps({
 })
 const emits = defineEmits(['click'])
 
-const dateFormat = dayjs(props.date).format(props.format)
+const dateFormat = computed(() => dayjs(props.date).format(props.format))
 
 const handleClick = () => {
 	emits('click')

+ 2 - 2
modules/common/setting.vue

@@ -6,8 +6,8 @@
 			</fs-cell-group>
 		</template>
 		
-		<template #footer v-if="token">
-			<view class="layout-box">
+		<template #footer>
+			<view class="layout-box" v-if="token">
 				<fs-button round full @click="handleLogout">退出登录</fs-button>
 			</view>
 		</template>