切换导航条
切换导航条
当前项目
正在载入...
登录
术习电报
/
electron-vue-template
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
作者
umbrella22
2019-03-27 16:01:21 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
提交
f86aebf8cd54443e1df3ccc2b6ed09e6b633bbd0
f86aebf8
1 个父辈
2b52f30d
--no commit message
隐藏空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
7 行增加
和
4 行删除
src/index.ejs
src/renderer/components/LandingPage.vue
src/index.ejs
查看文件 @
f86aebf
...
...
@@ -2,7 +2,7 @@
<html>
<head>
<meta
charset=
"utf-8"
>
<title>
my-project
</title>
<title>
electron-vue-template
</title>
<
% if (htmlWebpackPlugin.options.nodeModules) { %>
<!-- Add `node_modules/` to global paths so `require` works properly in development -->
<script>
...
...
src/renderer/components/LandingPage.vue
查看文件 @
f86aebf
...
...
@@ -5,10 +5,10 @@
<div class="left-side">
<span class="title">Welcome to your new project!</span>
<system-information></system-information>
<div>
<div
v-if="textarray.length === 0"
>
<span>{{text}}</span>
</div>
<div v-for="(itme,index) in textarray" :key="index">
<div v-for="(itme,index) in textarray" :key="index"
v-else
>
<span>{{itme._id}}</span>
<span>{{itme.name}}</span>
<span>{{itme.age}}</span>
...
...
@@ -44,6 +44,7 @@ export default {
}),
methods: {
open(link) {
this.textarray.length
console.log(this.$electron);
},
setdata() {
...
...
@@ -63,13 +64,15 @@ export default {
.catch(err => console.log(err));
},
deledata(){
// dialog为electron实例,data则是显示需要的参数,fun是需要执行的函数,此选项不是为必选的
const dialog = this.$electron.remote.dialog
const data = {
title:'清除数据',
buttons:['OK', 'Cancel'],
message:'此操作会清空本地数据库中的所有数据,是否继续?'
}
api.MessageBox(dialog,data,this.$db.deleall({name:'yyy'})).then(res=>{
const fun = this.$db.deleall({name:'yyy'})
api.MessageBox(dialog,data,fun).then(res=>{
console.log(res)
})
},
...
...
请
注册
或
登录
后发表评论