敲出来的真理-vue引入传统js,传统JavaScript转es格式,ribbon.js转vue

Vue承诺::heart_with_ribbon:可组合的承诺和承诺作为组成部分 承诺 履行您的诺言 :ribbon: 帮助我以可持续的方式继续致力于开源 :rocket: 。 每月只需​​$ 1,。 银牌赞助商 青铜赞助商 安装 npm install vue-promised # or yarn add vue-promised 动机 当处理异步请求(例如通过API调用获取内容)时,您可能希望使用微调框显示加载状态,处理错误,甚至隐藏所有内容,直到至少经过200毫秒,以便用户看不到加载微调框闪烁该请求花费的时间很少。 这是一些样板,您需要针对每个所需的请求重复此操作: < template> < div> < p xss=removed>Error: {{ err 立即下载

首先建议在操作前阅读下es6的规范,详细了解下模块 Module 的语法

ES6 入门教程https://es6.ruanyifeng.com/#README代码参考

 转 es 前

(function (name, factory) {
    if (typeof window === "object") { window[name] = factory(); }
})("Ribbons", function () {
    var _w = window, _b = document.body, _d = document.documentElement; var random = function () {
        if (arguments.length === 1) {
            if (Array.isArray(arguments[0])) { var index = Math.round(random(0, arguments[0].length - 1)); return arguments[0][index]; }
            return random(0, arguments[0]);
        } else
            if (arguments.length === 2) { return Math.random() * (arguments[1] - arguments[0]) + arguments[0]; }
        return 0;
    }; var screenInfo = function (e) { var width = Math.max(0, _w.innerWidth || _d.clientWidth || _b.clientWidth || 0), height = Math.max(0, _w.innerHeight || _d.clientHeight || _b.clientHeight || 0), scrollx = Math.max(0, _w.pageXOffset || _d.scrollLeft || _b.scrollLeft || 0) - (_d.clientLeft || 0), scrolly = Math.max(0, _w.pageYOffset || _d.scrollTop || _b.scrollTop || 0) - (_d.clientTop || 0); return { width: width, height: height, ratio: width / height, centerx: width / 2, centery: height / 2, scrollx: scrollx, scrolly: scrolly }; }; var mouseInfo = function (e) { var screen = screenInfo(e), mousex = e ? Math.max(0, e.pageX || e.clientX || 0) : 0, mousey = e ? Math.max(0, e.pageY || e.clientY || 0) : 0; return { mousex: mousex, mousey: mousey, centerx: mousex - screen.width / 2, centery: mousey - screen.height / 2 }; }; var Point = function (x, y) { this.x = 0; this.y = 0; this.set(x, y); }; Point.prototype = {
        constructor: Point, set: function (x, y) { this.x = x || 0; this.y = y || 0; }, copy: function (point) { this.x = point.x || 0; this.y = point.y || 0; return this; }, multiply: function (x, y) { this.x *= x || 1; this.y *= y || 1; return this; }, divide: function (x, y) { this.x /= x || 1; this.y /= y || 1; return this; }, add: function (x, y) { this.x += x || 0; this.y += y || 0; return this; }, subtract: function (x, y) { this.x -= x || 0; this.y -= y || 0; return this; }, clampX: function (min, max) { this.x = Math.max(min, Math.min(this.x, max)); return this; }, clampY: function (min, max) { this.y = Math.max(min, Math.min(this.y, max)); return this; }, flipX: function () { this.x *= -1; return this; }, flipY: function () { this.y *= -1; return this; }
    }; var Factory = function (options) { this._canvas = null; this._context = null; this._sto = null; this._width = 0; this._height = 0; this._scroll = 0; this._ribbons = []; this._options = { colorSaturation: "80%", colorBrightness: "60%", colorAlpha: 0.65, colorCycleSpeed: 6, verticalPosition: "center", horizontalSpeed: 200, ribbonCount: 3, strokeSize: 0, parallaxAmount: -0.5, animateSections: true }; this._onDraw = this._onDraw.bind(this); this._onResize = this._onResize.bind(this); this._onScroll = this._onScroll.bind(this); this.setOptions(options); this.init(); }; Factory.prototype = {
        constructor: Factory, setOptions: function (options) {
            if (typeof options === "object") {
                for (var key in options) {
                    if (options.hasOwnProperty(key)) { this._options[key] = options[key]; }
                }
            }
        }, init: function () {
            try { this._canvas = document.createElement("canvas"); this._canvas.style["display"] = "block"; this._canvas.style["position"] = "fixed"; this._canvas.style["margin"] = "0"; this._canvas.style["padding"] = "0"; this._canvas.style["border"] = "0"; this._canvas.style["outline"] = "0"; this._canvas.style["left"] = "0"; this._canvas.style["top"] = "0"; this._canvas.style["width"] = "100%"; this._canvas.style["height"] = "100%"; this._canvas.style["z-index"] = "-1"; this._canvas.style["background-color"] = "rgba(223, 223, 223, 0.3)"; this._canvas.id = "bgCanvas"; this._onResize(); this._context = this._canvas.getContext("2d"); this._context.clearRect(0, 0, this._width, this._height); this._context.globalAlpha = this._options.colorAlpha; window.addEventListener("resize", this._onResize); window.addEventListener("scroll", this._onScroll); document.body.appendChild(this._canvas); }
            catch (e) { console.warn("Canvas Context Error: " + e.toString()); return; }
            this._onDraw();
        }, addRibbon: function () {
            var dir = Math.round(random(1, 9)) > 5 ? "right" : "left", stop = 1000, hide = 200, min = 0 - hide, max = this._width + hide, movex = 0, movey = 0, startx = dir === "right" ? min : max, starty = Math.round(random(0, this._height)); if (/^(top|min)$/i.test(this._options.verticalPosition)) { starty = 0 + hide; } else
                if (/^(middle|center)$/i.test(this._options.verticalPosition)) { starty = this._height / 2; } else
                    if (/^(bottom|max)$/i.test(this._options.verticalPosition)) { starty = this._height - hide; }
            var ribbon = [], point1 = new Point(startx, starty), point2 = new Point(startx, starty), point3 = null, color = Math.round(random(0, 360)), delay = 0; while (true) {
                if (stop <= 0) break; stop--; movex = Math.round((Math.random() * 1 - 0.2) * this._options.horizontalSpeed); movey = Math.round((Math.random() * 1 - 0.5) * (this._height * 0.25)); point3 = new Point(); point3.copy(point2); if (dir === "right") { point3.add(movex, movey); if (point2.x >= max) break; } else
                    if (dir === "left") { point3.subtract(movex, movey); if (point2.x <= min) break; }
                ribbon.push({ point1: new Point(point1.x, point1.y), point2: new Point(point2.x, point2.y), point3: point3, color: color, delay: delay, dir: dir, alpha: 0, phase: 0 }); point1.copy(point2); point2.copy(point3); delay += 4; color += this._options.colorCycleSpeed;
            }
            this._ribbons.push(ribbon);
        }, _drawRibbonSection: function (section) {
            if (section) {
                if (section.phase >= 1 && section.alpha <= 0) { return true; }
                if (section.delay <= 0) {
                    section.phase += 0.02; section.alpha = Math.sin(section.phase) * 1; section.alpha = section.alpha <= 0 ? 0 : section.alpha; section.alpha = section.alpha >= 1 ? 1 : section.alpha; if (this._options.animateSections) {
                        var mod = Math.sin(1 + section.phase * Math.PI / 2) * 0.1; if (section.dir === "right") { section.point1.add(mod, 0); section.point2.add(mod, 0); section.point3.add(mod, 0); } else { section.point1.subtract(mod, 0); section.point2.subtract(mod, 0); section.point3.subtract(mod, 0); }
                        section.point1.add(0, mod); section.point2.add(0, mod); section.point3.add(0, mod);
                    }
                } else { section.delay -= 0.5; }
                var s = this._options.colorSaturation, l = this._options.colorBrightness, c = "hsla(" + section.color + ", " + s + ", " + l + ", " + section.alpha + " )"; this._context.save(); if (this._options.parallaxAmount !== 0) { this._context.translate(0, this._scroll * this._options.parallaxAmount); }
                this._context.beginPath(); this._context.moveTo(section.point1.x, section.point1.y); this._context.lineTo(section.point2.x, section.point2.y); this._context.lineTo(section.point3.x, section.point3.y); this._context.fillStyle = c; this._context.fill(); if (this._options.strokeSize > 0) { this._context.lineWidth = this._options.strokeSize; this._context.strokeStyle = c; this._context.lineCap = "round"; this._context.stroke(); }
                this._context.restore();
            }
            return false;
        }, _onDraw: function () {
            for (var i = 0, t = this._ribbons.length; i < t; ++i) {
                if (!this._ribbons[i]) { this._ribbons.splice(i, 1); }
            }
            this._context.clearRect(0, 0, this._width, this._height); for (var a = 0; a < this._ribbons.length; ++a) {
                var ribbon = this._ribbons[a], numSections = ribbon.length, numDone = 0; for (var b = 0; b < numSections; ++b) {
                    if (this._drawRibbonSection(ribbon[b])) { numDone++; }
                }
                if (numDone >= numSections) { this._ribbons[a] = null; }
            }
            if (this._ribbons.length < this._options.ribbonCount) { this.addRibbon(); }
            requestAnimationFrame(this._onDraw);
        }, _onResize: function (e) {
            var screen = screenInfo(e); this._width = screen.width; this._height = screen.height; if (this._canvas) {
                this._canvas.width = this._width; this._canvas.height = this._height; if (this._context) { this._context.globalAlpha = this._options.colorAlpha; }
            }
        }, _onScroll: function (e) { var screen = screenInfo(e); this._scroll = screen.scrolly; }
    }; return Factory;
}); new Ribbons();

转 es 后 


function RibbonsBase() {
    var _w = window,
        _b = document.body,
        _d = document.documentElement;
    var random = function () {
        if (arguments.length === 1) {
            if (Array.isArray(arguments[0])) {
                var index = Math.round(random(0, arguments[0].length - 1));
                return arguments[0][index];
            }
            return random(0, arguments[0]);
        } else if (arguments.length === 2) {
            return Math.random() * (arguments[1] - arguments[0]) + arguments[0];
        }
        return 0;
    };
    var screenInfo = function (e) {
        var width = Math.max(0, _w.innerWidth || _d.clientWidth || _b.clientWidth || 0),
            height = Math.max(0, _w.innerHeight || _d.clientHeight || _b.clientHeight || 0),
            scrollx = Math.max(0, _w.pageXOffset || _d.scrollLeft || _b.scrollLeft || 0) - (_d.clientLeft || 0),
            scrolly = Math.max(0, _w.pageYOffset || _d.scrollTop || _b.scrollTop || 0) - (_d.clientTop || 0);
        return {
            width: width,
            height: height,
            ratio: width / height,
            centerx: width / 2,
            centery: height / 2,
            scrollx: scrollx,
            scrolly: scrolly
        };
    };
    var mouseInfo = function (e) {
        var screen = screenInfo(e),
            mousex = e ? Math.max(0, e.pageX || e.clientX || 0) : 0,
            mousey = e ? Math.max(0, e.pageY || e.clientY || 0) : 0;
        return {
            mousex: mousex,
            mousey: mousey,
            centerx: mousex - screen.width / 2,
            centery: mousey - screen.height / 2
        };
    };
    var Point = function (x, y) {
        this.x = 0;
        this.y = 0;
        this.set(x, y);
    };
    Point.prototype = {
        constructor: Point,
        set: function (x, y) {
            this.x = x || 0;
            this.y = y || 0;
        },
        copy: function (point) {
            this.x = point.x || 0;
            this.y = point.y || 0;
            return this;
        },
        multiply: function (x, y) {
            this.x *= x || 1;
            this.y *= y || 1;
            return this;
        },
        divide: function (x, y) {
            this.x /= x || 1;
            this.y /= y || 1;
            return this;
        },
        add: function (x, y) {
            this.x += x || 0;
            this.y += y || 0;
            return this;
        },
        subtract: function (x, y) {
            this.x -= x || 0;
            this.y -= y || 0;
            return this;
        },
        clampX: function (min, max) {
            this.x = Math.max(min, Math.min(this.x, max));
            return this;
        },
        clampY: function (min, max) {
            this.y = Math.max(min, Math.min(this.y, max));
            return this;
        },
        flipX: function () {
            this.x *= -1;
            return this;
        },
        flipY: function () {
            this.y *= -1;
            return this;
        }
    };
    var Factory = function (options) {
        this._canvas = null;
        this._context = null;
        this._sto = null;
        this._width = 0;
        this._height = 0;
        this._scroll = 0;
        this._ribbons = [];
        this._options = {
            //色带颜色HSL饱和度
            colorSaturation: "80%",
            //色带颜色HSL亮度量
            colorBrightness: "60%",
            //色带颜色不透明度量
            colorAlpha: 0.65,
            //在HSL颜色空间中循环颜色的速度有多快
            colorCycleSpeed: 6,
            // 每侧Y轴上的起始位置 (top|min, middle|center, bottom|max, random)
            verticalPosition: "random",
            //到达屏幕另一边的速度有多快
            horizontalSpeed: 200,
            //在任何给定时间屏幕上保留多少条色带
            ribbonCount: 5,
            //添加笔划和功能区填充颜色
            strokeSize: 0,
            //按页面滚动上的系数垂直移动功能区
            parallaxAmount: -0.5,
            //随时间向每个功能区区域添加动画效果
            animateSections: true
        };
        this._onDraw = this._onDraw.bind(this);
        this._onResize = this._onResize.bind(this);
        this._onScroll = this._onScroll.bind(this);
        this.setOptions(options);
        this.init();
    };
    Factory.prototype = {
        constructor: Factory,
        setOptions: function (options) {
            if (typeof options === "object") {
                for (var key in options) {
                    if (Object.prototype.hasOwnProperty.call(options, 'key')) {
                        this._options[key] = options[key];
                    }
                }
            }
        },
        init: function () {
            try {
                this._canvas = document.createElement("canvas");
                this._canvas.style["display"] = "block";
                this._canvas.style["position"] = "fixed";
                this._canvas.style["margin"] = "0";
                this._canvas.style["padding"] = "0";
                this._canvas.style["border"] = "0";
                this._canvas.style["outline"] = "0";
                this._canvas.style["left"] = "0";
                this._canvas.style["top"] = "0";
                this._canvas.style["width"] = "100%";
                this._canvas.style["height"] = "100%";
                this._canvas.style["z-index"] = "-1";
                this._canvas.style["background-color"] = "rgba(223, 223, 223, 0.3)";
                this._canvas.id = "bgCanvas";
                this._onResize();
                this._context = this._canvas.getContext("2d");
                this._context.clearRect(0, 0, this._width, this._height);
                this._context.globalAlpha = this._options.colorAlpha;
                window.addEventListener("resize", this._onResize);
                window.addEventListener("scroll", this._onScroll);
                document.body.appendChild(this._canvas);
            } catch (e) {
                console.warn("Canvas Context Error: " + e.toString());
                return;
            }
            this._onDraw();
        },
        addRibbon: function () {
            var dir = Math.round(random(1, 9)) > 5 ? "right" : "left",
                stop = 1000,
                hide = 200,
                min = 0 - hide,
                max = this._width + hide,
                movex = 0,
                movey = 0,
                startx = dir === "right" ? min : max,
                starty = Math.round(random(0, this._height));
            if (/^(top|min)$/i.test(this._options.verticalPosition)) {
                starty = 0 + hide;
            } else if (/^(middle|center)$/i.test(this._options.verticalPosition)) {
                starty = this._height / 2;
            } else if (/^(bottom|max)$/i.test(this._options.verticalPosition)) {
                starty = this._height - hide;
            }
            var ribbon = [],
                point1 = new Point(startx, starty),
                point2 = new Point(startx, starty),
                point3 = null,
                color = Math.round(random(0, 360)),
                delay = 0;
            while (true) {
                if (stop <= 0) break;
                stop--;
                movex = Math.round((Math.random() * 1 - 0.2) * this._options.horizontalSpeed);
                movey = Math.round((Math.random() * 1 - 0.5) * (this._height * 0.25));
                point3 = new Point();
                point3.copy(point2);
                if (dir === "right") {
                    point3.add(movex, movey);
                    if (point2.x >= max) break;
                } else if (dir === "left") {
                    point3.subtract(movex, movey);
                    if (point2.x <= min) break;
                }
                ribbon.push({
                    point1: new Point(point1.x, point1.y),
                    point2: new Point(point2.x, point2.y),
                    point3: point3,
                    color: color,
                    delay: delay,
                    dir: dir,
                    alpha: 0,
                    phase: 0
                });
                point1.copy(point2);
                point2.copy(point3);
                delay += 4;
                color += this._options.colorCycleSpeed;
            }
            this._ribbons.push(ribbon);
        },
        _drawRibbonSection: function (section) {
            if (section) {
                if (section.phase >= 1 && section.alpha <= 0) {
                    return true;
                }
                if (section.delay <= 0) {
                    section.phase += 0.02;
                    section.alpha = Math.sin(section.phase) * 1;
                    section.alpha = section.alpha <= 0 ? 0 : section.alpha;
                    section.alpha = section.alpha >= 1 ? 1 : section.alpha;
                    if (this._options.animateSections) {
                        var mod = Math.sin(1 + section.phase * Math.PI / 2) * 0.1;
                        if (section.dir === "right") {
                            section.point1.add(mod, 0);
                            section.point2.add(mod, 0);
                            section.point3.add(mod, 0);
                        } else {
                            section.point1.subtract(mod, 0);
                            section.point2.subtract(mod, 0);
                            section.point3.subtract(mod, 0);
                        }
                        section.point1.add(0, mod);
                        section.point2.add(0, mod);
                        section.point3.add(0, mod);
                    }
                } else {
                    section.delay -= 0.5;
                }
                var s = this._options.colorSaturation,
                    l = this._options.colorBrightness,
                    c = "hsla(" + section.color + ", " + s + ", " + l + ", " + section.alpha + " )";
                this._context.save();
                if (this._options.parallaxAmount !== 0) {
                    this._context.translate(0, this._scroll * this._options.parallaxAmount);
                }
                this._context.beginPath();
                this._context.moveTo(section.point1.x, section.point1.y);
                this._context.lineTo(section.point2.x, section.point2.y);
                this._context.lineTo(section.point3.x, section.point3.y);
                this._context.fillStyle = c;
                this._context.fill();
                if (this._options.strokeSize > 0) {
                    this._context.lineWidth = this._options.strokeSize;
                    this._context.strokeStyle = c;
                    this._context.lineCap = "round";
                    this._context.stroke();
                }
                this._context.restore();
            }
            return false;
        },
        _onDraw: function () {
            for (var i = 0,
                t = this._ribbons.length; i < t; ++i) {
                if (!this._ribbons[i]) {
                    this._ribbons.splice(i, 1);
                }
            }
            this._context.clearRect(0, 0, this._width, this._height);
            for (var a = 0; a < this._ribbons.length; ++a) {
                var ribbon = this._ribbons[a],
                    numSections = ribbon.length,
                    numDone = 0;
                for (var b = 0; b < numSections; ++b) {
                    if (this._drawRibbonSection(ribbon[b])) {
                        numDone++;
                    }
                }
                if (numDone >= numSections) {
                    this._ribbons[a] = null;
                }
            }
            if (this._ribbons.length < this._options.ribbonCount) {
                this.addRibbon();
            }
            requestAnimationFrame(this._onDraw);
        },
        _onResize: function (e) {
            var screen = screenInfo(e);
            this._width = screen.width;
            this._height = screen.height;
            if (this._canvas) {
                this._canvas.width = this._width;
                this._canvas.height = this._height;
                if (this._context) {
                    this._context.globalAlpha = this._options.colorAlpha;
                }
            }
        },
        _onScroll: function (e) {
            var screen = screenInfo(e);
            this._scroll = screen.scrolly;
        }
    };
    return new Factory();

}

export default {
    dom: function () {
        return document.getElementById("bgCanvas");
    },
    stop: function () {
        var box = document.getElementById("bgCanvas");
        box.parentNode.removeChild(box);
    },
    start: function () {
        window["Ribbons"] = RibbonsBase();
    }
}

vue 页面 

<template>
  <div id="app">
    <div class="content">
      <div class="content_input">
        <div class="title">
          <p>Logo登录</p>
        </div>
        <el-form>
          <el-form-item>
            <el-input
              v-model="companyuid"
              placeholder="公司代码"
              prefix-icon="el-icon-school"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-input
              v-model="account"
              placeholder="账号"
              prefix-icon="el-icon-user"
            ></el-input>
          </el-form-item>
          <el-form-item>
            <el-input
              v-model="password"
              placeholder="密码"
              show-password
              prefix-icon="el-icon-unlock"
            ></el-input>
          </el-form-item>
          <el-form-item type="flex" justify="space-between">
            <el-col :span="11">
              <img src="https://www.oschina.net/action/user/captcha" />
            </el-col>
            <el-col class="line" :span="2">&nbsp;</el-col>
            <el-col :span="11">
              <el-input
                v-model="vcode"
                placeholder="验证码"
                prefix-icon="el-icon-warning-outline"
              ></el-input>
            </el-col>
          </el-form-item>
          <el-form-item>
            <el-button type="primary" @click="onSubmit">登录</el-button>
          </el-form-item>
        </el-form>
      </div>
    </div>
  </div>
</template>

<script>
import Ribbons from "../assets/js/ribbon_vue";
export default {
  Ribbons,
  data() {
    return {
      companyuid: "",
      account: "",
      password: "",
      vcode: "",
    };
  },
  mounted: function () {
    Ribbons.start();
  },
  methods: {
    onSubmit() {
      console.log("submit!");
      Ribbons.stop();
    },
  },
};
</script>

  <style>
@charset "utf-8";
* {
  padding: 0;
  margin: 0;
}

.content {
  width: 500px;
  height: 600px;
  box-sizing: border-box;
  padding: 0 50px;
  border-radius: 5px;
  box-shadow: 0px 2px 12px 0px rgba(105, 105, 105, 0.07);
  background: rgba(255, 255, 255, 0.5);
  position: absolute;
  top: 50%;
  left: 80%;
  transform: translate(-50%, -50%);
  animation: mymove 1s ease-in-out alternate;
  overflow: hidden;
  transition: 1.5s;
}

.content_input {
  width: 300px;
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.content_button {
  margin-top: 10px;
}

.el-input {
  margin-bottom: 25px;
}

.title {
  text-align: center;
  font-size: 24px;
  margin-bottom: 30px;
  font-weight: bold;
  color: #606266;
}

.el-button--primary {
  width: 100%;
}
</style>

 附一张效果图^_^

ribbonjs使用HTML5canvas生成色带JS库 ribbon.js:使用HTML5 canvas在你的网站上生成色带的JS库,整个包只有1Kb。 立即下载

相关推荐

canvas-ribbon.js:A ribbon background drawn on canvas.(随机不规则三角彩条背景插件)

canvas-ribbon.js (English version is down below.) 随机不规则三角彩条背景插件。 此项目在 基础上进行了许多改进,使得使用更加方便,且适用于更多场景。 预览效果: 观看在我的主页上的应用效果:https://hollowman6.github.io/ 使用 将下面的代码插入到 <body> 和 </body> 之间.(你可以手动配置其中参数) [removed][removed] [removed] new Ribbons({ // ribbon color HSL saturation amount colorSaturation: "80%", // ribbon color HSL br

Vue的Ribbon菜单

仿office的ribbon菜单

地理信息的专栏 1470

背景彩带动画插件ribbonjs.rar

对于hexo中的背景渲染(彩带飘动),使用的js文件,如果你使用的是hexo博客,可以试试这个背景效果。

记录一个commonJS转ES工具

该工具是cjs-to-es6 全局安装 安装好之后在需要转ES的模块下打开cmd 然后 记得要备份,它修改的是原js

weixin_57011137的博客 1643

别再为跨页读写发愁了!STM32F407模拟I2C驱动24C256/512的避坑指南

本文详细解析了STM32F407模拟I2C驱动24C256/512的跨页写入问题,揭示了24C系列存储器'写满一页不会自动翻页'的关键机制,并提供了经过验证的分页写入算法和优化方案。通过GPIO时序优化、地址计算和错误处理等技巧,帮助开发者解决数据错乱、覆盖等常见问题,实现稳定可靠的EEPROM读写操作。

weixin_42631411的博客 385

想在瑞芯微RK3588上跑视频分类模型?避开3D卷积这个坑,试试这几种NPU友好的方案

本文探讨了在瑞芯微RK3588上部署视频分类模型时如何避开3D卷积的性能陷阱,提供了三种NPU友好的替代方案:MobileNetV2+GRU组合、Temporal Shift Module(TSM)和帧级池化。这些方案在保持较高准确率的同时,充分利用RKNPU的硬件加速能力,显著提升推理效率。文章还分享了从模型转换到部署优化的完整流程和实战经验。

weixin_28724319的博客 436

ribbon插件 在vuepress中的应用

ribbon插件 在vuepress中的应用 ???? vuepress-plugin-ribbon-animation 项目地址:[http://www.zpzpup.com/blog] vue vuepress vuepress-theme-reco vuepress-plugin-ribbon 感谢各位大佬 ???? ???? 说明 放到开头,这里重点说明下,大家如果有啥问题咱就直接提‘lssues’吧,后面朋友遇到相同问题大家也可以参考 ???? 项目截图 ???? 项目配置也是很

qq_42250901的博客 2141

RoboMaster机甲大师赛备赛:如何用STM32+CAN总线精准控制四个大疆3508电机?

本文详细介绍了在RoboMaster机甲大师赛中,如何利用STM32和CAN总线技术精准控制四台大疆3508电机。从硬件架构设计、多电机ID分配、数据解析到同步控制算法,全面解析了构建高响应、低延迟底盘驱动系统的关键技术,助力参赛队伍提升机器人运动性能。

weixin_28684825的博客 140

github的vue组件库_GitHub功能区的Vue组件

github的vue组件库 丝带 (vue-ribbon) vue-ribbon is a Vue Single File Component implementing GitHub ribbons. It comes with a set of properties making the component customizable for your needs. vue-ribbon是实现G...

cuk5239的博客 483

l0phtcrack 7(爆破管理员密码)使用教程

l0phtcrack7简称lc7,是爆破计算机管理员密码的软件,早期是网络安全管理员用来检测系统用户是否使用了不安全的密码,后被黑客用于用户口令破解 功能:该工具支持远程破解,理论上能破解所有密码,但对复杂度比较高的密码,破解时间很长 使用前提:1.登录了需要破解的计算机 2.知道需要破解的计算机的一个管理员的账户,密码 ** 也许你会疑惑,我都知道了一个管理员账户密码了,还要另外的管理员密码...

Xiongcanne的博客 2万+

msfvenom制作windows/linux/android/ios木马

msfvenom选项如下 -p, --payload<payload> 指定 payload(攻击荷载)。如果使用自定义payload,请使用'-'或者stdin指定。 -l, --list [module_typel列出指定模块的所有可用资源。模块类型包括:payloads, encoders, nops, all -n, --nopsled <length>为payload预先指定一个NOP滑动长度。 -f, --format <format>指定输出格式(使

Cwillchris的博客 2740

Ribbon界面开发

Ribbon界面开发参考文章软件研发教材内容 参考文章 原文链接:详细的Ribbon界面开发介绍 软件研发教材内容 代码编写前,需要引用RevitAPI和RevitAPIUI以及presentation框架 其中persentation框架电脑自带,用everything搜索即可 软件研发教材标准模板:教材标准代码内容 ...

waiting233的博客 602

工业级4~20mA转0~3V信号调理电路原理图设计,已量产(电流传感器)

在工业现场,4~20mA 电流信号是模拟量传输的 “老熟人”—— 抗干扰强、能跑长距离,但嵌入式 MCU 的 ADC 一般只认电压信号。最近做项目时,我设计了一款能覆盖 0~25mA(含超量程冗余)、线性输出 0~3V 的调理电路,经过现场调试挺稳定,分享下细节。

不脱发的程序猿 547

SpringBoot + Spring Cloud +Vue 管理系统后台搭建(十三、服务消费Ribbon、Feign)

在上一节中,我们说了Consul注册中心实现了服务的注册和发现功能,这一节说一下服务的调用 在单体应用中,代码可以直接依赖,依赖后可直接调用,在微服务的架构中,服务都运行在各自的进程中,还有可能在不同的服务器上,所以需要相关的远程调用技术 Spring Cloud有两种比较广泛的微服务调用 1、使用RestTemplate进行调用,可以通过Ribbon注解RestTemplate模板,使用其拥有负载均衡的功能。 2、使用Feign进行声明式服务调用,声明之后就像调用本地方法一样,Feign默认使用R

Java 璐到底 604

第六天 界面操作及美化(6.4 使用GUI 套件)

本文介绍如何使用VIPM工具安装DMC GUI套件:首先打开VIPM并连接网络,搜索"UI"找到DMCGUI套件后下载安装;安装完成后即可在VIPM中添加控件并预览效果。该方法同样适用于下载其他UI套件,用户可根据需求设计个性化界面。整个流程包括搜索、下载、安装和使用四个简单步骤,适合快速搭建GUI界面。

weixin_38637405的博客 419

innovus:addRepeaterByRule用法

我正在「拾陆楼」和朋友们讨论有趣的话题,你⼀起来吧?addRepeaterByRule不管transition/timing violation,只根据约束的length/cap/fanout等等去给net 插buffer。

m0_61544122的博客 1115

Ribbon.js 使用指南

Ribbon.js 使用指南 项目介绍 Ribbon.js 是一个由 hustcc 开发的轻量级JavaScript库,专注于创建优雅且高度可定制的进度条。它旨在为Web应用程序增添视觉上的反馈效果,增强用户体验。通过简单易用的API,开发者可以轻松地在网页上集成美观的加载指示器,无需复杂的配置和庞大的依赖。 项目快速启动 要快速开始使用 Ribbon.js,首先需要将项目添加到你的工程中。可以通...

gitblog_00108的博客 648

温度PID控制PLC程序

温度PID稳定控制程序,适用于欧姆龙PLC,对其他PLC也具有很大参考价值

Vue 3 组件开发:搭建基于 Vite 的在线表格编辑系统(组件集成)

通过前文的学习,我们已经用 Vite 搭建出了Vue 3 的项目原型。今天,我们将基于这个原型,集成 SpreadJS 电子表格组件和在线编辑器组件,使其具备 Excel公式计算、在线导入导出 Excel 文档、数据透视表和可视化分析能力,实现在线表格编辑系统的雏形。 设计思路 · 同时创建SpreadJS 和Designer(表格编辑器)两个组件,用切换路由的方式显示不同组件类型。 · 在编辑器组件的工具栏中增加“加载”和“更新”两个按钮。 · 点击“加载”即可加载从服务器获取的Excel文件,在编辑器中

葡萄城技术团队博客 2247

Devexpress16.2.6破解工具

Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具Devexpress16.2.6破解工具

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

vue3+ts+vite项目中使用spreadjs,通过script标签引入spreadjs可以提高打包速度

vue3+ts+vite项目中使用spreadjs,通过script标签引入spreadjs可以提高打包速度

徐同保的专栏 992

WINCC7.3破解文件

WINCC7.3硬件够破解文件,有需要的下载!WINCC7.3硬件够破解文件,有需要的下载!

vue开源项目

2019独角兽企业重金招聘Python工程师标准>>> ...

weixin_34223655的博客 1276

vue.js如何写一个简单的原生js模块,浏览器中的表现如何?

请点击此处输入图片描述浏览器正在逐步的支持原生JavaScript模块。Safari和Chrome的最新版本已经支持它们了,Firefox和Edge也将很快推出。如果您是一个vue.js用户,那关于JavaScript模块一个很酷的事就是他们允许您编写您的组件到自己的文件中而无需任何多余的构建步骤。在这篇文章中,我将向您展示如何编写一个JavaScript模块到一个文件中,并在vue.js APP...

mongo_node的专栏 7959

在vue中引入原生js文件

由于原生js采用的是html、css、js是静态资源,没有模块化,在开发Vue项目的时候,有时需要使用一些非ES6格式的没有export的js库,可以有如下方法实现: 1.在index.html页面使用script标签引入 当然也可以使用cdn的地址。这样引入后的内容是全局的,可以在所有地方使用。 <!DOCTYPE html> <html> <head> <title>Map</title> <me

qq_43159578的博客 8483

学习Eureka注册中心

需求分析 在前后端分离架构中,服务层被拆分成了很多的微服务,微服务的信息如何管理?Spring Cloud中提供服务注册中心来管理微服务信息。 为什么 要用注册中心? 1、微服务数量众多,要进行远程调用就需要知道服务端的ip地址和端口,注册中心帮助我们管理这些服务的ip和端口。 2、微服务会实时上报自己的状态,注册中心统一管理这些微服务的状态,将存在问题的服务踢出服务列表,客户端获取到可用的服务进...

程序元 408

html彩带动画,背景彩带动画插件ribbon.js

插件描述:只有1kb的javascript 可以使用 HTML5 画布在您的网站上生成背景彩带动画使用方法在和 body>之间插入以下代码。在标签 body>之前建议,如下所示:............请不要在 head>中添加代码。配置size:功能区的大小,默认值:90。alpha:行的不透明度(0~1),默认值:0.6。zIndex:z空间的索引,默认值:-1。例:将脚本...

weixin_36096321的博客 1041

vue使用Canvas

2.样式区(style区) canvas实际上是一个内联元素,要设置它在页面水平居中,需要把它设置为块级元素,(再次声明,不可以在css里设置canvas的宽高) 3.脚本区(script区) (1)获得canvas 两个的区别就是,用ref找到的canvas使用时需要使用canvas.value, 而document.querySelector找到的canvas使用时不需要加.value (3)画线(两

m0_63466615的博客 1万+

.vue 怎么变成 .js,我们来试一试!看完会更懂 Vue 吗?

大家好,我是若川。我持续组织了近一年的源码共读活动,感兴趣的可以点此扫码加我微信lxchuan12参与,每周大家一起学习200行左右的源码,共同进步。同时极力推荐订阅我写的《学习源码整体架构系列》包含20余篇源码文章。历史面试系列。另外:目前建有江西|湖南|湖北籍前端群,可加我微信进群。欢迎星标我的公众号~不错过推文~本文是基于Vite+AntDesignVue打造业务组件库[1]专栏第 ...

u012384510的博客 1124
上一篇: ESLint 的日常
下一篇: 敲出来的真理-vue之computed计算属性
煮吧姐
博客等级 码龄17年 1078粉丝 152原创
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值
⌂ 换网址