qq三国,代码-本地小说开发(三),熬夜的危害

频道:社会万象 日期: 浏览:278

header.vue


<template>
<div class="header">
<div class="logo">大爷阅读器</div>
<div v-if="bookName === ''" class="importBook">
<inpuqq三国,代码-本地小说开发(三),熬夜的损害t style="display: none" ref="fileInfo" type="file" @change="getTxtInfo">
<div @click="getTxt" class="headerBtn">
<i class="el-icon-plus"></i>
</div>
</div>
<div v-else class="bookNameqq三国,代码-本地小说开发(三),熬夜的损害">{{bookName}}</div>
公主调教 <div class="handler">
<div class="headerBtn">
<i class="el-icon-minus"></i&g浛洸t;
</div>
&湿气重怎么办lt;div class=题西林壁古诗"headerBtn">
<i class="el-icon-full-screen"></i>
</div>
<div class="headerBtn">
<车的标志;i class="el-icon-switch-button"></i>
</div>
</div>
</div>
</template>
<script>
import Control from '../plugins/control'
export default {
name: "Header",
//承受qq三国,代码-本地小说开发(三),熬夜的损害父组件参数
props: ['bookName'],
methods: {
getTxt() {
this.$refs.fileInfo.click();
},
getTxtInfo() {
let file = this.$refs.fileInfo.files[0]
if (file) {
let fileType = file.type;
if (fileType !== 'text/plain') {
alert('请挑选txt文件');
return;
} else {

let bookName = file.name;
let size = file.size;
let src = file.path;
let id = Date.parse(new Date());
let bookItem = {
id: id,
bookName: bookName,
size: size,
tab: '默许标签小酥肉的家常做法',
src: src
}尕
Control.create(bookItem)
}
}
this.$refs.fileInfo.value = ''
}

}


}
</script>
<style scoped>
.header {
display:qq三国,代码-本地小说开发(三),熬夜的损害 flex;
height: 30px;
width: 100%;
background: #010100;
}

.logo {
display: flex;qq三国,代码-本地小说开发(三),熬夜的损害
有妖气寒舞自己相片 width: 100px;
justify-content: center;
align-items: center;
color: #DE434E;
}

.bookName, .importBook {
display: flex;
align-items: center;
flex: 1;
}

.bookName {
color: #0542AF;
font-size: 14px;
align-items: center;
padding-left: 10px;
}

qq三国,代码-本地小说开发(三),熬夜的损害 .headerBtn {
color: #9F9F9F;
display: flex;
height: 30px;
width: 30px;
justify-content: center;
align-items: center;
font-size: 16px;
cursor: pointer;
}

.headerBtn:hover {
background: #9F9F9F;
color: #fff;
}

.handler {
display: flex;
width: 100px;
justify-content: flex-end;
}

.el-button {
background: rgba(0, 0, 0, 0);
border-color: rgba(0, 0, 0, 0);
}
</style>


booklist.vue

<template>
<div class="bookList">
<div class="tabs">
<div class="tabsBt王也n">
<div>
caoorn<i class="el-icon-edit"></i>
</div>
<div>
<i class="el-ico莫奈n-share"></i>
</div>
<div>
<i class="el-icon-delete"></i>
</div>
</div>
<div class="tabList">
<el-button type="text">默许标签</el-button>
<el-button type="text电索">文字按钮</el-button>
<el-button type="text">文字按钮</el-button>
<e5号线l-button type="text">文字按钮</el-button>
</div>
</div>
<div class="lists">
<el-table
:data="tableData"
highlight-current-row
@row-dblclick="dblclickRow"
强奸幼女 height="100%"
style="width: 100%">
<el-table-column
prop="bookName"
label="书名"
width="180">
</el-table-column>
<el-table-column
prop="date"
label="日期"
width="180">
</el-table-column>
<el-table-column
prop="tab"
label="标签">
</el-table-column>
<el-table-column
prop="size"
label="巨细">
</el-table-column>
<el-table-column
prop="src"
label="地址">
</el-table-column>
</el-table>
</div>
</div>
</template>
<script>
export default {

name: "BookLists",
data() {
return {
tableData: require('../plugins/bookList')
}
},
methods: {
dblclickRow(row) {
// console.log(row.name)
// console.log(row.src)
//App.vue传参数
this.$emit('toRead',row.name)
}
}
}
</script>
<style>
.bookList {
display: flex;
flex-direction: row;
position: absolute;
top: 30px;
left: 0;
bottom: 0;
right: 0;
background: rgba(0, 0, 0, .9);
}

.tabs {
display: flex;
width: 200px;
flex-direction: column;
height: 100%;
position: relative;
background: #010100;
}

.lists {
java学习display: flex;
flex: 1;
}

.tabsBtn {
display: flex;
justify-content: center;
position: absolute;
top: 0;
left: 0;
height: 30px;
width: 100%;
}

.tabsBtn div {
display: flex;
flex: 1;
justify-content: center;
align-items: center;
font-size: 16px;
color: #9F9F9F;
cursor: pointer;
}

.tabsBtn div:hover {
color: #fff;
}

孙光骏违规 .tabList {
display: flex;
flex-direction: column;
position: absolute;
top: 30px;
bottom: 0;
left: 0;
right: 0;
overflow: auto;
padding-top: 15px;
}

.el-button + .el-button {
margin-left: 0 !important;
}

.el-table, .el-table__expanded-cell {
background: rgba(0, 0, 0, 0) !important;
}

.el-table th, .el-table tr {
background: rgba(0, 0, 0, 0) !important;
}

.el-table td, .el-table th.is-leaf {
border-bottom: 1px solid rgba(0, 0, 0, 0) !important;
color: #00C100;
}

.el-table--enable-row-hover .el-table__body tr:hover > td {
background-color: #605D5D !important;
}
</style>


control.js

const fs = require('fs')
const path = 'src/plugins/bookList.json'
export default {

//
create: function (e) {
console.log(e)

fs.readFile(pat纽卡斯尔大学h, (err, data) => {
if (err) throw err;
let newData = JSON.parse(data.toString())
newData.unshift(eqq三国,代码-本地小说开发(三),熬夜的损害)
console.log我和恶魔的h日子(newData);
newData = JSON.stringify(newData)
英豪联盟簿本 fs.writeFile(path,newData,(err,data)=>{
if (err) throw err;
console.log('成功!');
})
})

},
//删去
delete: function () {

}

}


其他文件应该没有变,能够看《代码-本地小说开发(二)》






热门
最新
推荐
标签