upper Article type to timi-web

This commit is contained in:
Timi
2025-07-22 12:57:39 +08:00
parent 957d349b4b
commit 0b4c3bf8e7
9 changed files with 39 additions and 121 deletions

View File

@ -18,7 +18,7 @@
</template>
<script lang="ts" setup>
import { Article } from "@/types/Article";
import { Article } from "timi-web";
const props = withDefaults(defineProps<{
list: Article<any>[]

View File

@ -25,9 +25,8 @@
</template>
<script lang="ts" setup>
import { CommentBizType, MarkdownView, SettingKey, SettingMapper, Time } from "timi-web";
import { ArticleView, CommentBizType, MarkdownView, SettingKey, SettingMapper, Time } from "timi-web";
import ArticleAPI from "@/api/ArticleAPI";
import { ArticleView } from "@/types/Article";
import { Comment } from "timi-tdesign-pc";
// 文章

View File

@ -55,8 +55,19 @@
</template>
<script lang="ts" setup>
import { ArticleAttachType, ArticleMusicExtendData, ArticleView } from "@/types/Article.ts";
import { CommentBizType, CommonAPI, Icon, MarkdownView, SettingKey, SettingMapper, Time, Toolkit } from "timi-web";
import {
ArticleAttachType,
ArticleMusicExtendData,
ArticleView,
CommentBizType,
CommonAPI,
Icon,
MarkdownView,
SettingKey,
SettingMapper,
Time,
Toolkit
} from "timi-web";
import { Comment } from "timi-tdesign-pc";
const props = defineProps<{
@ -73,6 +84,7 @@ const articleTime = computed(() => {
return "编辑于 " + Time.toPassedDateTime(article.value.updatedAt);
}
}
return "";
});
// 专辑封面
@ -87,7 +99,7 @@ const coverUrl = computed(() => {
}
}
return undefined;
})
});
// 展开可播放媒体
const activeMediaIndex = ref();

View File

@ -13,8 +13,7 @@
</template>
<script lang="ts" setup>
import { CommentBizType, MarkdownView, SettingKey, SettingMapper, Time } from "timi-web";
import { ArticleView } from "@/types/Article";
import { ArticleView, CommentBizType, MarkdownView, SettingKey, SettingMapper, Time } from "timi-web";
import { Comment } from "timi-tdesign-pc";
const props = defineProps<{

View File

@ -58,8 +58,19 @@
</template>
<script lang="ts" setup>
import { ArticleAttachType, ArticleSoftwareExtendData, ArticleView } from "@/types/Article.ts";
import { CommentBizType, CommonAPI, IOSize, MarkdownView, SettingKey, SettingMapper, Time, Toolkit } from "timi-web";
import {
ArticleAttachType,
ArticleSoftwareExtendData,
ArticleView,
CommentBizType,
CommonAPI,
IOSize,
MarkdownView,
SettingKey,
SettingMapper,
Time,
Toolkit
} from "timi-web";
import { Comment } from "timi-tdesign-pc";
const props = defineProps<{
@ -76,6 +87,7 @@ const articleTime = computed(() => {
return "编辑于 " + Time.toPassedDateTime(article.value.updatedAt);
}
}
return "";
});
const coverUrl = computed(() => {
@ -89,7 +101,7 @@ const coverUrl = computed(() => {
}
}
return undefined;
})
});
</script>
<style lang="less" scoped>