Description: "drive" measure used to display all drives on your computer ,include USB drive when USB inserted
Propertys
isAllDrive
Whether to automatically detect all drives. users can change it by settings. default value is "true".
drives
if "isAllDrive" is false, drive measure will only detect the drives that include "drives", for example this code will only detect the drives of "C,E,H"
all the drives that detected are in items,every item include these data tags:
volume //the drive item volume namelabel //the drive item label namedriveType //0=unknown,2=Removeable(USB),3=fixed(HDD),4-remote,5=CDROM,6=RAM Disktotal //the drive item totole size with auto scale unit,e.g. 8.2G , 1.9Tused //the drive item used size with auto scale unit,e.g. 8.2G , 1.9Tfree //the drive item free size with auto scale unit,e.g. 8.2G , 1.9TtotalM //the drive item total MB size without unit,e.g. 8.2 , 1900usedM //the drive item used MB size without unit,e.g. 8.2 , 1900freeM //the drive item freeM MB size without unit,e.g. 8.2 , 1900totalG //the drive item total GB size without unit,e.g. 8.2 , 1900usedG //the drive item used GB size without unit,e.g. 8.2 , 1900freeG //the drive item freeM GB size without unit,e.g. 8.2 , 1900percent //the drive item used size percent,e.g. 82 , 19freePercent //the drive item free size percent,e.g. 18 , 81tenth //the drive item used size tenth (0~10),e.g. 8 , 2freeTenth //the drive item free size tenth (0~10),e.g. 2 , 8open //Used to bind the onclick event to open this driveeject //Used to bind the onclick event to eject this drive(only for USB and CDROM)
e.g. List all the drives volume on your computer: <li v-for="item in drive1.items"> {{ item.volume }} </li>
e.g. Click to open the drive item with item.open :
<li v-for="item in drive1.items" v-bind:onclick="item.open" > {{ item.volume }} </li>
e.g. Click to eject the drive item with item.eject if the drive is USB or CDROM:
<li v-for="item in drive1.items" v-bind:onclick="item.eject" > {{ item.volume }} </li>
Other data tags
allTotal //all drives that detected total size with auto scale unit,e.g. 1.9T,820G
allUsed //all drives that detected used size with auto scale unit,e.g. 1.9T,820G
allFree //all drives that detected free size with auto scale unit,e.g. 1.9T,820G
allTotalM //all drives that detected total MB size without unit,e.g. 1900,82
allUsedM //all drives that detected used MB size without unit,e.g. 1900,82
allFreeM //all drives that detected free MB size without unit,e.g. 1900,82
allTotalG //all drives that detected total GB size without unit,e.g. 1900,82
allUsedG //all drives that detected used GB size without unit,e.g. 1900,82
allFreeG //all drives that detected free GB size without unit,e.g. 1900,82
allTotalT //all drives that detected total TB size without unit,e.g. 1900,82
allUsedT //all drives that detected used TB size without unit,e.g. 1900,82
allFreeT //all drives that detected free TB size without unit,e.g. 1900,82
allPercent //all drives that detected used size percent,e.g. 82 , 19
allFreePercent //all drives that detected free size percent,e.g. 18 , 81
allTenth //all the drives used size tenth (0~10),e.g. 8 , 2
allFreeTenth //all the drives free size tenth (0~10),e.g. 2 , 8
e.g. display the total space size of all the disk drives on your computer
<div id="widget">{{ drive1.allTotal }} </div>