摘要:
使用 Workers 構建無服務器功能。使用 Pages 部署網站和全棧應用程序一、Workers:1、官網注冊登錄,左側菜單點擊"Workers和Pages"——創建Workers 2、部署 "Hello World" 腳本,部署后點擊編輯worker代碼 3、替換代碼,https://githu
閱讀全文
posted @ 2023-10-24 15:07
魷魚須須
閱讀(3386)
推薦(0)
摘要:
// 1、項目根目錄新建deploy.js并添加配置,方式二選一 // 2、package.json修改build配置: "build": "vue-cli-service build && node ./deploy" // 3、運行命令npm run build打包發布 // *、使用私鑰時在根
閱讀全文
posted @ 2022-08-12 16:34
魷魚須須
閱讀(406)
推薦(0)
摘要:
一:阿里qiankun 基于 single-spa,采用了微前端的技術方案,通過主應用來管理和加載多個子應用。主應用和子應用之間通過自定義協議通信,實現了跨應用的狀態共享。 1、主main.js import { registerMicroApps, start } from 'qiankun';
閱讀全文
posted @ 2022-07-12 16:12
魷魚須須
閱讀(1823)
推薦(0)
摘要:
一、遞歸 function deepClone(obj) { if (obj null || typeof obj !== 'object') { return obj; } let clone = Array.isArray(obj) ? [] : {}; for (let key in obj)
閱讀全文
posted @ 2022-07-08 17:51
魷魚須須
閱讀(69)
推薦(0)
摘要:
1、vue項目router設置為history模式 const router = new VueRouter({ mode: "history", base: process.env.BASE_URL, routes, }); 2、服務器nginx.config修改配置 location / { r
閱讀全文
posted @ 2022-02-08 15:27
魷魚須須
閱讀(155)
推薦(0)
摘要:
// 創建地圖 initMap() { let container = this.$refs.map this.map = new AMap.Map(container, { zoom:18,//級別 center: [120.257173,30.205769],//中心點坐標 viewMode:'
閱讀全文
posted @ 2021-12-28 11:39
魷魚須須
閱讀(505)
推薦(0)
摘要:
1、安裝axios插件 "use strict"; // import Vue from "vue"; import axios from "axios"; import { createApp } from "vue"; const app = createApp({}); // Full con
閱讀全文
posted @ 2021-12-21 19:06
魷魚須須
閱讀(857)
推薦(0)
摘要:
一、新增運行指令和環境文件 1、參考vue官網修改package.json,例如 "serve-ops": "vue-cli-service serve --mode ops-dev", "serve-cloud": "vue-cli-service serve --mode cloud-dev",
閱讀全文
posted @ 2021-08-04 14:40
魷魚須須
閱讀(454)
推薦(0)
摘要:
import html2canvas from 'html2canvas' import jsPDF from 'jspdf' html2canvas(document.body).then( canvas => { var contentWidth = canvas.width; var cont
閱讀全文
posted @ 2021-03-11 17:41
魷魚須須
閱讀(220)
推薦(0)
摘要:
一、windows客戶端 1、任務管理器查看cpu是否開啟虛擬化,windows功能開啟Hyper-v 2、安裝docker客戶端,安裝Windows Subsystem for Linux (WSL) 3、安裝docker可視化portainer 本地安裝local docker run -d -
閱讀全文
posted @ 2021-02-26 15:35
魷魚須須
閱讀(236)
推薦(0)
摘要:
1、官網下載開發版固件升級2、登錄小米賬號獲取ssh密碼3、winscp登錄路由器將breed放入/tmp4、ssh終端輸入mtd -rwrite /tmp/breed.bin Bootloader5、拔電后再通電按住復位鍵等藍燈閃爍6、輸入192.168.1.1進入breed恢復控制臺7、如果ke
閱讀全文
posted @ 2021-02-17 00:45
魷魚須須
閱讀(1955)
推薦(0)
摘要:
import SockJS from 'sockjs-client'; import Stomp from 'stompjs'; ws(url, subUrl) { return new Promise((resolve, reject) => { let socket = new SockJS(u
閱讀全文
posted @ 2021-01-14 16:32
魷魚須須
閱讀(1101)
推薦(0)
摘要:
1、安裝全局腳手架 npm i -g @vue/cli 2、創建項目 vue create [項目名稱] 3、安裝常用插件 vue add element vue add router vue add axions vue add vuex 4、安裝scss插件(按需) npm i --save s
閱讀全文
posted @ 2020-09-24 14:54
魷魚須須
閱讀(219)
推薦(0)
摘要:
// 節流 let throttle = function(func, delay) { let timer = null; return ()=> { if (!timer) { timer = setTimeout(() => { ...
閱讀全文
posted @ 2019-10-28 15:49
魷魚須須
閱讀(225)
推薦(0)
摘要:
/* 1、新建項目,cd到項目目錄npm init完成package.json的初始化 2、編輯package.json,修改script配置為{"start": "electron"} 3、npm i electron安裝electron,安裝不成功可以用cnpm 4、新建index.js作為主入口js,與package.json設置保持一致 5、編輯index.js,參考官方demo 6、n...
閱讀全文
posted @ 2019-01-11 17:08
魷魚須須
閱讀(582)
推薦(0)
摘要:
Document 0% setTimeout setInterval requestAnimationFrame
閱讀全文
posted @ 2018-12-26 11:08
魷魚須須
閱讀(752)
推薦(0)
摘要:
// 數據屬性 var obj = { name: 'tom' } // 查看數據屬性 Object.getOwnPropertyDescriptor(obj, 'name') // {value: "tom", writable: true, enumerable: true, configurable: true} // 修改數據屬性 // Object.defineProper...
閱讀全文
posted @ 2018-11-23 14:23
魷魚須須
閱讀(287)
推薦(0)
摘要:
Document 花名冊 姓名 性別 年齡 張三 男 18 ...
閱讀全文
posted @ 2018-10-31 10:31
魷魚須須
閱讀(1589)
推薦(0)
摘要:
一、制作OSX安裝盤(Windows環境下) 準備U盤、DiskGenius、TranMac、系統文件dmg 鏈接: https://pan.baidu.com/s/1i3mk700aTMfnrsw9P8QT5A 密碼: p6tj 1、打開DiskGenius將U盤設置成GPT分區(轉換成GUID分區) 2、打開TranMac右鍵U盤單擊Fromat Disk for Mac 3、右鍵U盤單擊R...
閱讀全文
posted @ 2018-09-17 15:21
魷魚須須
閱讀(665)
推薦(0)
摘要:
// 對象Object var obj = {key:'value'} // 判斷自身屬性 obj.hasOwnProperty('key') // 獲取隱式屬性,取代__proto__ Object.getPrototypeOf(obj) // 獲取屬性集合 Object.getOwnPropertyNames(obj) // 自身屬性包含hasOwnProperty ({}).hasOwnP...
閱讀全文
posted @ 2018-08-23 18:34
魷魚須須
閱讀(289)
推薦(0)
posted @ 2018-07-31 18:06
魷魚須須
閱讀(3422)
推薦(0)
摘要:
// XMLHttpRequest請求 function xhr (url, data) { var xhr = new XMLHttpRequest() if (xhr) { xhr.open('POST', url, true) // 默認為異步true、同步為false xhr.setRequestHeader('Content-Type',...
閱讀全文
posted @ 2018-06-20 23:57
魷魚須須
閱讀(222)
推薦(0)
posted @ 2018-05-24 14:47
魷魚須須
閱讀(151)
推薦(0)
摘要:
// 字面量寫法 var obj={}; obj.a=function(){ console.log("a"); return this; }; obj.b=function(){ console.log("b"); return this; }; obj.a().b(); ...
閱讀全文
posted @ 2018-04-10 21:09
魷魚須須
閱讀(344)
推薦(0)
摘要:
//生成器( generator)是能返回一個迭代器的函數 function *createIterator() { yield 1; yield 2; yield time(); yield time(); } function time() { return new Date(); ...
閱讀全文
posted @ 2018-03-27 20:57
魷魚須須
閱讀(256)
推薦(0)
摘要:
const express = require('express'); const app = express(); const ws = require('ws').Server; const wss = new ws({port: 3001}); var sockets = []; wss.on('connection', function(ws) { ws.send('連接成功'...
閱讀全文
posted @ 2018-02-05 16:14
魷魚須須
閱讀(258)
推薦(0)
摘要:
// 1、閉包立即執行函數 var module = (function(){ var name = 'xiaoming'; var print = () => console.log(name) return { print: print}; })(); module.print(); // 2、AMD規范(保存為math.js) define(function ()...
閱讀全文
posted @ 2018-01-17 16:11
魷魚須須
閱讀(258)
推薦(0)
摘要:
const http = require('http'); const express = require('express'); const mysql = require('mysql'); const cluster = require('cluster'); const numCPUs = require('os').cpus().length; const app = express(...
閱讀全文
posted @ 2017-12-15 17:41
魷魚須須
閱讀(1183)
推薦(0)
摘要:
const http = require('http'); const cheerio = require('cheerio'); const fs = require('fs'); const mysql = require('mysql'); const child_process = require('child_process'); const urls = []; const data...
閱讀全文
posted @ 2017-12-13 18:00
魷魚須須
閱讀(165)
推薦(0)
摘要:
!function() { // 創建影藏文本域 var textarea = document.createElement('textarea'); textarea.id = 'text'; textarea.value = new Date(); textarea.style.position = 'a...
閱讀全文
posted @ 2017-11-07 16:13
魷魚須須
閱讀(280)
推薦(0)
摘要:
// 1、webpack使用配置 var path = require('path'); var webpack = require('webpack'); module.exports = { /* 輸入文件 */ entry: { index:'./src/main.js' }, output: { /* 輸出目錄,沒有則新建 */ path: p...
閱讀全文
posted @ 2017-10-10 15:27
魷魚須須
閱讀(265)
推薦(0)
摘要:
/* 1、下載xampp和wordpress 2、解壓wordpress后放xampp\htdocs目錄下 3、安裝后打開xampp,啟動apache和mysql 4、打開localhost/phpmyadmin/查看mysql 5、打開localhost/wordpress界面完成web初始化配置 6、下載Easy WP SMTP插件,通過郵箱注...
閱讀全文
posted @ 2017-09-28 13:54
魷魚須須
閱讀(160)
推薦(0)
摘要:
// 新建Promise function getTime(timeout) { return new Promise((resolve, reject)=>{ var now = new Date() setTimeout(() => { if(timeout) { resolve(now) ...
閱讀全文
posted @ 2017-08-02 11:31
魷魚須須
閱讀(167)
推薦(0)
摘要:
var app = angular.module("myApp", ['ui.router']); app.config(function ($stateProvider, $urlRouterProvider) { $urlRouterProvider.when("", "/home"); $stateProvider .stat...
閱讀全文
posted @ 2017-07-22 15:23
魷魚須須
閱讀(290)
推薦(0)
摘要:
//對象字面量寫法 var fn = { name: 'hello world', fn1: function() { console.log(this.name); } }; fn.fn1(); //prototype原型寫法 function Fn() { this.name = 'hello world'; this.fn1 = f...
閱讀全文
posted @ 2017-07-22 15:16
魷魚須須
閱讀(279)
推薦(0)