{"id":3194,"date":"2021-04-08T14:10:34","date_gmt":"2021-04-08T06:10:34","guid":{"rendered":"http:\/\/www.yuguoxy.com\/geekhome\/?p=3194"},"modified":"2026-08-18T12:35:34","modified_gmt":"2026-08-18T04:35:34","slug":"%e5%9f%ba%e4%ba%8ebetter-scroll%e5%ae%9e%e7%8e%b0%e7%a7%bb%e5%8a%a8%e7%ab%afvue%e4%b8%8a%e6%8b%89%e5%8a%a0%e8%bd%bd%e4%b8%8b%e6%8b%89%e5%88%b7%e6%96%b0","status":"publish","type":"post","link":"https:\/\/ai.zhousir.top\/?p=3194","title":{"rendered":"\u57fa\u4e8ebetter-scroll\u5b9e\u73b0\u79fb\u52a8\u7aefvue\u4e0a\u62c9\u52a0\u8f7d\u4e0b\u62c9\u5237\u65b0"},"content":{"rendered":"<section id=\"wenyan\" style=\"font-family: system-ui, 'Apple Color Emoji', 'Segoe UI', 'Segoe UI Symbol', 'Noto Sans', Roboto, sans-serif; line-height: 1.75; font-size: 16px; color: #000000; caret-color: #000000;\" data-provider=\"WenYan\">\n<p style=\"margin: 1em 0px;\">\u79fb\u52a8\u7aef\u5217\u8868\u8981\u505a\u4e0a\u62c9\u52a0\u8f7d\u3001\u4e0b\u62c9\u5237\u65b0\uff0c\u539f\u751f overflow \u5f80\u5f80\u4e0d\u591f\u7528\u3002<strong style=\"color: #4870ac;\">better-scroll<\/strong> \u4e13\u95e8\u89e3\u51b3\u6eda\u52a8\u573a\u666f\uff0c\u6838\u5fc3\u501f\u9274 <a href=\"https:\/\/link.jianshu.com?t=https%3A%2F%2Fgithub.com%2Fcubiq%2Fiscroll\">iscroll<\/a>\uff0cAPI \u57fa\u672c\u517c\u5bb9\uff0c\u53c8\u505a\u4e86\u6269\u5c55\u548c\u6027\u80fd\u4f18\u5316\u3002<\/p>\n<p style=\"margin: 1em 0px;\">\u5b83\u57fa\u4e8e\u539f\u751f JS\uff0c\u4e0d\u4f9d\u8d56\u6846\u67b6\u3002\u7f16\u8bd1\u540e 63kb\uff0c\u538b\u7f29 35kb\uff0cgzip \u7ea6 9kb\u3002\u4e0b\u9762\u7528 Vue \u63a5\u4e00\u5957\u4e0b\u62c9\u5237\u65b0 + \u4e0a\u62c9\u52a0\u8f7d\u3002\u8d44\u6599\uff1a<a href=\"https:\/\/link.jianshu.com?t=http%3A%2F%2Fustbhuangyi.github.io%2Fbetter-scroll%2Fdoc%2Fzh-hans%2Foptions-advanced.html\">\u63d2\u4ef6\u5730\u5740<\/a>\u3001<a href=\"https:\/\/link.jianshu.com?t=https%3A%2F%2Fwww.imooc.com%2Farticle%2F18232\">\u5f15\u7528\u6587\u7ae0<\/a>\u3002<\/p>\n<table style=\"display: table; text-align: left; overflow: auto; border-collapse: collapse; margin: 1.4em auto; max-width: 100%; table-layout: fixed; overflow-wrap: break-word; word-break: break-all;\" width=\"800\">\n<thead>\n<tr>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u80fd\u529b<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u600e\u4e48\u914d<\/th>\n<th style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top; text-align: center; font-weight: bold; color: #4870ac; background: #f7f7f7;\">\u6ce8\u610f<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u521d\u59cb\u5316<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">new BScroll(wrapper, options)<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5916\u5c42 overflow:hidden\uff0c\u5185\u5c42\u6bd4\u5916\u5c42\u9ad8<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4e0b\u62c9\u5237\u65b0<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">scroll \/ touchEnd\uff0cpos.y > 30<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u5237\u65b0\u540e scroll.refresh()<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u4e0a\u62c9\u52a0\u8f7d<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">pos.y < maxScrollY - 30<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">concat \u6570\u636e\u540e\u518d refresh<\/td>\n<\/tr>\n<tr>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u70b9\u51fb<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">click: true<\/td>\n<td style=\"border: 1px solid #d9dfe4; padding: 9px 12px; font-size: 0.75em; line-height: 22px; vertical-align: top;\">\u79fb\u52a8\u7aef\u9ed8\u8ba4\u53ef\u80fd\u5403\u6389 click<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e00\u3001\u4ec0\u4e48\u662f better-scroll<\/h2>\n<p style=\"margin: 1em 0px;\">\u91cd\u70b9\u89e3\u51b3\u79fb\u52a8\u7aef\uff08\u5df2\u652f\u6301 PC\uff09\u5404\u79cd\u6eda\u52a8\u9700\u6c42\u3002\u7ed3\u6784\u901a\u5e38\u662f\uff1a\u5916\u5c42 wrapper \u56fa\u5b9a\u9ad8\u5ea6\u5e76 hidden\uff0c\u5185\u5c42 content \u6491\u5f00\uff0c\u63d2\u4ef6\u76d1\u542c touch \u505a\u4f4d\u79fb\u3002<\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/image-20210408140234879.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3195\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/image-20210408140234879.png\" alt=\"image-20210408140234879\" width=\"359\" height=\"700\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/link.jianshu.com?t=https%3A%2F%2Fwww.imooc.com%2Farticle%2F18232\">better-scroll\u7684\u6eda\u52a8\u539f\u7406<\/a><\/p>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e8c\u3001\u5b89\u88c5\u4e0e\u5f15\u5165<\/h2>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">1. \u5b89\u88c5<\/h3>\n<p style=\"margin: 1em 0px;\">\u5148\u5728 package.json \u52a0\u5165\u4f9d\u8d56\uff0c\u518d\u7528 npm \u5b89\u88c5\uff1a<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">npm install better-scroll --save-dev<\/code><\/pre>\n<h3 style=\"padding: 0px; color: #4870ac; margin: 1.2em 0px 1em; font-size: 1.3em;\">2. \u5f15\u5165<\/h3>\n<p style=\"margin: 1em 0px;\">\u5728\u9700\u8981\u6eda\u52a8\u7684\u7ec4\u4ef6\u91cc\u5f15\u5165\u3002\u65b0\u7248\u672c\u8981\u7528 @better-scroll\/core\uff1a<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">import BScroll from 'better-scroll'\nimport BScroll from '@better-scroll\/core' \/\/ \u65b0\u7248\u672c\u9700\u8fd9\u6837\u5f15\u7528<\/code><\/pre>\n<h2 style=\"padding: 1px 12.5px; color: #ffffff; margin: 1.2em 0px 1em; border-radius: 4px; display: inline-block; background-color: #4870ac; font-size: 1.3em;\">\u4e09\u3001Vue \u4e0a\u62c9\u52a0\u8f7d\u3001\u4e0b\u62c9\u5237\u65b0<\/h2>\n<p style=\"margin: 1em 0px;\">\u6a21\u677f\uff1a\u5916\u5c42 wrapper \u6302 ref\uff0c\u5185\u5c42\u653e\u9876\u90e8\u63d0\u793a\u3001\u5217\u8868\u3001\u5e95\u90e8\u63d0\u793a\u3002\u5237\u65b0\u6210\u529f\u7528\u4e00\u4e2a alert \u5c42\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">&lt;template>\n    &lt;div class=\"tabbar\">\n        &lt;div class=\"wrapper\" ref=\"wrapper\">\n            &lt;div class=\"bscroll-container\">\n                &lt;!-- \u5237\u65b0\u63d0\u793a\u4fe1\u606f -->\n                &lt;div class=\"top-tip\">\n                    &lt;span class=\"refresh-hook\">{{pulldownMsg}}&lt;\/span>\n                &lt;\/div>\n                &lt;!-- \u5185\u5bb9\u5217\u8868 -->\n                &lt;ul class=\"content\">\n                    &lt;li v-for=\"item in data\">{{item}}&lt;\/li>\n                &lt;\/ul>\n                &lt;!-- \u5e95\u90e8\u63d0\u793a\u4fe1\u606f -->\n                &lt;div class=\"bottom-tip\">\n                    &lt;span class=\"loading-hook\">{{pullupMsg}}&lt;\/span>\n                &lt;\/div>\n            &lt;\/div>\n        &lt;\/div>\n\n        &lt;!-- alert\u63d0\u793a\u5237\u65b0\u6210\u529f -->\n        &lt;div class=\"alert-hook\" :style=\"{display: alertHook}\">\u5237\u65b0\u6210\u529f&lt;\/div>\n    &lt;\/div>\n&lt;\/template><\/code><\/pre>\n<p style=\"margin: 1em 0px;\"><code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">$nextTick<\/code> \u91cc new BScroll\u3002<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">probeType: 1<\/code> \u4f1a\u622a\u6d41\u6d3e\u53d1 scroll\uff1b2 \u5b9e\u65f6\u6d3e\u53d1\uff1b3 \u5728 swipe \u65f6\u4ecd\u5b9e\u65f6\u6d3e\u53d1\u3002<code style=\"font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; color: #4870ac; font-size: 0.9em; font-weight: normal; overflow-wrap: break-word; padding: 2px 4px; border-radius: 3px; margin: 2px; background-color: #f6f8fa; word-break: break-all;\">click: true<\/code> \u624d\u4f1a\u6d3e\u53d1\u70b9\u51fb\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">&lt;script>\nimport BScroll from \"better-scroll\"\nconst count = 1\n    export default {\n        data(){\n            return {\n                data: [0,1,2,3,4,5,6],\n                pulldownMsg: '\u4e0b\u62c9\u5237\u65b0',\n                pullupMsg: '\u52a0\u8f7d\u66f4\u591a',\n                alertHook: 'none'\n            }\n        },\n        methods: {\n            getData() {\n                return new Promise(resolve => {  \/\/\u6a21\u62df\u6570\u636e\u8bf7\u6c42\n                    setTimeout(() => {\n                        const arr = [];\n                        for (let i = 0; i &lt; 20; i++) {\n                            arr.push(count++)\n                        }\n                        resolve(arr)\n                    }, 1000)\n                })\n            },\n            refreshalert(){   \/\/\u5237\u65b0\u6210\u529f\u63d0\u793a\n                this.alertHook = 'block';\n                setTimeout(()=>{\n                    this.alertHook = 'none'\n                },1000)\n            }\n        },\n        created(){\n            const that = this;\n            this.$nextTick(() => {\n                    this.scroll = new BScroll(this.$refs.wrapper,{       \/\/\u521d\u59cb\u5316better-scroll\n                        probeType:1,   \/\/1 \u6eda\u52a8\u7684\u65f6\u5019\u4f1a\u6d3e\u53d1scroll\u4e8b\u4ef6\uff0c\u4f1a\u622a\u6d41\u30022\u6eda\u52a8\u7684\u65f6\u5019\u5b9e\u65f6\u6d3e\u53d1scroll\u4e8b\u4ef6\uff0c\u4e0d\u4f1a\u622a\u6d41\u3002 3\u9664\u4e86\u5b9e\u65f6\u6d3e\u53d1scroll\u4e8b\u4ef6\uff0c\u5728swipe\u7684\u60c5\u51b5\u4e0b\u4ecd\u7136\u80fd\u5b9e\u65f6\u6d3e\u53d1scroll\u4e8b\u4ef6\n                        click: true   \/\/\u662f\u5426\u6d3e\u53d1click\u4e8b\u4ef6\n                    })\n                    \/\/ \u6ed1\u52a8\u8fc7\u7a0b\u4e2d\u4e8b\u4ef6\n                    this.scroll.on('scroll',(pos)=>{\n                        if(pos.y > 30){\n                            this.pulldownMsg = '\u91ca\u653e\u7acb\u5373\u5237\u65b0'\n                        }\n                    });\n                    \/\/\u6ed1\u52a8\u7ed3\u675f\u677e\u5f00\u4e8b\u4ef6\n                    this.scroll.on('touchEnd',(pos) =>{  \/\/\u4e0a\u62c9\u5237\u65b0\n                        if(pos.y > 30){\n                            setTimeout(()=>{\n                                that.getData().then((res)=>{\n                                    \/\/\u5237\u65b0\u6570\u636e\n                                    that.data = res;\n                                    \/\/\u6062\u590d\u5237\u65b0\u63d0\u793a\u6587\u672c\u503c\n                                    that.pulldownMsg = '\u4e0b\u62c9\u5237\u65b0'\n                                    \/\/\u5237\u65b0\u6210\u529f\u540e\u63d0\u793a\n                                    that.refreshalert();\n                                    \/\/\u5237\u65b0\u5217\u8868\u540e\uff0c\u91cd\u65b0\u8ba1\u7b97\u6eda\u52a8\u533a\u57df\u9ad8\u5ea6\n                                    that.scroll.refresh();\n                                })\n                            },2000)\n                        }\n                        else if(pos.y&lt;(this.scroll.maxScrollY - 30)){   \/\/\u4e0b\u62c9\u52a0\u8f7d\n                            this.pullupMsg = '\u52a0\u8f7d\u4e2d\u3002\u3002\u3002';\n                            setTimeout(()=>{\n                                that.getData().then((res)=>{\n                                    \/\/\u6062\u590d\u6587\u672c\u503c\n                                    that.pullupMsg = '\u52a0\u8f7d\u66f4\u591a';\n                                    that.data = this.data.concat(res);\n                                    that.scroll.refresh();\n                                })\n                            },2000)\n\n                        }\n                    })\n            })\n        }\n    }\n&lt;\/script><\/code><\/pre>\n<p style=\"margin: 1em 0px;\">\u6837\u5f0f\u8981\u70b9\uff1awrapper \u56fa\u5b9a\u9ad8\u5ea6\u5e76 overflow:hidden\uff1b\u9876\/\u5e95\u63d0\u793a\u7528\u7edd\u5bf9\u5b9a\u4f4d\u63a2\u51fa\u53ef\u89c6\u533a\u3002<\/p>\n<pre style=\"overflow: auto hidden; word-break: normal; white-space: pre; tab-size: 2; border-radius: 5px; line-height: 2; margin: 1em 0.5em; padding: 0.5em; box-shadow: rgba(0, 0, 0, 0.55) 0px 1px 5px; font-size: 12px; background: #002b36; max-width: 100%; overflow-wrap: normal;\"><code class=\"hljs\" style=\"word-break: normal; white-space: nowrap; tab-size: 2; font-size: 12px; font-family: Menlo, Monaco, Consolas, 'Liberation Mono', 'Roboto Mono', 'Courier New', 'Microsoft YaHei', monospace; display: block; overflow-x: auto; margin: 0.5em; padding: 3px 5px; color: #93a1a1; background: #002b36; overflow-wrap: normal;\">\/\/css\n    .wrapper{\n        width: 100%;\n        height: 300px;\n        background: #ccc;\n        overflow: hidden;\n        position: relative;\n    }\n\n    li{\n        line-height: 50px;\n        border-bottom: 1px solid #ccc;\n        text-align: center;\n    }\n\n    \/* \u4e0b\u62c9\u3001\u4e0a\u62c9\u63d0\u793a\u4fe1\u606f *\/\n    .top-tip{\n        position: absolute;\n        top: -40px;\n        left: 0;\n        z-index: 1;\n        width: 100%;\n        height:40px;\n        line-height:40px;\n        text-align:center;\n        color: #555;\n    }\n\n    .bottom-tip{\n        width: 100%;\n        height: 35px;\n        line-height: 35px;\n        text-align: center;\n        color: #777;\n        background: #f2f2f2;\n        position: absolute;\n        bottom: -35px;\n        left: 0;\n    }\n\n\n    \/* \u5168\u5c40\u63d0\u793a\u4fe1\u606f *\/\n    .alert-hook{\n        display: none;\n        position: fixed;\n        top: 62px;\n        left: 0;\n        z-index: 2;\n        width: 100%;\n        height: 35px;\n        line-height: 35px;\n        text-align: center;\n        color: #fff;\n        font-size: 12px;\n        background: rgba(7, 17, 27, 0.5);\n    }<\/code><\/pre>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/github.com\/wdlhao\/iScroll\">\u53c2\u8003 iScroll<\/a><\/p>\n<p><a href=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/image-20210408140403708.png\" rel=\"fancybox\"><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-full wp-image-3196\" src=\"https:\/\/ai.zhousir.top\/wp-content\/uploads\/2021\/04\/image-20210408140403708.png\" alt=\"image-20210408140403708\" width=\"415\" height=\"728\" \/><\/a><\/p>\n<p style=\"margin: 1em 0px;\"><a href=\"https:\/\/mp.weixin.qq.com\/s?__biz=MzU1OTgxNDQ1Nw==&amp;mid=2247486525&amp;idx=2&amp;sn=877ab0adefd18c65fed121ce4acfbd30&amp;chksm=fc10ce6bcb67477d37a590dca370c7baa9c083642e1eabc6578491af0a55d7056600341e9c15&amp;scene=178&amp;cur_album_id=1570278129275830277#rd\">\u53c2\u8003-\u5b9e\u73b0\u539f\u7406\u5206\u6790<\/a><\/p>\n<blockquote style=\"display: block; font-size: 0.9em; border-left: 3px solid #4870ac; padding: 0.5em 1em; margin: 0px; background: #f6f8fa; color: #40464f;\">\n<p style=\"margin: 1em 0px;\"><strong style=\"color: #4870ac;\">\u4e00\u53e5\u8bdd\u603b\u7ed3\uff1abetter-scroll \u8981\u6c42\u300c\u5916\u5c42\u88c1\u526a\u3001\u5185\u5c42\u6491\u5f00\u300d\uff1b\u4e0b\u62c9\u770b pos.y\uff0c\u4e0a\u62c9\u770b maxScrollY\uff0c\u6570\u636e\u53d8\u4e86\u52a1\u5fc5 refresh() \u91cd\u7b97\u9ad8\u5ea6\u3002<\/strong><\/p>\n<\/blockquote>\n<\/section>\n","protected":false},"excerpt":{"rendered":"<p>\u79fb\u52a8\u7aef\u5217\u8868\u8981\u505a\u4e0a\u62c9\u52a0\u8f7d\u3001\u4e0b\u62c9\u5237\u65b0\uff0c\u539f\u751f overflow \u5f80\u5f80\u4e0d\u591f\u7528\u3002better-scroll \u4e13\u95e8\u89e3\u51b3\u6eda\u52a8 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[106,105],"tags":[205,155],"_links":{"self":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3194"}],"collection":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3194"}],"version-history":[{"count":3,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3194\/revisions"}],"predecessor-version":[{"id":3213,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=\/wp\/v2\/posts\/3194\/revisions\/3213"}],"wp:attachment":[{"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ai.zhousir.top\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}