diff --git a/components/diy_floatingBox/diy_floatingBox.js b/components/diy_floatingBox/diy_floatingBox.js new file mode 100644 index 0000000..6421755 --- /dev/null +++ b/components/diy_floatingBox/diy_floatingBox.js @@ -0,0 +1,39 @@ +// components/div_floatingBox/div_floatingBox.js +Component({ + /** + * 组件的属性列表 + */ + properties: { + farr:{ + type: Object, + value:null + }, + loaction_index: { + type: Number, + value: 0, + }, + is_show_top: { + type: Number, + value: 0, + }, + }, + + /** + * 组件的初始数据 + */ + data: { + + }, + + /** + * 组件的方法列表 + */ + methods: { + scrollfn(){ + wx.pageScrollTo({ + scrollTop: 0, + duration: 300 + }) + } + } +}) diff --git a/components/diy_floatingBox/diy_floatingBox.json b/components/diy_floatingBox/diy_floatingBox.json new file mode 100644 index 0000000..ea38f59 --- /dev/null +++ b/components/diy_floatingBox/diy_floatingBox.json @@ -0,0 +1,8 @@ +{ + "component": true, + "usingComponents": { + "floatingWindow": "/components/diy_floatingWindow/diy_floatingWindow", + "scan": "/components/diy_scan/diy_scan", + "service": "/components/diy_service/diy_service" + } +} \ No newline at end of file diff --git a/components/diy_floatingBox/diy_floatingBox.wxml b/components/diy_floatingBox/diy_floatingBox.wxml new file mode 100644 index 0000000..4dd9a2a --- /dev/null +++ b/components/diy_floatingBox/diy_floatingBox.wxml @@ -0,0 +1,24 @@ + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/components/diy_floatingBox/diy_floatingBox.wxss b/components/diy_floatingBox/diy_floatingBox.wxss new file mode 100644 index 0000000..ef59390 --- /dev/null +++ b/components/diy_floatingBox/diy_floatingBox.wxss @@ -0,0 +1,29 @@ +/* components/div_floatingBox/div_floatingBox.wxss */ + +.floatingBox { + /* width: 100rpx; */ + height: 750rpx; + position: fixed; + /* top:0; */ + bottom: 300rpx; + /* margin: auto; */ + /* background-color: red; */ + display: flex; + align-items: center; + flex-direction: column; + justify-content: flex-end; + /* justify-content: space-around; */ +} + +.backTop { + width: 80rpx; + height: 80rpx; + border-radius: 50%; + z-index: 100; + background-color: #fff; + border: 1px solid #adadad; + box-shadow: 0 0 10px 2px #adadad; + display: flex; + align-items: center; + justify-content: center; +} \ No newline at end of file