Skip to content
No description, website, or topics provided.
JavaScript CSS HTML
Branch: master
Clone or download

Latest commit

Latest commit 7781dab Apr 2, 2020

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Fix categories not wrap Apr 2, 2020
public Fix #3 Oct 11, 2019
src Fix categories not wrap Apr 2, 2020
webpack Release 1.8.0 Apr 2, 2020
.babelrc Release 1.8.0 Apr 2, 2020
.editorconfig Initial commit Jul 23, 2019
.eslintignore Initial commit Jul 23, 2019
.eslintrc.js Release 1.8.0 Apr 2, 2020
.gitignore Migration from `node-sass` to `dart-sass` Nov 4, 2019
.postcssrc.js Initial commit Jul 23, 2019
LICENSE Initial commit Jul 23, 2019
README.md Update README.md Apr 2, 2020
package.json Fix categories not wrap Apr 2, 2020
yarn.lock Release 1.7.0 Apr 1, 2020

README.md

豆瓣看过的电影

使用

1. 设置 HTML 头部

<head>
  <meta name="referrer" content="same-origin">
</head>

2. 引入资源

<head>
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/iMuFeng/bmdb@1.8.0/dist/Bmdb.min.css">
  <script src="https://cdn.jsdelivr.net/npm/jquery@latest/dist/jquery.min.js"></script>
  <script src="https://cdn.jsdelivr.net/gh/iMuFeng/bmdb@1.8.0/dist/Bmdb.min.js" />
</head>

3. 初始化参数

参数名 必选 类型 默认值 说明
type string movies moviesbooks
selector string 外层选择器
secret string API 密钥
skeletonNum number 5 骨架屏数量
showCategories boolean false 是否显示分类列表,仅 movies 有效
categoryFilters string[] [] 展示的分类名称,默认展示所有分类
showStarred boolean true 是否展示推荐列表
noMoreText string 所有数据加载完成提示语
cache boolean true 是否缓存第一页数据
darkMode boolean true 是否兼容深色模式
limit number 30 每页条数
<script>
new Bmdb({
  type: 'movies',
  selector: '.container',
  secret: '7bf4205a0a62d00409f3cd70b0736e1a11a9a6a60f7231567f056819787b8096',
  noMoreText: '没有更多数据了',
  limit: 30
})
</script>
You can’t perform that action at this time.