Browse Source

修改bug

master
岳鹏龙 9 months ago
parent
commit
4a77ff72ad
  1. 19
      src/components/zh-scroll/zh-scroll.vue
  2. 56
      src/pages/index/index.vue
  3. 5
      src/pages/index/shoppage/financialAssistance.vue
  4. 83
      src/pages/index/shoppage/interactiveZone.vue
  5. 5
      src/pages/index/shoppage/mediaHelp.vue
  6. 10
      src/pages/index/shoppage/shopHelp.vue
  7. 12
      src/pages/index/specialSubject.vue
  8. BIN
      src/static/img/xzs.png
  9. 12
      src/uni_modules/liu-drag-button/changelog.md
  10. 143
      src/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue
  11. 6
      src/uni_modules/liu-drag-button/license.md
  12. 85
      src/uni_modules/liu-drag-button/package.json
  13. 36
      src/uni_modules/liu-drag-button/readme.md

19
src/components/zh-scroll/zh-scroll.vue

@ -23,13 +23,13 @@
</view> </view>
<view class="items"> <view class="items">
<!-- 商品 begin --> <!-- 商品 begin -->
<view class="good" v-for="(good, key) in item.children" :key="key" @click="goxdbdetail(good.id)"> <view class="good" v-for="(good, key) in item.list" :key="key" @click="goxdbdetail(good.id)">
<slot name="custom" :data="good"> <slot name="custom" :data="good">
<!-- <image :src="good.images" class="image"></image> --> <!-- <image :src="good.images" class="image"></image> -->
<view class="title"> <!-- <view class="title"> -->
<image :src="baseurl+good.icon_path" class="icon"></image> <!-- <image :src="baseurl+good.icon_path" class="icon"></image> -->
<text class="name">{{ good.name }}</text> <text class="name">{{ good.title }}</text>
</view> <!-- </view> -->
<image class="lefticon" src="@/static/img/icon2.png" mode=""></image> <image class="lefticon" src="@/static/img/icon2.png" mode=""></image>
<!-- <view class="right"> --> <!-- <view class="right"> -->
<!-- <text class="tips">{{ good.content }}</text> --> <!-- <text class="tips">{{ good.content }}</text> -->
@ -290,15 +290,16 @@
margin-bottom: 30rpx; margin-bottom: 30rpx;
padding-left: 40rpx; padding-left: 40rpx;
.name { .name {
max-width: 100%;
margin-left: 10rpx; margin-left: 10rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
font-weight: 300; font-weight: 300;
line-height: 48rpx;
display: flex;
align-items: center;
letter-spacing: normal;
color: #606266; color: #606266;
overflow: hidden; /* 隐藏溢出内容 */
white-space: nowrap; /* 禁止换行 */
text-overflow: ellipsis; /* 显示省略号 */
} }
.icon { .icon {
width: 38rpx; width: 38rpx;

56
src/pages/index/index.vue

@ -118,7 +118,11 @@
</view> </view>
</view> </view>
</view> </view>
<image class="xzs" src="@/static/img/xzs.png" mode="" @click="showChat = true"></image> <liuDragButton :widthPx="'145rpx'">
<!-- <image class="xzs" v-if="showtypeChat" src="@/static/img/aiicon.png" mode="aspectFit"
@click="showtypeChat = false"></image> -->
<image class="xzs1" :style="{right: showtypeChat?'-105rpx': '-20rpx'}" v-show="!showChat" src="@/static/img/xzs.png" mode="aspectFit" @click="clickchat"></image>
</liuDragButton>
<chatdialog :visible="showChat" @close="showChat = false" /> <chatdialog :visible="showChat" @close="showChat = false" />
</template> </template>
@ -139,6 +143,8 @@
memberCenter memberCenter
} from '@/api/memberCenter' } from '@/api/memberCenter'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
import useUserStore from '@/store/user' import useUserStore from '@/store/user'
const userStore = useUserStore() const userStore = useUserStore()
@ -150,6 +156,7 @@
const list5 = ref([]); const list5 = ref([]);
const showChat = ref(false) const showChat = ref(false)
const showtypeChat = ref(true)
const change = (val) => { const change = (val) => {
current.value = val.current current.value = val.current
@ -299,7 +306,7 @@
hdList.value = res2.data.data hdList.value = res2.data.data
} }
}) })
const kfz = () => { const kfz = () => {
uni.showToast({ uni.showToast({
@ -308,8 +315,36 @@
}) })
} }
const clickcount = ref(0)
const clickchat = () =>{
clickcount.value++
if(!showtypeChat.value) {
showChat.value = true
clickcount.value = 0
} else {
if(clickcount.value === 1) {
showtypeChat.value = false
}
}
}
let intervalId;
function myPeriodicFunction() {
if(!showChat.value) {
showtypeChat.value = true
clickcount.value = 0
}
}
onMounted(() => {
intervalId = setInterval(myPeriodicFunction, 5000);
});
onUnmounted(() => {
clearInterval(intervalId);
});
onLoad(async() => {
onLoad(async () => {
// //
await getbqlist() await getbqlist()
// //
@ -668,11 +703,16 @@
} }
} }
.xzs { .xzs1 {
width: 192rpx; width: 180rpx;
height: 108rpx;
position: fixed; position: fixed;
right: -24rpx; // top: 70%;
top: 70%; }
.xzs {
width: 80rpx;
// position: fixed;
// right: -24rpx;
// top: 70%;
} }
</style> </style>

5
src/pages/index/shoppage/financialAssistance.vue

@ -27,7 +27,9 @@
</scroll-view> </scroll-view>
</view> </view>
</view> </view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <liuDragButton :widthPx="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image>
</liuDragButton>
</template> </template>
<script setup> <script setup>
@ -37,6 +39,7 @@
import { import {
financeList financeList
} from '@/api/shop' } from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')

83
src/pages/index/shoppage/interactiveZone.vue

@ -5,7 +5,8 @@
<scroll-view class="cardbox"> <scroll-view class="cardbox">
<view class="dhone"> <view class="dhone">
<view class="head"> <view class="head">
<image style="height: 96rpx;width: 96rpx;border-radius: 50%;" src="@/static/img/tx.png" mode=""></image> <image style="height: 96rpx;width: 96rpx;border-radius: 50%;" src="@/static/img/tx.png" mode="">
</image>
<view class="namepart"> <view class="namepart">
<text class="name">王铎</text> <text class="name">王铎</text>
<text class="date">1月31日</text> <text class="date">1月31日</text>
@ -15,23 +16,28 @@
<view class="ypl"> <view class="ypl">
<view class="head"> <view class="head">
<view class="left"> <view class="left">
<image style="height: 40rpx;width: 40rpx;border-radius: 50%;" src="@/static/img/tx.png" mode=""></image> <image style="height: 40rpx;width: 40rpx;border-radius: 50%;" src="@/static/img/tx.png"
mode=""></image>
<text class="name">王铎</text> <text class="name">王铎</text>
</view> </view>
<view class="right"> <view class="right">
<text class="value">866</text> <text class="value">866</text>
<image style="width: 24rpx;height: 24rpx;margin-left: 8rpx;" src="@/static/img/dz.png" mode=""></image> <image style="width: 24rpx;height: 24rpx;margin-left: 8rpx;" src="@/static/img/dz.png"
mode=""></image>
</view> </view>
</view> </view>
<text class="pl">小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好</text> <text class="pl">小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好小店帮好不好好不好</text>
</view> </view>
<view class="bottom"> <view class="bottom">
<view class="left"> <view class="left">
<image style="width: 36rpx;height: 34rpx;" src="@/static/img/dz.png" mode=""></image> <image style="width: 36rpx;height: 34rpx;"
:src="showdz?'/static/img/dz.png':'/static/img/ydz.png'" @click="showdz = !showdz" mode="">
</image>
<text class="value">866</text> <text class="value">866</text>
</view> </view>
<view class="right"> <view class="right">
<image style="width: 36rpx;height: 36rpx;" src="@/static/img/pl.png" mode=""></image> <image style="width: 36rpx;height: 36rpx;" src="@/static/img/pl.png" mode=""
@click="showinput = true"></image>
<text class="value">21</text> <text class="value">21</text>
</view> </view>
</view> </view>
@ -39,9 +45,18 @@
</scroll-view> </scroll-view>
</view> </view>
<image class="hdzq" src="@/static/img/fbhd.png" mode="" @click="goxzhdzq"></image> <image class="hdzq" src="@/static/img/fbhd.png" mode="" @click="goxzhdzq"></image>
<view class="inputbox" v-if="showinput" @click="showinput = false">
<view @click.stop="clicknb">
<u-textarea height="300" v-model="plvalue" placeholder="请输入内容" autoHeight
@confirm="confirm"></u-textarea>
</view>
</view>
</template> </template>
<script setup> <script setup>
const showdz = ref(true)
const showinput = ref(false)
const plvalue = ref('')
// //
const list1 = reactive([{ const list1 = reactive([{
name: '小店帮' name: '小店帮'
@ -61,12 +76,21 @@
function click(item) { function click(item) {
console.log('item', item); console.log('item', item);
} }
const goxzhdzq = () =>{ //
function clicknb() {
console.log('item');
}
const goxzhdzq = () => {
uni.navigateTo({ uni.navigateTo({
url: '/pages/index/shoppage/makeAssistance' url: '/pages/index/shoppage/makeAssistance'
}) })
} }
const confirm = (e) => {
console.log(e);
}
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
@ -74,9 +98,11 @@
background-color: #F1F3F9; background-color: #F1F3F9;
height: calc(100vh - 182rpx); height: calc(100vh - 182rpx);
width: 100%; width: 100%;
.cardbox { .cardbox {
max-height: 80vh; max-height: 80vh;
overflow-y: auto; overflow-y: auto;
.dhone { .dhone {
margin-top: 30rpx; margin-top: 30rpx;
width: 100%; width: 100%;
@ -85,13 +111,15 @@
align-items: center; align-items: center;
box-sizing: border-box; box-sizing: border-box;
background: #FFFFFF; background: #FFFFFF;
.head { .head {
display: flex; display: flex;
align-items: center; align-items: center;
.namepart { .namepart {
margin-left: 20rpx; margin-left: 20rpx;
display: grid; display: grid;
.name { .name {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
@ -100,6 +128,7 @@
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0C092A;
} }
.date { .date {
margin-top: 18rpx; margin-top: 18rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
@ -111,23 +140,28 @@
} }
} }
} }
.pl { .pl {
margin-top: 24rpx; margin-top: 24rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 28rpx; font-size: 28rpx;
font-weight: 350; font-weight: 350;
text-align: justify; /* 浏览器可能不支持 */ text-align: justify;
/* 浏览器可能不支持 */
letter-spacing: normal; letter-spacing: normal;
color: #0C092A; color: #0C092A;
} }
.bottom { .bottom {
margin-top: 20rpx; margin-top: 20rpx;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
.value { .value {
margin-left: 8rpx; margin-left: 8rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
@ -140,9 +174,11 @@
color: #858494; color: #858494;
} }
} }
.right { .right {
display: flex; display: flex;
align-items: center; align-items: center;
.value { .value {
margin-left: 8rpx; margin-left: 8rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
@ -158,19 +194,23 @@
} }
} }
} }
.ypl { .ypl {
width: 100%; width: 100%;
border-radius: 8rpx; border-radius: 8rpx;
background: #F8F9FA; background: #F8F9FA;
padding: 24rpx; padding: 24rpx;
margin-top: 22rpx; margin-top: 22rpx;
.head { .head {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
.left { .left {
display: flex; display: flex;
align-items: center; align-items: center;
.name { .name {
margin-left: 8rpx; margin-left: 8rpx;
font-family: Source Han Sans; font-family: Source Han Sans;
@ -181,11 +221,13 @@
color: #333333; color: #333333;
} }
} }
.right { .right {
display: flex; display: flex;
align-items: center; align-items: center;
.value { .value {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 24rpx; font-size: 24rpx;
font-weight: 350; font-weight: 350;
@ -195,12 +237,14 @@
} }
} }
} }
.pl { .pl {
font-family: Source Han Sans; font-family: Source Han Sans;
font-size: 24rpx; font-size: 24rpx;
font-weight: 350; font-weight: 350;
line-height: normal; line-height: normal;
text-align: justify; /* 浏览器可能不支持 */ text-align: justify;
/* 浏览器可能不支持 */
display: flex; display: flex;
align-items: center; align-items: center;
letter-spacing: normal; letter-spacing: normal;
@ -208,6 +252,7 @@
} }
} }
} }
.hdzq { .hdzq {
width: 108rpx; width: 108rpx;
height: 108rpx; height: 108rpx;
@ -215,4 +260,20 @@
right: 0; right: 0;
top: 75%; top: 75%;
} }
.inputbox {
background-color: #8686868f;
width: 100vw;
height: 100vh;
position: absolute;
top: 0;
left: 0;
:deep(.u-textarea) {
position: fixed;
bottom: 20%;
left: 0rpx;
width: 100vw;
}
}
</style> </style>

5
src/pages/index/shoppage/mediaHelp.vue

@ -36,7 +36,9 @@
</view> </view>
</view> </view>
</view> </view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <liuDragButton :widthPx="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image>
</liuDragButton>
</template> </template>
<script setup> <script setup>
@ -46,6 +48,7 @@
import { import {
mediumList mediumList
} from '@/api/shop' } from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/') const baseurl = ref(import.meta.env.VITE_APP_BASE_URL + '/')

10
src/pages/index/shoppage/shopHelp.vue

@ -7,16 +7,18 @@
:showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search> :showAction="false" height="40" margin="40rpx 24rpx 24rpx 24rpx"></u-search>
<zh-scroll ref="zhscrollRel" :scrollList="goods" :searchVal="keyword"></zh-scroll> <zh-scroll ref="zhscrollRel" :scrollList="goods" :searchVal="keyword"></zh-scroll>
</view> </view>
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image> <liuDragButton :widthPx="'145rpx'">
<image class="hdzq" src="@/static/img/hdzq.png" mode="" @click="gohdzq"></image>
</liuDragButton>
</template> </template>
<script setup> <script setup>
import { import {
ref ref
} from 'vue'; } from 'vue';
import zhScroll from '@/components/zh-scroll/zh-scroll.vue'; import zhScroll from '@/components/zh-scroll/zh-scroll.vue';
import { storeCategoryAll } from '@/api/shop' import { storeList } from '@/api/shop'
import liuDragButton from '@/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue'
const zhscrollRel = ref(null) const zhscrollRel = ref(null)
@ -41,7 +43,7 @@
onShow(async() => { onShow(async() => {
await storeCategoryAll().then((res)=> { await storeList({}).then((res)=> {
goods.value = res.data goods.value = res.data
}) })
}) })

12
src/pages/index/specialSubject.vue

@ -16,11 +16,11 @@
<view class="main"> <view class="main">
<u-box height="400rpx" gap="24rpx"> <u-box height="400rpx" gap="24rpx">
<template #left> <template #left>
<view class="leftmk"> <view class="leftmk" @click="godetail(ztList[0]?.id)">
<view class="top"> <view class="top">
<view class="titlepp"> <view class="titlepp">
<text class="title">{{ztList[0]?.title}}</text> <text class="title">{{ztList[0]?.title}}</text>
<text class="fh" @click="godetail(ztList[0]?.id)">></text> <text class="fh">></text>
</view> </view>
<text class="text">{{ztList[0]?.source}}</text> <text class="text">{{ztList[0]?.source}}</text>
</view> </view>
@ -31,11 +31,11 @@
</view> </view>
</template> </template>
<template #rightTop> <template #rightTop>
<view class="rightTopmk"> <view class="rightTopmk" @click="godetail(ztList[1]?.id)">
<view class="top"> <view class="top">
<view class="titlepp"> <view class="titlepp">
<text class="title">{{ztList[1]?.title}}</text> <text class="title">{{ztList[1]?.title}}</text>
<text class="fh" @click="godetail(ztList[1]?.id)">></text> <text class="fh">></text>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">
@ -45,11 +45,11 @@
</view> </view>
</template> </template>
<template #rightBottom> <template #rightBottom>
<view class="rightBottommk"> <view class="rightBottommk" @click="godetail(ztList[2]?.id)">
<view class="top"> <view class="top">
<view class="titlepp"> <view class="titlepp">
<text class="title">{{ztList[2]?.title}}</text> <text class="title">{{ztList[2]?.title}}</text>
<text class="fh" @click="godetail(ztList[2]?.id)">></text> <text class="fh">></text>
</view> </view>
</view> </view>
<view class="bottom"> <view class="bottom">

BIN
src/static/img/xzs.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.4 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

12
src/uni_modules/liu-drag-button/changelog.md

@ -0,0 +1,12 @@
## 1.0.5(2023-07-13)
优化
## 1.0.4(2023-06-08)
增加预览二维码
## 1.0.3(2023-05-31)
增加license
## 1.0.2(2023-04-28)
优化
## 1.0.1(2023-04-26)
增加示例
## 1.0.0(2023-04-26)
初始化发布

143
src/uni_modules/liu-drag-button/components/liu-drag-button/liu-drag-button.vue

@ -0,0 +1,143 @@
<template>
<view>
<movable-area class="movable-area" :scale-area="false">
<movable-view class="movable-view" :style="{width: widthPx}" :class="!isRemove?'animation-info':''" style="pointer-events: auto;"
@click="clickBtn" @touchstart="touchstart" @touchend="touchend" @change="onChange" direction="vertical"
inertia="true" :x="x" :y="y" :disabled="disabled" :out-of-bounds="true" :damping="200" :friction="100">
<slot></slot>
</movable-view>
</movable-area>
</view>
</template>
<script>
export default {
props: {
//
disabled: {
type: Boolean,
default: false
},
//
canDocking: {
type: Boolean,
default: true
},
//px
bottomPx: {
type: Number,
default: 130
},
//px
rightPx: {
type: Number,
default: 0
},
//px
widthPx: {
type: String,
default: '70rpx'
},
},
data() {
return {
left: 0,
top: 0,
isRemove: true,
windowWidth: 0,
windowHeight: 0,
btnWidth: 0,
btnHeight: 0,
x: 10000,
y: 10000,
old: {
x: 0,
y: 0
}
};
},
mounted() {
this.getSysInfo()
},
methods: {
getSysInfo() {
let sysInfo = uni.getSystemInfoSync()
this.windowWidth = sysInfo.windowWidth
this.windowHeight = sysInfo.windowHeight
let view = uni.createSelectorQuery().in(this).select(".movable-view")
view.boundingClientRect(rect => {
this.btnWidth = rect.width
this.btnHeight = rect.height
this.x = this.old.x
this.y = this.old.y
this.$nextTick(res => {
this.x = this.windowWidth - this.btnWidth - this.rightPx
this.y = this.windowHeight - this.btnHeight - this.bottomPx
})
}).exec()
},
//
onChange(e) {
this.old.x = e.detail.x
this.old.y = e.detail.y
},
//
touchstart(e) {
this.isRemove = true
},
//
touchend(e) {
if (this.canDocking && this.old.x) {
this.x = this.old.x
this.y = this.old.y
let bWidth = (this.windowWidth - this.btnWidth) / 2
if (this.x < 0 || (this.x > 0 && this.x <= bWidth)) {
this.$nextTick(res => {
this.x = 0
})
} else {
this.$nextTick(res => {
this.x = this.windowWidth - this.btnWidth
})
}
this.isRemove = false
}
},
//
clickBtn() {
this.$emit('clickBtn')
}
}
};
</script>
<style scoped>
.movable-view {
/* width: 70rpx; */
height: 100rpx;
/* background: linear-gradient(360deg, #287BF8 0%, #6EA8FF 100%); */
/* box-shadow: 0rpx 4rpx 12rpx 0rpx #ADC3F8; */
/* border-radius: 50rpx; */
/* color: #FFFFFF; */
touch-action: none;
display: flex;
align-items: center;
justify-content: center;
}
.animation-info {
transition: left .25s ease;
}
.movable-area {
width: 100%;
height: 100%;
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 999999 !important;
pointer-events: none;
}
</style>

6
src/uni_modules/liu-drag-button/license.md

@ -0,0 +1,6 @@
### 1、本插件可免费下载使用;
### 2、未经许可,严禁复制本插件派生同类插件上传插件市场;
### 3、未经许可,严禁在插件市场恶意复制抄袭本插件进行违规获利;
### 4、对本软件的任何使用都必须遵守这些条款,违反这些条款的个人或组织将面临法律追究。

85
src/uni_modules/liu-drag-button/package.json

@ -0,0 +1,85 @@
{
"id": "liu-drag-button",
"displayName": "可拖动悬浮按钮",
"version": "1.0.5",
"description": "可拖动的悬浮按钮,兼容小程序、H5,支持自动停靠,支持自定义样式,使用相当简单,源码简单易修改。",
"keywords": [
"悬浮按钮",
"拖拽按钮",
"拖动",
"按钮",
"拖拽"
],
"repository": "",
"engines": {
"HBuilderX": "^3.1.0"
},
"dcloudext": {
"type": "component-vue",
"sale": {
"regular": {
"price": "0.00"
},
"sourcecode": {
"price": "0.00"
}
},
"contact": {
"qq": ""
},
"declaration": {
"ads": "无",
"data": "无",
"permissions": "无"
},
"npmurl": ""
},
"uni_modules": {
"dependencies": [],
"encrypt": [],
"platforms": {
"cloud": {
"tcb": "y",
"aliyun": "y"
},
"client": {
"Vue": {
"vue2": "y",
"vue3": "u"
},
"App": {
"app-vue": "u",
"app-nvue": "u"
},
"H5-mobile": {
"Safari": "y",
"Android Browser": "y",
"微信浏览器(Android)": "y",
"QQ浏览器(Android)": "y"
},
"H5-pc": {
"Chrome": "u",
"IE": "u",
"Edge": "u",
"Firefox": "u",
"Safari": "u"
},
"小程序": {
"微信": "y",
"阿里": "u",
"百度": "u",
"字节跳动": "u",
"QQ": "u",
"钉钉": "u",
"快手": "u",
"飞书": "u",
"京东": "u"
},
"快应用": {
"华为": "u",
"联盟": "u"
}
}
}
}
}

36
src/uni_modules/liu-drag-button/readme.md

@ -0,0 +1,36 @@
# liu-drag-button适用于uni-app项目的可拖动悬浮按钮组件
### 本组件目前兼容微信小程序、H5
### 本组件是可拖动的悬浮按钮,兼容小程序、H5,支持自动停靠,支持自定义样式,源码简单易修改
# --- 扫码预览、关注我们 ---
## 扫码关注公众号,查看更多插件信息,预览插件效果!
![](https://uni.ckapi.pro/uniapp/publicize.png)
### 使用方式
``` html
<liu-drag-button @clickBtn="clickBtn">按钮</liu-drag-button>
```
``` javascript
export default {
data() {
return {
};
},
methods: {
//点击按钮
clickBtn(){
console.log('按钮被点击了')
},
}
}
```
### 属性说明
| 名称 | 类型 | 默认值 | 描述 |
| ----------------------------|--------------- | ------------------ | ---------------|
| disabled | Boolean | false | 是否禁用拖动
| canDocking | Boolean | true | 是否自动停靠
| bottomPx | Number | 30 | 按钮默认位置离底部距离(px)
| rightPx | Number | 0 | 按钮默认位置离右边距离(px)
Loading…
Cancel
Save