06 2020 档案

摘要:了解v-bind指令 我们已经介绍了指令v-bind的基本用法以及它的语法糖,它的主要用法是动态更新HTML元素上的属性 在数据绑定中,最常见的两个需求就是元素的样式名称class和内联样式style的动态绑定,它们也是HTML的属性,因此可以使用v-bind指令。我们只需要用v-bind计算出表达 阅读全文
posted @ 2020-06-25 23:26 easy5 阅读(193) 评论(0) 推荐(0) 编辑
摘要:计算属性 计算属性:所有的计算属性都以函数的形式写在Vue实例内的computed选项内,最终返回计算后的结果。 有缓存的功能 有get和set 每一个计算属性都包含一个getter和一个setter,我们上面的两个示例都是计算属性的默认用法,只是利用了getter来读取。在你需要时,也可以提供一个 阅读全文
posted @ 2020-06-25 21:57 easy5 阅读(128) 评论(0) 推荐(0) 编辑
摘要:安装vue cnpm install vue 数据绑定 代码清单:charp-02/2.html <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <title>Vue 示例</title> </head> <body> <div id="ap 阅读全文
posted @ 2020-06-25 13:53 easy5 阅读(149) 评论(0) 推荐(0) 编辑
摘要:源码 github:https://github.com/icarusion/vue-book 笔记: https://github.com/K-Artisan/vue.js-in-ation-book-note 系列目录 什么是Vue.js 使用Vue.js可以让Web开发变得简单,同时也颠覆了传 阅读全文
posted @ 2020-06-25 11:38 easy5 阅读(212) 评论(0) 推荐(0) 编辑
摘要:#《Electron 跨平台开发实战》系列 官方源码地址:https://github.com/electron-in-action/ 我的源码地址:https://github.com/K-Artisan/electron-in-action-book-note (算了,没钱买Mac) 阅读全文
posted @ 2020-06-24 22:32 easy5 阅读(216) 评论(0) 推荐(0) 编辑
摘要:收集崩溃报告 Electron 内置了崩溃报告功能 设置崩溃报告 Electron在底层使用以下两个崩溃报告系统; macOS系统使用 Crashpad,需要同时在主进程和渲染进程中启动 Windows和Linux使用Breakpad,只需要在主进程中启动 创建配置和启动崩溃的代码文件 ./app/ 阅读全文
posted @ 2020-06-24 20:48 easy5 阅读(632) 评论(0) 推荐(0) 编辑
摘要:Electron Packager 设置 Electron Packager 安装 cnpm install --save-dev electron-packager npm:https://www.npmjs.com/package/electron-packager github:https:/ 阅读全文
posted @ 2020-06-24 11:03 easy5 阅读(311) 评论(0) 推荐(0) 编辑
摘要:设置Spectron和测试运行器 安装 spectron和mocha cnpm install --save-dev spectron cnpm install --save-dev mocha ... "devDependencies": { "mocha": "^8.0.1", "spectro 阅读全文
posted @ 2020-06-20 15:28 easy5 阅读(1211) 评论(0) 推荐(0) 编辑
摘要:IndexedDB IndexedDB 是由Chromeinu提供的NoSQL数据库,它的键和值可以是任何类型的JavaScript类型 第三方访问 IndexedDB 与IndexedDB 的所有交互都是异步进行的,直接使用事件来实现异步处理,这导致代码难以阅读和理解, idb库 github:h 阅读全文
posted @ 2020-06-20 10:30 easy5 阅读(4352) 评论(0) 推荐(0) 编辑
摘要:electron-rebuild 安装electron-rebuild cnpm install electron-rebuild --save-dev electron支持原生模块 https://www.electronjs.org/docs/tutorial/using-native-node 阅读全文
posted @ 2020-06-19 16:46 easy5 阅读(868) 评论(0) 推荐(0) 编辑
摘要:#项目代码 https://github.com/electron-in-action/clipmaster-9000/tree/completed-example 代码解析 electron9.x 代码更新 从源码下载的使用目前最新的版本 electron9.x、menubar 9.x , 无法运 阅读全文
posted @ 2020-06-18 19:35 easy5 阅读(451) 评论(0) 推荐(0) 编辑
摘要:项目代码 https://github.com/electron-in-action/clipmaster 创建Tray main.js const path = require('path'); const { app, Menu, Tray } = require('electron'); le 阅读全文
posted @ 2020-06-17 16:40 easy5 阅读(452) 评论(0) 推荐(0) 编辑
摘要:在渲染进程(UI界面)中使用shell模块 //在文件管理器中打开 const { ..., shell } = require('electron'); const showFile = () => { if (!filePath) { return alert('This file has no 阅读全文
posted @ 2020-06-16 17:38 easy5 阅读(481) 评论(3) 推荐(1) 编辑
摘要:应用菜单 替换设置应用程序菜单 创建应用菜单模块 创建一个新的名为application-menu.js文件, const { app, BrowseWindow, Menu, shell } = require('electron'); const mainProcess = require('. 阅读全文
posted @ 2020-06-16 02:18 easy5 阅读(266) 评论(0) 推荐(0) 编辑
摘要:项目代码 https://github.com/electron-in-action/firesale/tree/chapter-6 #代码解析 窗口标题 根据文件路径获取文件名: path.basename(filePath) 设置窗口标题:currentWindow.setTitle(title 阅读全文
posted @ 2020-06-12 14:46 easy5 阅读(445) 评论(0) 推荐(0) 编辑
摘要:项目代码 https://github.com/electron-in-action/firesale/tree/chapter-5 代码解析 重构打开文件函数 添加参数, targetWindow 表示当前窗口 main.js const openFile = exports.openFile = 阅读全文
posted @ 2020-06-12 12:18 easy5 阅读(448) 评论(0) 推荐(0) 编辑
摘要:electron集成vue 可供的选择 Vue CLI Plugin Electron Builder 开源地址;https://github.com/nklayman/vue-cli-plugin-electron-builder electron-vue 开源地址:https://github. 阅读全文
posted @ 2020-06-10 12:50 easy5 阅读(165) 评论(0) 推荐(0) 编辑
摘要:项目源码 https://github.com/electron-in-action/firesale/tree/chapter-4 目标 eletron dialog模块 主进程与渲染进程通信 electron remote模块 webContents渲染进程发送消息 electron ipcRe 阅读全文
posted @ 2020-06-10 11:24 easy5 阅读(440) 评论(0) 推荐(0) 编辑
摘要:项目简介 markdown 转化为 html 项目结构 项目结构 第三方库 Maked 第三方库Marked:用于实现 MakeDown转化为 HTML npm install marked 项目代码 https://github.com/electron-in-action/firesale 代码 阅读全文
posted @ 2020-06-09 22:22 easy5 阅读(294) 评论(0) 推荐(0) 编辑
摘要:#《Electron 跨平台开发实战》系列 官方源码地址:https://github.com/electron-in-action/ 我的源码地址:https://github.com/K-Artisan/electron-in-action-book-note 项目BookMark 源码地址:h 阅读全文
posted @ 2020-06-09 22:09 easy5 阅读(839) 评论(0) 推荐(0) 编辑
摘要:主进程和渲染进程 在electron中,GUI的相关的模块仅在主进程中可用 若渲染进程要完成GUI操作,有两种方式: 渲染进程向主进程发送消息,让主进程完成相应的操作 通过渲染进程的remote模块完成相应的操作 调试主进程 在VSC中,点击左侧的菜单栏的 debug图标,添加launch.json 阅读全文
posted @ 2020-06-09 21:32 easy5 阅读(276) 评论(0) 推荐(0) 编辑
摘要:#搭建环境 ##yarn 安装 yarn npm install -g yarn #创建项目 创建Node.js项目 yarn init 安装electron 使用淘宝镜像 yarn config set ELECTRON_MIRROR https:cdn.npm.taobao.org/dist/e 阅读全文
posted @ 2020-06-08 13:14 easy5 阅读(224) 评论(0) 推荐(0) 编辑
摘要:添加 bootstrap cnpm install bootstrap --save 构建项目结构 在根目录下创建一个文件夹renderder,用于存放渲染进程 / ├── main.js ├── package.json ├── renderder/ ├── index.html #主页 ├── 阅读全文
posted @ 2020-06-07 21:31 easy5 阅读(644) 评论(0) 推荐(0) 编辑
摘要:调试渲染进程 调试渲染进程使用 Chrome 开发者工具,打开方式: Ctr+Shift+I 使用代码打开: // Open the DevTools. mainWindow.webContents.openDevTools() 可能的问题: 开发者工具提示: Electron Security W 阅读全文
posted @ 2020-06-07 16:55 easy5 阅读(2543) 评论(0) 推荐(0) 编辑
摘要:electron 资料 开源地址:https://github.com/electron 示例:https://github.com/electron/electron-quick-start 文档:https://www.electronjs.org/docs 教程:https://www.w3c 阅读全文
posted @ 2020-06-07 16:18 easy5 阅读(474) 评论(0) 推荐(0) 编辑
摘要:#基本配置 Startup.cs public class Startup { public void ConfigureServices(IServiceCollection services) { services.AddRazorPages(); //RazorPages .... } pub 阅读全文
posted @ 2020-06-02 13:19 easy5 阅读(352) 评论(0) 推荐(0) 编辑
摘要:为什么使用ViewComponet PartView 不能实现业务逻辑 ChildAction 要使用Controller的整个生命周期,开销大 如何使用 新建ViewComponent类: 新建文件ViewComponents,在其里面新建类 CompanySummaryViewComponent 阅读全文
posted @ 2020-06-02 12:57 easy5 阅读(140) 评论(0) 推荐(0) 编辑
摘要:配置文件优先级 1.appsettings.json 2.appsettings..json,比如: appsettings.Development.json 3.环境变量 4.命令行 越靠后,优先级越高,将覆盖前者 添加自定义配置 appsettings.json: { "Logging": { 阅读全文
posted @ 2020-06-02 12:46 easy5 阅读(253) 评论(0) 推荐(0) 编辑
摘要:#Layout Shared/_Layout.cshtml <!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width" /> <title>@ViewBag.Title</title> <envir 阅读全文
posted @ 2020-06-02 12:21 easy5 阅读(145) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示