mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-05 19:41:42 +08:00
feat(Lazyload): support Vue 3
This commit is contained in:
parent
5d8b7bd7fb
commit
d3ca404f98
1
.gitignore
vendored
1
.gitignore
vendored
@ -10,6 +10,7 @@ package-lock.json
|
||||
|
||||
# dist file
|
||||
es
|
||||
esm
|
||||
lib
|
||||
dist
|
||||
/site
|
||||
|
@ -59,8 +59,9 @@
|
||||
"dependencies": {
|
||||
"@babel/runtime": "7.x",
|
||||
"@vant/icons": "1.4.0",
|
||||
"@vant/use": "^0.1.0",
|
||||
"@vant/lazyload": "^1.0.0",
|
||||
"@vant/popperjs": "^1.0.0",
|
||||
"@vant/use": "^0.1.0",
|
||||
"vue-lazyload": "1.2.3"
|
||||
},
|
||||
"peerDependencies": {
|
||||
|
@ -1,6 +1,6 @@
|
||||
# @vant/lazyload
|
||||
|
||||
This is a of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
This is a fork of [vue-lazyload](https://github.com/hilongjw/vue-lazyload) with Vue 3 support.
|
||||
|
||||
## Install
|
||||
|
||||
|
@ -3,22 +3,29 @@
|
||||
"version": "1.0.0",
|
||||
"description": "",
|
||||
"main": "lib/index.js",
|
||||
"module": "esm/index.js",
|
||||
"types": "lib/index.d.ts",
|
||||
"publishConfig": {
|
||||
"access": "public",
|
||||
"registry": "https://registry.npmjs.org/"
|
||||
},
|
||||
"files": [
|
||||
"es",
|
||||
"lib",
|
||||
"types"
|
||||
],
|
||||
"scripts": {
|
||||
"dev": "rollup --config rollup.config.js --watch",
|
||||
"build": "rollup --config rollup.config.js && tsc -p ./tsconfig.json --emitDeclarationOnly"
|
||||
"dev": "babel src --out-dir esm --watch",
|
||||
"build": "babel src --out-dir esm && BABEL_MODULE=commonjs babel src --out-dir lib",
|
||||
"release": "npm run build && release-it"
|
||||
},
|
||||
"license": "MIT",
|
||||
"repository": "https://github.com/youzan/vant/tree/dev/packages/vant-lazyload",
|
||||
"devDependencies": {
|
||||
"@babel/cli": "^7.12.8",
|
||||
"@babel/core": "^7.12.9",
|
||||
"@babel/runtime": "7.x",
|
||||
"@rollup/plugin-babel": "^5.2.1",
|
||||
"@rollup/plugin-node-resolve": "^10.0.0",
|
||||
"rollup": "^2.33.3",
|
||||
"release-it": "^14.2.2",
|
||||
"vue": "^3.0.0"
|
||||
},
|
||||
"browserslist": [
|
||||
|
@ -1,13 +0,0 @@
|
||||
import path from 'path';
|
||||
import babel from '@rollup/plugin-babel';
|
||||
import nodeResolve from '@rollup/plugin-node-resolve';
|
||||
|
||||
export default {
|
||||
input: path.join(__dirname, 'src', 'index.js'),
|
||||
output: {
|
||||
dir: 'lib',
|
||||
format: 'cjs',
|
||||
},
|
||||
external: ['vue'],
|
||||
plugins: [nodeResolve(), babel({ babelHelpers: 'runtime' })],
|
||||
};
|
File diff suppressed because it is too large
Load Diff
@ -1,3 +1,3 @@
|
||||
// import Lazyload from 'vue-lazyload';
|
||||
// TODO
|
||||
export default {};
|
||||
import { Lazyload } from '@vant/lazyload';
|
||||
|
||||
export default Lazyload;
|
||||
|
@ -274,10 +274,10 @@ module.exports = {
|
||||
path: 'image-preview',
|
||||
title: 'ImagePreview 图片预览',
|
||||
},
|
||||
// {
|
||||
// path: 'lazyload',
|
||||
// title: 'Lazyload 懒加载',
|
||||
// },
|
||||
{
|
||||
path: 'lazyload',
|
||||
title: 'Lazyload 懒加载',
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
title: 'List 列表',
|
||||
@ -624,10 +624,10 @@ module.exports = {
|
||||
path: 'image-preview',
|
||||
title: 'ImagePreview',
|
||||
},
|
||||
// {
|
||||
// path: 'lazyload',
|
||||
// title: 'Lazyload',
|
||||
// },
|
||||
{
|
||||
path: 'lazyload',
|
||||
title: 'Lazyload',
|
||||
},
|
||||
{
|
||||
path: 'list',
|
||||
title: 'List',
|
||||
|
@ -1801,6 +1801,11 @@
|
||||
resolved "https://registry.npm.taobao.org/@vant/icons/download/@vant/icons-1.4.0.tgz#a91f7894f2f34356f78a5d6f8b9d4f1a46add0c5"
|
||||
integrity sha1-qR94lPLzQ1b3il1vi51PGkat0MU=
|
||||
|
||||
"@vant/lazyload@^1.0.0":
|
||||
version "1.0.0"
|
||||
resolved "https://registry.npm.taobao.org/@vant/lazyload/download/@vant/lazyload-1.0.0.tgz?cache=0&sync_timestamp=1606738038177&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40vant%2Flazyload%2Fdownload%2F%40vant%2Flazyload-1.0.0.tgz#781317ef81616df045b1061188518fe5013b7d1c"
|
||||
integrity sha1-eBMX74FhbfBFsQYRiFGP5QE7fRw=
|
||||
|
||||
"@vant/markdown-loader@^3.0.1":
|
||||
version "3.0.1"
|
||||
resolved "https://registry.npm.taobao.org/@vant/markdown-loader/download/@vant/markdown-loader-3.0.1.tgz#add005ce58b6f62c3567df168d42a502731fdecb"
|
||||
|
Loading…
x
Reference in New Issue
Block a user