1
npm i @miniprogram-component-plus/sticky --save
2
开发者工具构建 npm,勾选“使用 npm 模块”
3 刷新开发者工具,报错出现
VM60603:1 thirdScriptError
Behaviors should be constructed with Behavior()
Error: Behaviors should be constructed with Behavior()
at H (http://127.0.0.1:18239/appservice/__dev__/WAService.js:2:1568153)
at Ie (http://127.0.0.1:18239/appservice/__dev__/WAService.js:2:1570862)
at Module.t (http://127.0.0.1:18239/appservice/__dev__/WAService.js:2:1581757)
at _t (http://127.0.0.1:18239/appservice/__dev__/WAService.js:2:1693707)
at Object.Vt [as originalComponent] (http://127.0.0.1:18239/appservice/__dev__/WAService.js:2:1711764)
at Object.GrowingComponent (http://127.0.0.1:18239/appservice/utils/index.js:643:31)
at Component (http://127.0.0.1:18239/appservice/utils/index.js:670:33)
at c (http://127.0.0.1:18239/appservice/miniprogrampatch.js:272:119)
at highjackedFn (http://127.0.0.1:18239/appservice/miniprogram_npm/minax/index.js:235:11)
at Object._ (http://127.0.0.1:18239/appservice/miniprogram_npm/@miniprogram-component-plus/sticky/index.js:121:9)
先使用position:sticky吧。
同样步骤 使用 select-text 组件没有报错。