Category:VUE

  • String splicing method in Vue tag and attribute

    Time:2021-12-8

    1. Attribute eg:: value = “‘str ‘+ XX” or: value = “STR ${XX}” 2. Tag eg: < div V-for = “(item, index) in userlist” > {{item.userName+'(‘+item.userAccount+’)’}} </div> Turn fromblog.csdn.net/w_t_y_y/article/deta… This work adoptsCC agreement, reprint must indicate the author and the link to this article Writing code is an interesting thing.

  • 7 methods of JS array de duplication

    Time:2021-12-7

    1、 Using indexof() method to remove duplicate Method name Function description indexOf() Returns the first index of the given value that can be found in the array, or – 1 if it does not exist lastIndexOf() Returns the index of the last specified element in the array, or – 1 if it does not exist […]

  • NPM runs with an error “because running scripts is prohibited on this system” solution

    Time:2021-12-6

    NPM runs with an error “because running scripts is prohibited on this system” solution NPM: the file C: \ users \ pathliu \ software \ nodejs \ npm.ps1 cannot be loaded because running scripts is prohibited on this system. For more information, see about in HTTPS: / go. Microsoft. COM / fwlink /? LINKID = […]

  • “Quick start typescript” typescript advanced “object”

    Time:2021-12-4

    Series articles: “Quick start typescript” typescript basic syntax “Quick start typescript” typescript advanced “object” “Quick start typescript” typescript functional programming Promise of “top speed typescript” Interface, class and generic type of “quick start typescript” [TOC] 1、 Definition In TS, we define an object without “class” or “organization”. If we need to write an object, we […]

  • Using composition API in vue3 using vuex

    Time:2021-12-3

    Series articles: Use of vuex Using composition API in vue3 using vuex Home.vue /* *@ Description: standardize yourself and write excellent quality code * @version: 1.0 * @Author: baojino * @Date: 2021-11-01 15:38:58 * @LastEditors: Aidam_Bo * @LastEditTime: 2021-11-01 17:46:32 */ import { createStore } from ‘vuex’ export default createStore({ state: { name: ‘dell’ }, […]

  • JS implements CRC encryption modbuscrc16

    Time:2021-12-2

    var CRC = {}; CRC._auchCRCHi = [ 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, 0x01, 0xC0, 0x80, 0x41, 0x00, 0xC1, 0x81, 0x40, 0x00, 0xC1, 0x81, 0x40, 0x01, 0xC0, 0x80, 0x41, […]

  • JS to achieve FCS effectiveness

    Time:2021-12-1

    function fcs(str) { var len = str.length; var tmp = “”; for(var i = 0;i<len;i++){ tmp = tmp ^ str[i].charCodeAt(); } var tmps = tmp.toString(16); if (tmps.Length == 1) { tmps = “0” + tmps; } return tmps; } var test = fcs(“@00RD01000007”); //50 console.log(test); This work adoptsCC agreement, reprint must indicate the author and […]

  • “Quick start typescript” typescript functional programming

    Time:2021-11-30

    Series articles: “Quick start typescript” typescript basic syntax “Quick start typescript” typescript advanced “object” “Quick start typescript” typescript functional programming Promise of “top speed typescript” Interface, class and generic type of “quick start typescript” [TOC] catalogue 1、 Functional programming style The variable type can be a function The literal can be a function The field […]

  • Promise of “top speed typescript”

    Time:2021-11-29

    Series articles: “Quick start typescript” typescript basic syntax “Quick start typescript” typescript advanced “object” “Quick start typescript” typescript functional programming Promise of “top speed typescript” Interface, class and generic type of “quick start typescript” [TOC] 1、 Asynchronous programming Concept of asynchronous programming: asynchronous programming (async) is relative to synchronous programming (sync); We are learning that […]

  • ES6 grammar summary

    Time:2021-11-27

    Block scope constructionletandconst letDeclaration, usage andvarSame, but withletDeclared variables are not promoted, and the scope of variables can be limited to the current code block. useletDeclaring variables also prevents repeated declarations of variables. If usedconstTo declare an object, the binding of the object itself cannot be modified, but the properties and values of the object […]

  • My Vue learning record 1: front end cross domain proxy configuration

    Time:2021-11-26

    Series articles: My Vue learning record 1: front end cross domain proxy configuration My Vue learning record 2: child component calls parent component’s method Cross domain configuration In the vue.config.js file under the root directory of the project directory, add the following code module.exports = { publicPath: “/”, devServer: { proxy: { “/api”: { target: […]

  • My Vue learning record 2: child component calls parent component’s method

    Time:2021-11-25

    Series articles: My Vue learning record 1: front end cross domain proxy configuration My Vue learning record 2: child component calls parent component’s method First, create a sub component <template> <div class=”Child”> </div> </template> <script lang=’ts’> import { Options, Vue } from ‘vue-class-component’; @Options({ }) export default class Child extends Vue { } </script> Create […]