mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 19:29:04 +08:00
fix: mock plugin error #171
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
import moment from 'moment';
|
||||
import { dateUtil } from '/@/utils/dateUtil';
|
||||
import { reactive, toRefs } from 'vue';
|
||||
import { tryOnMounted, tryOnUnmounted } from '/@/utils/helper/vueHelper';
|
||||
import { useLocaleSetting } from '/@/hooks/setting/useLocaleSetting';
|
||||
|
||||
export function useNow(immediate = true) {
|
||||
const { getLang } = useLocaleSetting();
|
||||
const localData = moment.localeData(getLang.value);
|
||||
const localData = dateUtil.localeData(getLang.value);
|
||||
let timer: IntervalHandle;
|
||||
|
||||
const state = reactive({
|
||||
@@ -20,7 +20,7 @@ export function useNow(immediate = true) {
|
||||
});
|
||||
|
||||
const update = () => {
|
||||
const now = moment();
|
||||
const now = dateUtil();
|
||||
|
||||
const h = now.format('HH');
|
||||
const m = now.format('mm');
|
||||
|
Reference in New Issue
Block a user