Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
140 additions
and
51 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<template> | ||
<KTable | ||
v-loading="loading" | ||
:data="info" | ||
:options="options" | ||
@edit="edit" | ||
/> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { onMounted, ref } from "vue" | ||
import { steamplusone } from "@/api" | ||
import type { TableProps } from "@tomiaa/vue3-components" | ||
import { KTable } from "@tomiaa/vue3-components" | ||
const info = ref() | ||
const loading = ref(true) | ||
onMounted(async () => { | ||
try { | ||
const { data } = await steamplusone() | ||
info.value = data | ||
} finally { | ||
loading.value = false | ||
} | ||
}) | ||
const options: TableProps["options"] = [ | ||
{ | ||
label: "名称", | ||
prop: "name", | ||
}, | ||
{ | ||
label: "类型", | ||
prop: "type", | ||
}, | ||
{ | ||
label: "入库期限", | ||
prop: "perpetual", | ||
}, | ||
{ | ||
label: "平台", | ||
prop: "source", | ||
}, | ||
{ | ||
label: "开始时间", | ||
prop: "starttime", | ||
}, | ||
{ | ||
label: "结束时间", | ||
prop: "endtime", | ||
}, | ||
{ | ||
action: true, | ||
actionConfig: { | ||
editText: "立即获取", | ||
showDelete: false, | ||
custom(list, scope) { | ||
list[0].type = "primary" | ||
return list | ||
}, | ||
}, | ||
}, | ||
] | ||
const edit = ({ row }) => { | ||
window.open(row.url) | ||
} | ||
</script> | ||
<style lang="scss" scoped> | ||
.el-descriptions { | ||
margin-top: 1em; | ||
} | ||
.el-input { | ||
max-width: 450px; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<script setup lang="ts"> | ||
import steamplusone from "./components/steamplusone.vue" | ||
</script> | ||
|
||
# steam 喜加一信息 | ||
|
||
<ClientOnly> | ||
<steamplusone /> | ||
</ClientOnly> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters