mirror of
https://github.com/misskey-dev/misskey
synced 2024-11-25 07:37:13 +09:00
fix: dateの初期値が正常に入らない時がある (#9827)
* fix: dateの初期値が正常に入らない時がある * feat: datettime-localをとれるように * chore: いらない差分を戻す
This commit is contained in:
parent
6641b13b4c
commit
a6a8a7fb85
@ -42,7 +42,7 @@ import { i18n } from '@/i18n';
|
|||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
modelValue: string | number;
|
modelValue: string | number;
|
||||||
type?: 'text' | 'number' | 'password' | 'email' | 'url' | 'date' | 'time' | 'search';
|
type?: 'text' | 'number' | 'password' | 'email' | 'url' | 'date' | 'time' | 'search' | 'datetime-local';
|
||||||
required?: boolean;
|
required?: boolean;
|
||||||
readonly?: boolean;
|
readonly?: boolean;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
<MkInput v-model="ad.ratio" type="number">
|
<MkInput v-model="ad.ratio" type="number">
|
||||||
<template #label>{{ i18n.ts.ratio }}</template>
|
<template #label>{{ i18n.ts.ratio }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
<MkInput v-model="ad.expiresAt" type="date">
|
<MkInput v-model="ad.expiresAt" type="datetime-local">
|
||||||
<template #label>{{ i18n.ts.expiration }}</template>
|
<template #label>{{ i18n.ts.expiration }}</template>
|
||||||
</MkInput>
|
</MkInput>
|
||||||
</FormSplit>
|
</FormSplit>
|
||||||
@ -61,7 +61,12 @@ import { definePageMetadata } from '@/scripts/page-metadata';
|
|||||||
let ads: any[] = $ref([]);
|
let ads: any[] = $ref([]);
|
||||||
|
|
||||||
os.api('admin/ad/list').then(adsResponse => {
|
os.api('admin/ad/list').then(adsResponse => {
|
||||||
ads = adsResponse;
|
ads = adsResponse.map(r => {
|
||||||
|
return {
|
||||||
|
...r,
|
||||||
|
expiresAt: new Date(r.expiresAt).toISOString().slice(0, 16),
|
||||||
|
};
|
||||||
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
function add() {
|
function add() {
|
||||||
|
Loading…
Reference in New Issue
Block a user