摘要: 源码 打印HTML格式 main进程中 const path = require('path') const {BrowserWindow, app, ipcMain} = require('electron') const isPrdEnv = process.env.NODE_ENV 'prod 阅读全文
posted @ 2021-02-26 10:13 demo_you 阅读(2158) 评论(1) 推荐(1)
摘要: const arrayTreeSetLevel = (array, levelName = 'level', childrenName = 'children') => { if (!Array.isArray(array)) return [] const recursive = (array, 阅读全文
posted @ 2021-01-25 15:52 demo_you 阅读(381) 评论(0) 推荐(1)
摘要: const findPatentValue = (array, value, valueName = 'value', childrenName = 'children') => { if (!value || !Array.isArray(array)) return [] const resul 阅读全文
posted @ 2021-01-19 14:49 demo_you 阅读(541) 评论(0) 推荐(0)
摘要: 在modules(例如:vuex, route的模块化)的index.js中键入以下代码可以自动化导出文件夹内全部模块 webpack const files = require.context('.', false, /\.js$/) const modules = {} files.keys() 阅读全文
posted @ 2021-01-14 10:06 demo_you 阅读(415) 评论(0) 推荐(0)
摘要: css #drag { width: 300px; height: 200px; border: 1px dashed #ccc; border-radius: 4px; overflow: hidden; } #drag:hover { border-color: cyan; } #drag.dr 阅读全文
posted @ 2021-01-11 17:17 demo_you 阅读(181) 评论(0) 推荐(0)
摘要: html, body { margin: 0; padding: 0; height: 100%; width: 100%; overflow: hidden; } #upload { position: fixed; top: 0; left: 0; } audio { position: fix 阅读全文
posted @ 2021-01-07 14:27 demo_you 阅读(698) 评论(0) 推荐(0)
摘要: <template> <ul> <li v-for="item in items" :key="item">{{ item }}</li> </ul> </template> <script> // 防抖 const debounce = (fn, delay) => { let timer = n 阅读全文
posted @ 2020-12-25 11:57 demo_you 阅读(391) 评论(0) 推荐(0)
摘要: move.js const move = { install(Vue) { Vue.directive('move', { inserted(el, binding) { const { x = 0, y = 0, zIndex = 100 } = binding.value || Object.c 阅读全文
posted @ 2020-12-25 11:29 demo_you 阅读(462) 评论(0) 推荐(0)
摘要: file形式访问 <body> <button id="takePhoto">takePhoto</button> <div id="app"></div> <script> class Camera { constructor(root, width = 480, height = 320) { 阅读全文
posted @ 2020-12-14 19:42 demo_you 阅读(726) 评论(0) 推荐(0)
摘要: components 下 loading 下 Loading.vue <template> <transition name="fade"> <div class="loading_container" v-show="visible"> <div class="loading_wrapper"> 阅读全文
posted @ 2020-12-14 10:42 demo_you 阅读(340) 评论(0) 推荐(0)