Skip to content

Commit

Permalink
chore: 列表卡片的字段类型随意
Browse files Browse the repository at this point in the history
  • Loading branch information
heikaimu committed Aug 21, 2024
1 parent af14273 commit 546a772
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 36 deletions.
27 changes: 0 additions & 27 deletions example/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
* @LastEditors: Yaowen Liu
* @LastEditTime: 2023-09-21 09:23:25
*/
// import type { ViewCard } from '../lib/types/waterfall'

/**
* 获取随机ID
Expand Down Expand Up @@ -57,32 +56,6 @@ function randomColor() {
return COLORS[getRandomNum(0, 4)]
}

// function randomName() {
// return NAMES[getRandomNum(0, 25)]
// }

// let start = 100
// export function getList(pageSize = 10) {
// const end = start + pageSize
// const list: ViewCard[] = []
// for (let i = start; i <= end; i++) {
// const successURL = `https://api.mz-moe.cn/img/img${i}.jpg`
// // const successURL = `https://images.weserv.nl/?url=https://api.mz-moe.cn/img/img${i}.jpg?timestamp=${Date.now()}`
// const errorURL = 'https://api.mz-moe.cn/img/img00000.jpg'
// list.push({
// id: randomID(),
// star: false,
// src: {
// original: Math.random() < 0.95 ? successURL : errorURL,
// },
// backgroundColor: randomColor(),
// name: randomName(),
// })
// }
// start = end + 1
// return list
// }

const website = 'https://wanderprints.com'
// const website = 'https://www.getphotoblanket.com';

Expand Down
9 changes: 1 addition & 8 deletions lib/types/waterfall.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,7 @@
* @LastEditors: Yaowen Liu
* @LastEditTime: 2022-03-23 14:44:20
*/
export interface ViewCard {
src: any
id?: string
name?: string
star?: boolean
backgroundColor?: string
[attr: string]: any
}
export type ViewCard = Record<string, any>

interface Point {
rowPerView: number
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vue-waterfall-plugin-next",
"version": "2.5.1",
"version": "2.5.3",
"license": "UNLICENSED",
"author": "Yaowen Liu <[email protected]>",
"main": "dist/my-lib.umd.js",
Expand Down

0 comments on commit 546a772

Please sign in to comment.