Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
visualcloud
/
Vmatrix-client-taro
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Wiki
Members
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
b57cc7ec
authored
Sep 24, 2019
by
hank
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
list 类型不虚删除第一项
parent
8f0255ad
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
10 deletions
+23
-10
src/common/utils.ts
+13
-1
src/pages/home/tempaltes/conpoments/list_item/index.tsx
+0
-1
src/pages/home/tempaltes/conpoments/menu_item/index.tsx
+10
-8
No files found.
src/common/utils.ts
View file @
b57cc7ec
...
...
@@ -49,7 +49,19 @@ export function getWindiwHeight() {
const
HeaderHeight
=
process
.
env
.
TARO_ENV
===
'rn'
?
Header
.
HEIGHT
:
0
return
windowHeight
-
HeaderHeight
}
/**
* @param frameUrl
* 获取资源url
*/
export
function
getHostUrl
(
frameUrl
,
dataUrl
)
{
if
(
String
(
dataUrl
).
indexOf
(
'http'
)
!==
-
1
)
{
return
dataUrl
}
else
{
let
arr
=
frameUrl
.
split
(
'/'
)
arr
.
splice
(
-
1
,
2
)
console
.
log
(
arr
.
join
(
''
))
}
}
/** ArrayBuffer转16进制字符串 */
export
function
ArrayBufferToString
(
buffer
:
ArrayBuffer
)
{
const
hexArr
:
any
[]
=
Array
.
prototype
.
map
.
call
(
new
Uint8Array
(
buffer
),
bit
=>
{
...
...
src/pages/home/tempaltes/conpoments/list_item/index.tsx
View file @
b57cc7ec
...
...
@@ -96,7 +96,6 @@ class ListItem extends Component {
<
View
>
{
Object
.
keys
(
objItem
).
map
(
key
=>
{
let
ele
:
any
=
null
console
.
log
(
key
,
'+++++++++++++++++++++'
,
objItem
)
if
(
key
!==
'schemaIndex'
&&
key
!==
'index'
)
{
if
(
this
.
checkType
(
objItem
,
key
)
===
'image'
)
{
ele
=
(
...
...
src/pages/home/tempaltes/conpoments/menu_item/index.tsx
View file @
b57cc7ec
...
...
@@ -170,14 +170,16 @@ class MenuItem extends Component {
<
View
className=
"list-item-container"
key=
{
item
.
dataKey
}
>
<
View
className=
"list-item-title"
>
<
Text
className=
"list-item-index"
>
第
{
index
+
1
}
项
</
Text
>
<
Text
className=
"list-item-del"
onClick=
{
()
=>
{
this
.
removeItem
(
index
,
item
.
dataKey
)
}
}
>
删除
</
Text
>
{
schemaData
[
item
.
dataKey
].
length
?
(
<
Text
className=
"list-item-del"
onClick=
{
()
=>
{
this
.
removeItem
(
index
,
item
.
dataKey
)
}
}
>
删除
</
Text
>
)
:
null
}
</
View
>
<
ListItem
item=
{
item
}
...
...
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