Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
S
self-support
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李俊赕
self-support
Commits
4d886b4b
Commit
4d886b4b
authored
May 20, 2021
by
Damon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
完工页面-scroll-view方案
parent
220595a7
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
159 additions
and
108 deletions
+159
-108
.env.js
.env.js
+1
-1
XhSelect.vue
src/components/createCom/XhSelect.vue
+34
-9
XhServiceMeasure.vue
src/components/createCom/XhServiceMeasure.vue
+38
-6
XhTime.vue
src/components/createCom/XhTime.vue
+15
-15
complete.vue
src/pages/order/complete.vue
+71
-77
No files found.
.env.js
View file @
4d886b4b
;
(
function
()
{
let
NODE_ENV
=
'
dev
'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
NODE_ENV
=
'
test
'
;
// dev:开发环境 | test:测试环境 | prod:生产环境
let
ENV_VAR
=
null
;
if
(
process
.
env
.
NODE_ENV
===
"development"
)
{
if
(
NODE_ENV
===
'dev'
)
{
...
...
src/components/createCom/XhSelect.vue
View file @
4d886b4b
<!-- ******************* 单个下拉选择 ******************* -->
<
template
>
<view
class=
"xh-select"
:style=
"
{'width': fieldsWidth}">
<u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
<
!--
<
u-input
:value=
"text"
disabled
@
click=
"show=true"
:placeholder=
"placeholder"
:placeholder-style=
"placeholderStyle"
:custom-style=
"customStyle"
:clearable=
"false"
></u-input>
<u-select
:list=
"settings"
v-model=
"show"
@
confirm=
"actionSheetCallback"
safe-area-inset-bottom
></u-select>
<u-icon
class=
"input-icon"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
<u-icon
class=
"input-icon"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
-->
<view
class=
"u-flex u-row-between picker-common"
>
<picker
mode=
"selector"
:value=
"index"
range-key=
"label"
:range=
"settings"
@
click=
"show = true"
@
change=
"pickerChange"
class=
"u-flex-1"
>
<view
class=
"txt"
>
{{
text
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"show ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
</view>
</
template
>
...
...
@@ -68,19 +75,25 @@
'font-size'
:
'26rpx'
,
'height'
:
'76rpx'
}
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
},
watch
:
{},
mounted
()
{},
methods
:
{
actionSheetCallback
(
event
)
{
const
id
=
event
[
0
].
value
actionSheetCallback
(
event
)
{
const
id
=
event
[
0
].
value
this
.
dataValue
=
id
this
.
valueChange
(
id
)
}
},
pickerChange
(
data
)
{
const
index
=
data
.
detail
.
value
const
id
=
this
.
item
.
fieldsOptions
[
index
].
key
this
.
dataValue
=
id
this
.
valueChange
(
id
)
},
}
}
</
script
>
...
...
@@ -95,5 +108,17 @@
color
:
#2272FF
;
}
}
.picker-common
{
min-height
:
35px
;
background-color
:
#F4F5F7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
}
}
</
style
>
src/components/createCom/XhServiceMeasure.vue
View file @
4d886b4b
<!-- ******************* 单级/多级 选择 ******************* -->
<
template
>
<view
class=
"picker-box"
:style=
"
{'width': fieldsWidth}">
<view
class=
"u-flex u-row-between text-view"
@
click=
"openPicker"
>
<
!--
<
view
class=
"u-flex u-row-between text-view"
@
click=
"openPicker"
>
<view
class=
"txt u-flex-1 text-title"
>
{{
text
||
''
}}
</view>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"showPicker ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
<u-picker
v-model=
"showPicker"
range-key=
"label"
@
columnchange=
"columnchange"
:mode=
"isNotMulti?'selector':'multiSelector'"
@
confirm=
"pickerConfirm"
:range=
"settings"
></u-picker>
<u-picker
v-model=
"showPicker"
range-key=
"label"
@
columnchange=
"columnchange"
:mode=
"isNotMulti?'selector':'multiSelector'"
@
confirm=
"pickerConfirm"
:range=
"settings"
></u-picker>
-->
<view
class=
"u-flex u-row-between picker-common"
>
<picker
:mode=
"isNotMulti?'selector':'multiSelector'"
:value=
"index"
range-key=
"label"
:range=
"settings"
@
click=
"showPicker = true"
@
change=
"pickerChange"
class=
"txt u-flex-1"
>
<view>
{{
text
}}
</view>
</picker>
<u-icon
class=
"input-icon"
color=
"#2272FF"
:name=
"showPicker ? 'arrow-up' : 'arrow-down'"
></u-icon>
</view>
<!-- :default-selector='[0, 1]' -->
<u-toast
ref=
"uToast"
/>
</view>
...
...
@@ -57,7 +63,8 @@
isNotMulti
:
true
,
showPicker
:
false
,
settings
:[],
measure
:[]
measure
:[],
index
:
''
}
},
computed
:
{
...
...
@@ -68,9 +75,9 @@
val
=
data
[
0
].
measureTypeName
+
"-"
+
data
[
0
].
measureName
}
return
val
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
fieldsWidth
()
{
return
this
.
item
.
fieldsWidth
?
(
this
.
item
.
fieldsWidth
+
'rpx'
)
:
'100%'
},
},
watch
:
{
...
...
@@ -145,6 +152,18 @@
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
pickerChange
(
data
)
{
this
.
showPicker
=
false
this
.
index
=
data
.
detail
.
value
let
result
=
[]
if
(
this
.
isMulti
){
// 维修
}
else
{
// 安装
result
.
push
(
this
.
measure
[
this
.
index
])
}
this
.
valueChange
(
JSON
.
stringify
(
result
))
},
columnchange
(
data
){
// // 树列改变时进行联动操作
// const {column ,index} = data
...
...
@@ -155,6 +174,19 @@
}
</
script
>
<
style
lang=
"scss"
scoped
>
.picker-common
{
min-height
:
35px
;
background-color
:
#F4F5F7
;
border-radius
:
6px
;
color
:
#333333
;
padding-left
:
10px
;
padding-right
:
12px
;
width
:
100%
;
height
:
38px
;
.txt
{
font-size
:
14px
;
}
}
.text-view
{
background-color
:
#F4F5F7
;
border-radius
:
12rpx
;
...
...
src/components/createCom/XhTime.vue
View file @
4d886b4b
<!-- ******************* 输入框 ******************* -->
<
template
>
<view
class=
"picker-box"
>
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<!--
<view
class=
"txt"
>
{{
item
.
fieldsTitle
}}
</view>
-->
<!--
<view
class=
"u-flex u-row-between"
@
click=
"openPicker"
>
<view
class=
"txt u-flex-1"
>
{{
dataValue
||
'请选择时间'
}}
</view>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
-->
<!--
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
-->
<view
class=
"u-flex u-row-between"
>
<picker
mode=
"date"
:value=
"dataValue"
@
change=
"bindDateChange"
class=
"txt u-flex-1"
>
<view>
{{
dataValue
}}
</view>
</picker>
<u-icon
name=
"arrow-right"
color=
"#666"
size=
"28"
></u-icon>
</view>
<u-picker
:params=
"params"
v-model=
"showPicker"
mode=
"time"
@
confirm=
"pickerConfirm"
></u-picker>
<!--
<u-picker
v-model=
"showPicker"
:rangeKey=
"rangeKey"
@
columnchange=
"columnchange"
mode=
"multiSelector"
@
confirm=
"pickerConfirm"
:default-selector=
'[0, 1]'
:range=
"settings"
></u-picker>
-->
</view>
</
template
>
...
...
@@ -29,19 +33,10 @@
minute
:
false
,
second
:
false
,
timestamp
:
true
,
}
}
},
computed
:
{
type
()
{
if
(
this
.
item
&&
this
.
item
.
fieldsType
==
'password'
)
{
return
this
.
item
.
fieldsType
}
else
{
return
'text'
}
},
date
:
'请选择'
,
}
},
watch
:
{},
mounted
()
{},
methods
:
{
openPicker
()
{
...
...
@@ -53,6 +48,11 @@
this
.
dataValue
=
dataValue
this
.
valueChange
(
dataValue
)
},
bindDateChange
:
function
(
e
)
{
const
value
=
e
.
target
.
value
this
.
dataValue
=
value
this
.
valueChange
(
value
)
}
}
}
</
script
>
...
...
src/pages/order/complete.vue
View file @
4d886b4b
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment