From c903dfb1603e8c3bc575d0e840d273e19d314e83 Mon Sep 17 00:00:00 2001 From: jee <670430506@qq.com> Date: Wed, 5 Aug 2020 15:35:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=8A=E4=BC=A0=E6=96=87=E4=BB=B6=E8=87=B3?= =?UTF-8?q?=20'Zip'?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Zip/FullList.js | 114 ++++++++++++++++++++++++++++++++++++++++++++++ Zip/MainList.js | 119 ++++++++++++++++++++++++++++++++++++++++++++++++ Zip/SubList.js | 78 +++++++++++++++++++++++++++++++ Zip/back.png | Bin 0 -> 2602 bytes Zip/fold.png | Bin 0 -> 535 bytes 5 files changed, 311 insertions(+) create mode 100644 Zip/FullList.js create mode 100644 Zip/MainList.js create mode 100644 Zip/SubList.js create mode 100644 Zip/back.png create mode 100644 Zip/fold.png diff --git a/Zip/FullList.js b/Zip/FullList.js new file mode 100644 index 0000000..3f6f636 --- /dev/null +++ b/Zip/FullList.js @@ -0,0 +1,114 @@ +import React, {Component} from 'react'; +import { + Image, + View, + StyleSheet, + TouchableOpacity, + ScrollView, + Text, + FlatList +} from 'react-native'; +import {Directory} from '../../public/plugin/api'; + +const back_image = require("./back.png"); + +export class FullList extends Component { + + render(){ + + const data = this._getData(); + const content = data.map((item, index) => ( + this.getItem(item, index) + )).slice(4); + + return ( + + + + + + 全部 + {content} + + + ) + + } + _getData() { + return this.props.pprops.currentNode.getChildNodes(); + } + getItem(item, index) { + //debugger; + + return ( + + {item.title} + + + + ) + } +} + +class Sub extends Component{ + render(){ + //debugger; + const data = this.props.item.getChildNodes(); + const content = data.map((item, index) => ( + this.getItem(item, index) + )); + return ( + {content} + + ) + } + getItem(item, index) { + //debugger; + return ( + + this.props.navigateNode(item)}> + {Directory.createIconGrid(item, {iconStyle: styles.gridIcon})} + + + ) + } + +} + +const styles = StyleSheet.create({ + box:{ + width : "20%", + flexWrap : "nowrap", + }, + title:{ + height : 56, + fontSize : "20px", + marginTop: 10 + }, + gridWrapper: { + width: "100%", + + //height: "17.5%", + marginTop: 10 + }, + gridIcon: { + width: 36, + height: 36, + borderRadius: 8, + + }, + list: { + flex: 1, + flexDirection: "row", + overflow: "hidden auto", + //alignContent:"flex-start", + flexWrap: "wrap", + width: "100%", + transform: "translateZ(0px)" + + } +}); \ No newline at end of file diff --git a/Zip/MainList.js b/Zip/MainList.js new file mode 100644 index 0000000..7814182 --- /dev/null +++ b/Zip/MainList.js @@ -0,0 +1,119 @@ +import React, {Component} from 'react'; +import { + Image, + View, + StyleSheet, + TouchableOpacity, + ScrollView +} from 'react-native'; +import {Directory} from '../../public/plugin/api'; +import {FullList} from './FullList'; +import { from } from 'core-js/fn/array'; + +const DirectoryScrollView = Directory.DirectoryScrollView; +var image = require('./fold.png'); + +class MainList extends Component { + constructor(props) { + super(props); + this.state = { + hidden : true + } + } + Change = () => { + + this.setState({ + hidden : this.state.hidden ? false : true + }) + } + render() { + + const data = this._getData(); + const content = data.map((item, index) => ( + this.getItem(item, index) + )); + + if(content.length < 5){ + return + + {content} + + + } + + + if (!this.state.hidden){ + + return( + + + ) + } + + fullIcon = ( + +

全部

+
+
); + return ( + + + {content} + + + )} + + getItem(item, index) { + return ( + + this.props.navigateNode(item)}> + {Directory.createIconGrid(item, {iconStyle: styles.gridIcon})} + + + ) + } + + _getData() { + return this.props.currentNode.getChildNodes(); + } +} + +class Static extends Component{ + render() { + + const content = this.props.content; + var foldList = content.slice(0, 4); + return foldList; + } + +} + +export default MainList; + +const styles = StyleSheet.create({ + gridWrapper: { + width: "20%", + //height: "17.5%", + marginTop: 10 + }, + gridIcon: { + width: 36, + height: 36, + borderRadius: 8, + + }, + list: { + flex: 1, + flexDirection: "row", + overflow: "hidden auto", + //alignContent:"flex-start", + flexWrap: "wrap", + width: "100%", + transform: "translateZ(0px)" + + } +}); \ No newline at end of file diff --git a/Zip/SubList.js b/Zip/SubList.js new file mode 100644 index 0000000..6788061 --- /dev/null +++ b/Zip/SubList.js @@ -0,0 +1,78 @@ +import React, {Component} from 'react'; +import { + StyleSheet, + TouchableOpacity, + View +} from 'react-native'; +import {Directory} from '../../public/plugin/api'; + +const DirectoryFlatList = Directory.DirectoryFlatList; + +class SubList extends Component { + constructor(props) { + super(props); + this._renderItem = this._renderItem.bind(this); + } + + render() { + return item.id} + renderItem={this._renderItem} + style={styles.list} + /> + } + + getData() { + return this.props.currentNode.getChildNodes(); + } + + _renderItem({item}) { + + return ( + + { + this.props.navigateNode(item); + }} + > + { + Directory.createIconCell(item, + { + + containerStyle: {}, + textStyle: styles.text, + iconStyle: styles.cellIcon, + hideTopBorder: true, + hideBottomBorder: true + } + ) + } + + ) + } +} + +const styles = StyleSheet.create({ + list: { + width: '100%' + }, + item: { + paddingTop: '4%', + paddingBottom: '4%' + }, + itemWrapper: { + borderBottomWidth: 1, + borderColor: '#F5F5F5' + }, + text: { + color: '#666' + }, + cellIcon: { + height: 34, + width: 34, + borderRadius: 17 + } +}); +export default SubList; \ No newline at end of file diff --git a/Zip/back.png b/Zip/back.png new file mode 100644 index 0000000000000000000000000000000000000000..d85c2a5deb71faf8117ba861788a3c19c2e6e364 GIT binary patch literal 2602 zcmV+_3f1+AP)~*l?RWVkfaG~HYawR#U9&<<1J3S z&D@!LXYTz@A5su%OKOkDc2x0u9-Z_5&-dN)-Fwal{GUP#E#QlULLop1m53AojsQ|E zEiGxqQZg$oeHt1XBm(C{rdk3i3?7si{Q#_V;@vRDBtkZTZ63|Dv9PG5F2A7gV$6>J z!m^Xy2M!#Val9L1D>jB2bN~%LU4LBH{c9b^(FzKSQ+I9OaWp&Nxns+gEj-hh3%+8F zp@u8~TLZzYr(DNb8H+_F0&&u|B)<_@np;wG6M%CwjVond>hxe{G=@S20Cr{P(j-O>e_@X%a5+EuAWRMhn!i-|C`3f?XoOMHM;KqzF#+pDavvB%@#+`IyZBr->a2KUF~ z=Cgrd)`>UXcq6S`^R^WmLk$KPYYGaBek_E$!!%=x5Q1b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<{aVp9d zMcdnse_Xe6wOv$Pa%(giRZKG`Ij%!2m=skFczwR?q;1Opf&?0Gs zDA671ajU8;%+8Ke$LdzB?kX)?Tpy2{S}ZmtyN*jN1SyKD`wgQYY1;}j`w8f;sH~jo z?d{E!jL*sFv?UVh0FD9}Y|cPSZq9r6M~)m(CroGe>Grm7cbq)#9UmW)UB@9=mZ5n( zB57HJ@kG1_zyN?YW_}-_GtJ>}Vm5i_Z9caD&?k>ay3Rk@(cb188NT)^1^|*QvFo@| z%Sv1Ta30`h2KKVcm%^>BX@7ms+YEY3{cXQqytwMYudmxUUVGCrI}prrL4fPH1R&`1 z>9r(Dl?++|Mj<4g)t^4E!}W%3o8HxY#y!hduI{f~Qk^u6fJ;OWEWpg(U?5oM(Xq-`ttsqDhtm|63 zdFFk%4gl}H`{u-|+c&(qd}-ay1X?mRIVq={BoPR@?x$6&*DhUl%gRgV&UPH{jzm)F zzj@zx9+X|zT{ks3A-k?i08mm|=GLuPy*_mJy;Cp!;khH}#J?e~ z9DVT7$#0$RY#9Z*ZRG+bOSHUoi{*32n=QbZwdkoB#j- M07*qoM6N<$f}t<}kpKVy literal 0 HcmV?d00001 diff --git a/Zip/fold.png b/Zip/fold.png new file mode 100644 index 0000000000000000000000000000000000000000..6be8b7788277a3a87fcd6d0aa9062bc46c1ca5e1 GIT binary patch literal 535 zcmeAS@N?(olHy`uVBq!ia0vp^CLqkg1|*MGNWTVBEa{HEjtmSN`?>!lvNA9*p7V5Z z49Q@98)@x##6UoHvMtLkJ^|kaOBg$i8+I_T3SF9)p{mlgm!Zk{LXgrdju&AvNoy02 zO=_Ncbbrpl1#?a2RUG>^`}-V?#|$r)@@O!hYA{;B^GB9hZTpvdk3Y%i-cvr1s8@D2 z|4j7d17D9H{nA?d+yAt1b|PcP+o+sn%?)MC49(|Hzx+Jph2N=@`!1f`aqz}1(KCOg z&dE*encc;as#CWvVzz%qkI})bBRT7HGT0T5rk&I~sTQ(l)&vJ%j}C!AiB$npq!jr= zG1$>71g0_sT6xK^)gNmwJ9#6~hjH4;f-@iHy_Vc<^f@s8)D#Eivuo#1&dq)!yI|$I z_7~o}m355mr*Hc|mGPG6%hOZOhLq-QdU|htS$yTx=Jxf;+|oHaInUHs$~(`kZM!4M zkl3N<5lKjt7Cj45lVf}pWhI7hin%Lx)vOSN#t$d#0m+N71hm7xxqHc`S zYMex0dvaWDQCTtJ&;qWdHzqy^ZbfHrsO1X0d10x<$)7teeKB14_IK7TA)Uz9ALa=s zUG_6Qj-M2AxMKch?sKd)H8+gdjtPBRxfT}e9?1`+r>`zpk-Jh27_$rvp00i_>zopr E0Foc