first commit
This commit is contained in:
54
pages/list/index.ux
Normal file
54
pages/list/index.ux
Normal file
@@ -0,0 +1,54 @@
|
||||
<template>
|
||||
<div class="wrapper">
|
||||
<list class="list" bounces="false">
|
||||
<list-item type="ceiling">
|
||||
<text class="title">文件总数{{ fileList.length }}</text>
|
||||
</list-item>
|
||||
<list-item type="item" for="{{ fileList }}">
|
||||
<text class="text">{{ $item.uri.split('/').pop() }}</text>
|
||||
</list-item>
|
||||
</list>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import file from '@blueos.storage.file'
|
||||
export default {
|
||||
data: {
|
||||
fileList:null
|
||||
},
|
||||
onInit() {
|
||||
file.list({
|
||||
uri: 'internal://files/',
|
||||
success: (data) => {
|
||||
this.fileList = data.fileList;
|
||||
console.log(data.fileList);
|
||||
}
|
||||
|
||||
})
|
||||
},
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.wrapper {
|
||||
flex-direction: column;
|
||||
}
|
||||
.title,
|
||||
.text {
|
||||
height: 180px;
|
||||
width: 400px;
|
||||
text-align: center;
|
||||
font-size: 40px;
|
||||
background-color: #203a43;
|
||||
color: #ffffff;
|
||||
border-bottom: 1px solid #2c5364;
|
||||
}
|
||||
.title {
|
||||
background-color: #0f2027;
|
||||
}
|
||||
.ceiling {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
}
|
||||
</style>
|
||||
Reference in New Issue
Block a user