Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
Y
yongxinda-h5
Project
Project
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
Graph
比较
统计图
议题
0
议题
0
列表
看板
标记
Milestones
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
刘旭
yongxinda-h5
Commits
8d018bd2
提交
8d018bd2
authored
11月 03, 2022
作者:
刘旭
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
提交
上级
1c7d3811
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
60 行增加
和
11 行删除
+60
-11
drag-and-drop-sort.vue
src/pages/productLine/components/drag-and-drop-sort.vue
+6
-6
productLine.vue
src/pages/productLine/productLine.vue
+54
-5
没有找到文件。
src/pages/productLine/drag-and-drop-sort.vue
→
src/pages/productLine/
components/
drag-and-drop-sort.vue
浏览文件 @
8d018bd2
...
@@ -19,7 +19,7 @@
...
@@ -19,7 +19,7 @@
@
touchstart=
"handleTouchstart($event, index)"
@
touchstart=
"handleTouchstart($event, index)"
@
touchmove
.
prevent=
"handleTouchmove($event, index)"
@
touchmove
.
prevent=
"handleTouchmove($event, index)"
@
touchend=
"handleTouchend"
@
touchend=
"handleTouchend"
@
tap=
"handleTap(index)"
@
tap
.
prevent
=
"handleTap(index)"
style=
"width: 100%; height: 100%;"
style=
"width: 100%; height: 100%;"
>
>
<!-- 自定义内容 -->
<!-- 自定义内容 -->
...
@@ -119,13 +119,13 @@ export default {
...
@@ -119,13 +119,13 @@ export default {
return
tempArray
;
return
tempArray
;
},
},
handleTap
(
index
)
{
handleTap
(
index
)
{
if
(
index
==
this
.
controlsArray
.
length
-
1
)
return
;
let
that
=
this
;
for
(
let
s
in
this
.
controlsArray
)
{
if
(
index
==
that
.
controlsArray
.
length
-
1
)
return
;
for
(
let
s
in
that
.
controlsArray
)
{
if
(
s
===
index
)
return
;
if
(
s
===
index
)
return
;
this
.
controlsArray
[
s
].
show
=
false
;
that
.
controlsArray
[
s
].
show
=
false
;
// console.log(s);
}
}
th
is
.
controlsArray
[
index
].
show
=
true
;
th
at
.
controlsArray
[
index
].
show
=
true
;
},
},
/** 处理手指触摸后移动 */
/** 处理手指触摸后移动 */
handleTouchmove
(
event
,
index
)
{
handleTouchmove
(
event
,
index
)
{
...
...
src/pages/productLine/productLine.vue
浏览文件 @
8d018bd2
<
template
>
<
template
>
<view
class=
"u-wrap"
>
<view
class=
"u-wrap"
>
<view
class=
"u-menu-wrap"
>
<view
class=
"u-menu-wrap"
>
<view
style=
"position: fixed; left: 8rpx; top:
8
%;"
>
<view
style=
"position: fixed; left: 8rpx; top:
5
%;"
>
<drag-and-drop-sort
<drag-and-drop-sort
style=
"display: flex; justify-content: center;"
style=
"display: flex; justify-content: center;"
:controlsList=
"lineList"
:controlsList=
"lineList"
:controlsSize=
"
{ width: 1
2
0, height: 40 }"
:controlsSize=
"
{ width: 1
8
0, height: 40 }"
>
>
<template
#
default=
"scope"
>
<template
#
default=
"scope"
>
<u-section
<u-section
...
@@ -15,6 +15,7 @@
...
@@ -15,6 +15,7 @@
:show-line=
"scope.row.show"
:show-line=
"scope.row.show"
:line-color=
"scope.row.show ? '#0000f0' : ''"
:line-color=
"scope.row.show ? '#0000f0' : ''"
style=
"margin-left: 20rpx;"
style=
"margin-left: 20rpx;"
@
longPress=
"handleLongPress"
></u-section>
></u-section>
<view
v-else
class=
"add"
>
<view
v-else
class=
"add"
>
<u-icon
name=
"plus"
color=
"#c6c6c6"
size=
"50"
@
tap=
"addTabs"
></u-icon>
<u-icon
name=
"plus"
color=
"#c6c6c6"
size=
"50"
@
tap=
"addTabs"
></u-icon>
...
@@ -36,6 +37,14 @@
...
@@ -36,6 +37,14 @@
</view>
</view>
</view>
</view>
</view>
</view>
<uni-goods-nav
class=
"goods-nav"
:fill=
"true"
:options=
"options"
:buttonGroup=
"buttonGroup"
@
click=
"onClick"
@
buttonClick=
"buttonClick"
/>
</view>
</view>
<category-popup
<category-popup
ref=
"categoryRef"
ref=
"categoryRef"
...
@@ -49,7 +58,7 @@
...
@@ -49,7 +58,7 @@
<
script
lang=
"ts"
setup
>
<
script
lang=
"ts"
setup
>
import
{
ref
}
from
'vue'
;
import
{
ref
}
from
'vue'
;
import
config
from
'@/utils/config'
;
import
config
from
'@/utils/config'
;
import
dragAndDropSort
from
'./drag-and-drop-sort.vue'
;
import
dragAndDropSort
from
'./
components/
drag-and-drop-sort.vue'
;
import
categoryPopup
from
'./components/categoryPopup.vue'
;
import
categoryPopup
from
'./components/categoryPopup.vue'
;
import
goodsSku
from
'@/pages/goods/goodsSku'
;
import
goodsSku
from
'@/pages/goods/goodsSku'
;
import
{
indexDetails
}
from
'@/api/index'
;
import
{
indexDetails
}
from
'@/api/index'
;
...
@@ -60,12 +69,46 @@ let showPopup = ref(false as Boolean);
...
@@ -60,12 +69,46 @@ let showPopup = ref(false as Boolean);
let
categoryRef
=
ref
();
let
categoryRef
=
ref
();
let
goodsSkuRef
=
ref
();
let
goodsSkuRef
=
ref
();
let
detailData
=
ref
();
let
detailData
=
ref
();
let
star
=
ref
(
'star-filled'
);
let
options
=
[
{
icon
:
star
.
value
?
'star-filled'
:
'star'
,
text
:
'收藏'
,
},
];
let
buttonGroup
=
[
{
text
:
'加入购物车'
,
backgroundColor
:
'#ff0000'
,
color
:
'#fff'
,
},
{
text
:
'立即购买'
,
backgroundColor
:
'#ffa200'
,
color
:
'#fff'
,
},
];
let
addTabs
=
()
=>
{
let
addTabs
=
()
=>
{
showPopup
.
value
=
true
;
showPopup
.
value
=
true
;
categoryRef
.
value
.
initIndex
();
categoryRef
.
value
.
initIndex
();
};
};
let
onClick
=
(
e
:
any
)
=>
{
uni
.
showToast
({
title
:
`点击
${
e
.
content
.
text
}
`
,
icon
:
'none'
,
});
};
let
buttonClick
=
(
e
:
any
)
=>
{
console
.
log
(
e
);
// this.options[2].info++
};
// 长按选择操作
let
handleLongPress
=
()
=>
{};
// 添加产品线产品
// 添加产品线产品
let
initCategory
=
(
data
:
any
)
=>
{
let
initCategory
=
(
data
:
any
)
=>
{
initDetails
(
data
.
id
);
initDetails
(
data
.
id
);
...
@@ -126,7 +169,7 @@ const initDetails = (id: number) => {
...
@@ -126,7 +169,7 @@ const initDetails = (id: number) => {
}
}
.add
{
.add
{
position
:
absolute
;
position
:
absolute
;
width
:
1
2
0px
;
width
:
1
8
0px
;
height
:
40px
;
height
:
40px
;
background-color
:
#fff
;
background-color
:
#fff
;
z-index
:
0
;
z-index
:
0
;
...
@@ -135,7 +178,7 @@ const initDetails = (id: number) => {
...
@@ -135,7 +178,7 @@ const initDetails = (id: number) => {
margin-top
:
20rpx
;
margin-top
:
20rpx
;
}
}
.left-cates
{
.left-cates
{
width
:
124
px
;
width
:
360r
px
;
}
}
.right-cates
{
.right-cates
{
flex
:
1
;
flex
:
1
;
...
@@ -165,4 +208,10 @@ const initDetails = (id: number) => {
...
@@ -165,4 +208,10 @@ const initDetails = (id: number) => {
overflow
:
hidden
;
overflow
:
hidden
;
justify-content
:
space-between
;
justify-content
:
space-between
;
}
}
.goods-nav
{
width
:
100%
;
position
:
fixed
;
bottom
:
50px
;
z-index
:
99
;
}
</
style
>
</
style
>
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论