diff --git a/components/moveButton/moveButton.js b/components/moveButton/moveButton.js new file mode 100644 index 0000000..977b921 --- /dev/null +++ b/components/moveButton/moveButton.js @@ -0,0 +1,47 @@ +Component({ + data: { + }, + properties: { + areaTop: { + type: Number, + value: 0 + }, + areaLeft: { + type: Number, + value: 0 + }, + areaWidth: { + type: String, + value: '100%' + }, + areaHeight: { + type: String, + value: '100%' + }, + buttonWidth: { + type: Number, + value: 178 + }, + buttonHeight: { + type: Number, + value: 178 + }, + buttonTop: { + type: Number, + value: 1000 + }, + buttonLeft: { + type: Number, + value: 560 + }, + imgUrl: { + type: String, + value: '' + } + }, + methods: { + onClickButton () { + this.triggerEvent('movebtnCallBack') + } + } +}) \ No newline at end of file diff --git a/components/moveButton/moveButton.json b/components/moveButton/moveButton.json new file mode 100644 index 0000000..32640e0 --- /dev/null +++ b/components/moveButton/moveButton.json @@ -0,0 +1,3 @@ +{ + "component": true +} \ No newline at end of file diff --git a/components/moveButton/moveButton.wxml b/components/moveButton/moveButton.wxml new file mode 100644 index 0000000..10c5065 --- /dev/null +++ b/components/moveButton/moveButton.wxml @@ -0,0 +1,8 @@ + + + + + + + \ No newline at end of file diff --git a/components/moveButton/moveButton.wxss b/components/moveButton/moveButton.wxss new file mode 100644 index 0000000..6e4fbdc --- /dev/null +++ b/components/moveButton/moveButton.wxss @@ -0,0 +1,34 @@ + +/* 悬浮按钮 -start- */ +.movable-area{ + pointer-events:none; + z-index: 999; + width: 100%; + height: 90%; + position: fixed; + top: 60px; + left: 0; + right: 0; + bottom: 0; +} +.movable-view{ + pointer-events:auto; + width: 178rpx; + height: 178rpx; + transform: translateX(560rpx) translateY(680rpx) translateZ(0rpx) scale(1); + transform-origin: center center; + will-change: auto; + position: absolute; + top: 1100rpx; + left: 560rpx; +} +.img-box { + width: 100%; + height: 100%; +} +.img-box image { + width: 100%; + height: 100%; + object-fit: cover; +} +/* 悬浮按钮 -end- */ \ No newline at end of file diff --git a/pages/discussion/discussion.json b/pages/discussion/discussion.json index e9b6c57..03000d2 100644 --- a/pages/discussion/discussion.json +++ b/pages/discussion/discussion.json @@ -4,6 +4,7 @@ "issue-list": "./components/issueList/issueList", "project-list": "./components/projectList/projectList", "pulldown-refresh": "../../components/pullDownRefresh/pullDownRefresh", - "completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog" + "completeInfo-dialog": "../../components/completeInfoDialog/completeInfoDialog", + "move-btn": "/components/moveButton/moveButton" } } \ No newline at end of file diff --git a/pages/discussion/discussion.wxml b/pages/discussion/discussion.wxml index 2eaa322..4c351b5 100644 --- a/pages/discussion/discussion.wxml +++ b/pages/discussion/discussion.wxml @@ -24,13 +24,9 @@ - - - - - - - +