This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function getXPathForElement(el, document) { | |
// not support that if el not existed in document yet(such as it not append to document before it mounted) | |
if (!document.contains(el)) { | |
return undefined; | |
} | |
let xpath = ''; | |
let pos; | |
let tmpEle; | |
let element = el; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const projectId = projectstable.selectedRow.data._id | |
const zip = new JSZip(); | |
const { Contents } = await listObjectsFromS3.trigger({ | |
additionalScope: { | |
projectId | |
} | |
}); | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
asset app.js 41.1 KiB [compared for emit] (name: app) | |
asset index.html 1000 bytes [compared for emit] | |
runtime modules 26.5 KiB 9 modules | |
./src/app/index.js 346 bytes [built] [code generated] | |
webpack 5.72.0 compiled successfully in 324 ms | |
assets by status 720 KiB [compared for emit] | |
assets by chunk 673 KiB (id hint: vendors) | |
asset vendors-node_modules_vue_compiler-dom_dist_compiler-dom_esm-bundler_js.js 279 KiB [compared for emit] (id hint: vendors) | |
asset vendors-node_modules_postcss-modules_build_index_js.js 260 KiB [compared for emit] (id hint: vendors) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
async function wrap(fn, thisCtx, ...ctx) { | |
return await new Promise(async (next, end) => { | |
next(await fn.call(thisCtx, ...ctx, next, end)) | |
}) | |
} | |
export class Middleware { | |
constructor(...middlewares) { | |
this.middlewares = middlewares | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function readBlob(blob) { | |
return new Promise((res, rej) => { | |
const reader = new FileReader() | |
reader.onloadend = function() { | |
res(reader.result) | |
} | |
reader.onerror = rej | |
reader.readAsDataURL(blob) | |
}) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export default { | |
name: "my-sitatic-site", | |
children: [ | |
{ | |
name: "assets", | |
children: [ | |
{ | |
name: "images", | |
children: [ | |
{ |
React | Vue |
---|---|
useState | data |
useMemo | data |
useEffect (with no dependency array) | mounted (once), beforeUpdate |
useEffect (with dependency array) | watch (immediate: true) |
return function for useEffect | destroyed |
useCallback | methods |
useLayoutEffect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.markdown-body { | |
font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Helvetica, Arial, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol; | |
font-size: 16px; | |
line-height: 1.5; | |
word-wrap: break-word | |
} | |
.markdown-body:before { | |
content: ""; | |
display: table |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
mode: 'development', | |
context: 'D:\\projects\\vue\\contentarchitect', | |
devtool: 'cheap-module-eval-source-map', | |
node: { | |
setImmediate: false, | |
dgram: 'empty', | |
fs: 'empty', | |
net: 'empty', | |
tls: 'empty', |
NewerOlder