mirror of
https://github.com/Powerful-517/yys-editor.git
synced 2025-05-19 08:35:25 +00:00
Merge branch 'develop' into feature/yysrank
This commit is contained in:
commit
13db9c4e7b
@ -5,6 +5,15 @@
|
|||||||
<link rel="icon" href="/favicon.ico">
|
<link rel="icon" href="/favicon.ico">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<title>yys-editor</title>
|
<title>yys-editor</title>
|
||||||
|
<script>
|
||||||
|
var _hmt = _hmt || [];
|
||||||
|
(function () {
|
||||||
|
var hm = document.createElement("script");
|
||||||
|
hm.src = "https://hm.baidu.com/hm.js?8d59439a417b1eb4bc99d62ddca7e072";
|
||||||
|
var s = document.getElementsByTagName("script")[0];
|
||||||
|
s.parentNode.insertBefore(hm, s);
|
||||||
|
})();
|
||||||
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="app"></div>
|
<div id="app"></div>
|
||||||
|
BIN
public/assets/Shikigami/ssr/583.png
Normal file
BIN
public/assets/Shikigami/ssr/583.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 22 KiB |
@ -28,13 +28,14 @@
|
|||||||
>
|
>
|
||||||
<div style="max-height: 600px; overflow-y: auto;">
|
<div style="max-height: 600px; overflow-y: auto;">
|
||||||
<el-space wrap size="large">
|
<el-space wrap size="large">
|
||||||
<div v-for="i in filterShikigamiByRarityAndSearch(rarity.name,searchText)" :key="i.name">
|
<div style="display: flex;flex-direction: column;justify-content: center" v-for="i in filterShikigamiByRarityAndSearch(rarity.name,searchText)" :key="i.name">
|
||||||
<el-button
|
<el-button
|
||||||
style="width: 100px; height: 100px;"
|
style="width: 100px; height: 100px;"
|
||||||
@click.stop="confirm(i)"
|
@click.stop="confirm(i)"
|
||||||
>
|
>
|
||||||
<img :src="i.avatar" style="width: 99px; height: 99px;">
|
<img :src="i.avatar" style="width: 99px; height: 99px;">
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<span style="text-align: center; display: block;">{{i.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
|
@ -4,14 +4,22 @@
|
|||||||
<span>当前选择:{{ current.name }}</span>
|
<span>当前选择:{{ current.name }}</span>
|
||||||
<el-button type="danger" icon="Delete" round @click="remove()"></el-button>
|
<el-button type="danger" icon="Delete" round @click="remove()"></el-button>
|
||||||
</div>
|
</div>
|
||||||
|
<div style="display: flex; align-items: center;">
|
||||||
|
<el-input
|
||||||
|
placeholder="请输入内容"
|
||||||
|
v-model="searchText"
|
||||||
|
style="width: 200px; margin-right: 10px;"
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleTabClick">
|
<el-tabs v-model="activeName" type="card" class="demo-tabs" @tab-click="handleTabClick">
|
||||||
<el-tab-pane v-for="type in yuhunTypes" :key="type.name" :label="type.label" :name="type.name">
|
<el-tab-pane v-for="type in yuhunTypes" :key="type.name" :label="type.label" :name="type.name">
|
||||||
<div style="max-height: 500px; overflow-y: auto;">
|
<div style="max-height: 500px; overflow-y: auto;">
|
||||||
<el-space wrap size="large" style="">
|
<el-space wrap size="large" style="">
|
||||||
<div v-for="yuhun in filterYuhunByType(activeName)" :key="yuhun.name">
|
<div v-for="yuhun in filterYuhunByTypeAndSearch(activeName,searchText)" :key="yuhun.name">
|
||||||
<el-button style="width: 100px; height: 100px;" @click="confirm(yuhun)">
|
<el-button style="width: 100px; height: 100px;" @click="confirm(yuhun)">
|
||||||
<img :src="yuhun.avatar" style="width: 99px; height: 99px;">
|
<img :src="yuhun.avatar" style="width: 99px; height: 99px;">
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<span style="text-align: center; display: block;">{{yuhun.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
</el-space>
|
</el-space>
|
||||||
</div>
|
</div>
|
||||||
@ -20,7 +28,7 @@
|
|||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup>
|
<script setup lang="ts">
|
||||||
import {ref, watch, computed} from 'vue';
|
import {ref, watch, computed} from 'vue';
|
||||||
import shikigamiData from '../data/Shikigami.json';
|
import shikigamiData from '../data/Shikigami.json';
|
||||||
import yuhunData from '../data/Yuhun.json';
|
import yuhunData from '../data/Yuhun.json';
|
||||||
@ -39,6 +47,7 @@ const props = defineProps({
|
|||||||
|
|
||||||
const emit = defineEmits(['updateYuhunSelect', 'closeYuhunSelect']);
|
const emit = defineEmits(['updateYuhunSelect', 'closeYuhunSelect']);
|
||||||
|
|
||||||
|
const searchText = ref('') // 新增搜索文本
|
||||||
const show = ref(false);
|
const show = ref(false);
|
||||||
const activeName = ref('ALL');
|
const activeName = ref('ALL');
|
||||||
const current = ref(props.currentShikigami);
|
const current = ref(props.currentShikigami);
|
||||||
@ -66,9 +75,24 @@ const handleTabClick = (tab) => {
|
|||||||
console.log(tab.paneName);
|
console.log(tab.paneName);
|
||||||
};
|
};
|
||||||
|
|
||||||
const filterYuhunByType = (type) => {
|
const filterYuhunByTypeAndSearch = (type: string, search: string) => {
|
||||||
if (type.toLowerCase() === 'all') return yuhunData;
|
let filteredList = yuhunData;
|
||||||
return yuhunData.filter(yuhun => yuhun.type.toLowerCase() === type.toLowerCase());
|
|
||||||
|
// 按类型过滤
|
||||||
|
if (type.toLowerCase() !== 'all') {
|
||||||
|
filteredList = filteredList.filter(item =>
|
||||||
|
item.type.toLowerCase() === type.toLowerCase()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 按搜索关键字过滤
|
||||||
|
if (search.trim() !== '') {
|
||||||
|
filteredList = filteredList.filter(item =>
|
||||||
|
item.name.toLowerCase().includes(search.toLowerCase())
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
return filteredList;
|
||||||
};
|
};
|
||||||
|
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
@ -77,6 +101,8 @@ const cancel = () => {
|
|||||||
|
|
||||||
const confirm = (item) => {
|
const confirm = (item) => {
|
||||||
emit('updateYuhunSelect', JSON.parse(JSON.stringify(item)), 'Update');
|
emit('updateYuhunSelect', JSON.parse(JSON.stringify(item)), 'Update');
|
||||||
|
searchText.value=''
|
||||||
|
activeName.value = 'ALL'
|
||||||
};
|
};
|
||||||
|
|
||||||
const remove = () => {
|
const remove = () => {
|
||||||
|
@ -1,4 +1,9 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"avatar": "/assets/Shikigami/ssr/583.png",
|
||||||
|
"name": "卑弥呼",
|
||||||
|
"rarity": "SSR"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"avatar": "/assets/Shikigami/l/582.png",
|
"avatar": "/assets/Shikigami/l/582.png",
|
||||||
"name": "巡音流歌",
|
"name": "巡音流歌",
|
||||||
|
@ -1,4 +1,12 @@
|
|||||||
[
|
[
|
||||||
|
{
|
||||||
|
"version": "2.3.0",
|
||||||
|
"date": "2025-03-31",
|
||||||
|
"changes": [
|
||||||
|
"支持御魂搜索",
|
||||||
|
"显示式神和御魂名称"
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"version": "2.2.0",
|
"version": "2.2.0",
|
||||||
"date": "2025-03-21",
|
"date": "2025-03-21",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user