mirror of
https://github.com/TriM-Organization/LiteyukiBot-TriM.git
synced 2024-11-11 01:27:29 +08:00
✨ 插件商店及资源商店新增搜索功能
This commit is contained in:
parent
dbc114a529
commit
01e6256ed4
@ -18,11 +18,12 @@ let filteredItems = computed(() => {
|
||||
let items = ref([])
|
||||
let search = ref('')
|
||||
// 从官方拉取
|
||||
fetch('assets/plugins.json')
|
||||
fetch("https://bot.liteyuki.icu/assets/plugins.json")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
items.value = data
|
||||
})
|
||||
.catch(error => console.error(error))
|
||||
|
||||
//追加
|
||||
fetch('https://registry.nonebot.dev/plugins.json')
|
||||
|
@ -1,6 +1,7 @@
|
||||
<script setup lang="ts">
|
||||
import {computed, ref} from 'vue'
|
||||
import ItemCard from './ResItemCard.vue'
|
||||
import * as url from "node:url";
|
||||
|
||||
// 从public/assets/resources.json加载插件
|
||||
let filteredItems = computed(() => {
|
||||
@ -16,7 +17,7 @@ let filteredItems = computed(() => {
|
||||
// 插件商店Nonebot
|
||||
let items = ref([])
|
||||
let search = ref('')
|
||||
fetch('/assets/resources.json')
|
||||
fetch("https://bot.liteyuki.icu/assets/resources.json")
|
||||
.then(response => response.json())
|
||||
.then(data => {
|
||||
items.value = data
|
||||
@ -28,10 +29,6 @@ fetch('/assets/resources.json')
|
||||
<template>
|
||||
<div>
|
||||
<h1>主题/资源商店</h1>
|
||||
<!-- <div class="market">-->
|
||||
<!--<!– 布局商品–>-->
|
||||
<!-- <ItemCard v-for="item in [...items].reverse()" :key="item.id" :item="item" />-->
|
||||
<!-- </div>-->
|
||||
<input class="item-search-box" type="text" placeholder="搜索资源" v-model="search" />
|
||||
<div class="market">
|
||||
<!-- 使用filteredItems来布局商品 -->
|
||||
|
@ -8,7 +8,7 @@ export default hopeTheme({
|
||||
|
||||
author: {
|
||||
name: "远野千束",
|
||||
url: "https://snowykami.me",
|
||||
url: "https://sfkm.me",
|
||||
},
|
||||
|
||||
iconAssets: "fontawesome-with-brands",
|
||||
|
Loading…
Reference in New Issue
Block a user