Browse Source

fix: 长按拖动项目

test2
xuesinan 4 years ago
parent
commit
7a05a0c7d8
  1. 3
      CHANGELOG.md
  2. 14
      components/Globals/Globals.vue
  3. 8
      components/PrettyExchange/PrettyExchange.vue
  4. 2
      manifest.json

3
CHANGELOG.md

@ -1,4 +1,4 @@
# 1.0.0 (2022-03-31) # 1.0.0 (2022-04-01)
### 🌟 新功能 ### 🌟 新功能
范围|描述|commitId 范围|描述|commitId
@ -75,6 +75,7 @@
- | 小绿点隐藏 | [31f3dc7](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/31f3dc7) - | 小绿点隐藏 | [31f3dc7](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/31f3dc7)
- | 引导页、广告页 | [4aa76ff](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/4aa76ff) - | 引导页、广告页 | [4aa76ff](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/4aa76ff)
- | 域名配置 | [b68272d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b68272d) - | 域名配置 | [b68272d](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/b68272d)
- | 长按改变层级 | [c25319a](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/c25319a)
- | 账户名密码登录 | [ebf456e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf456e) - | 账户名密码登录 | [ebf456e](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/ebf456e)
- | 主体颜色 | [bb5c0e3](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/bb5c0e3) - | 主体颜色 | [bb5c0e3](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/bb5c0e3)
- | 注册、用户协议 | [68e9189](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/68e9189) - | 注册、用户协议 | [68e9189](https://101.201.226.163:50022/TALL/TALL-MUI-4/commits/68e9189)

14
components/Globals/Globals.vue

@ -14,12 +14,14 @@
<!-- <skeleton :banner="false" :loading="showGlobalSkeleton" :row="3" animate class="u-line-2 skeleton"></skeleton> --> <!-- <skeleton :banner="false" :loading="showGlobalSkeleton" :row="3" animate class="u-line-2 skeleton"></skeleton> -->
<view class="grid"> <view class="grid">
<view <view class="pb-3">
class="py-3 u-font-14 rounded-md bg-white" <view
style="height: 100%" class="py-3 u-font-14 rounded-md bg-white"
v-if="visibleRoles[roleIndex] && visibleRoles[roleIndex].name === '我'" style="height: 100%"
> v-if="visibleRoles[roleIndex] && visibleRoles[roleIndex].name === '管理员'"
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="toWorkbench">工作台</button> >
<button class="text-xs bg-blue-500 text-white leading-6" style="width: 500rpx" @click="toWorkbench">工作台</button>
</view>
</view> </view>
<template v-for="item in globals" :key="item.id"> <template v-for="item in globals" :key="item.id">

8
components/PrettyExchange/PrettyExchange.vue

@ -158,6 +158,7 @@ const data = reactive({
// border: 'border border-blue-500 shadow rounded-md', // border: 'border border-blue-500 shadow rounded-md',
// showBorder: false, // // showBorder: false, //
showItemIndex: undefined, showItemIndex: undefined,
isStartMove: 0, //
}); });
const emit = defineEmits(['changeHeight', 'change']); const emit = defineEmits(['changeHeight', 'change']);
@ -277,7 +278,9 @@ function isNumber(val) {
} }
function start(e, index) { function start(e, index) {
console.log('开始'); console.log('开始', e);
data.isStartMove = 1;
setTimeout(() => { setTimeout(() => {
getDate(); getDate();
}, 300); }, 300);
@ -347,6 +350,7 @@ function start(e, index) {
} }
function move(e, length) { function move(e, length) {
if (!data.isStartMove) return false;
console.log('移动'); console.log('移动');
data.showMoveImage = true; // data.showMoveImage = true; //
const touch = e.touches[0]; const touch = e.touches[0];
@ -387,6 +391,8 @@ function move(e, length) {
function stops(e, index, length) { function stops(e, index, length) {
console.log('结束'); console.log('结束');
data.isStartMove = 0;
const touch = e.changedTouches[0]; const touch = e.changedTouches[0];
const lastIndex = findOverIndex(touch.pageY, length); const lastIndex = findOverIndex(touch.pageY, length);

2
manifest.json

@ -2,7 +2,7 @@
"name" : "时物链条2", "name" : "时物链条2",
"appid" : "__UNI__6207504", "appid" : "__UNI__6207504",
"description" : "", "description" : "",
"versionName" : "1.0.7", "versionName" : "1.0.8",
"versionCode" : "100", "versionCode" : "100",
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */

Loading…
Cancel
Save