摘要:
安装依赖 npm install element-plus --save 引入依赖 import './assets/main.css' import { createApp } from 'vue' import { createPinia } from 'pinia' import App fr 阅读全文
摘要:
<script setup> import Mock from "mockjs" let { data } = Mock.mock({ 'data|10-20': [{ 'employeeNo|245-543': 1, name: '@cname', 'password|+1': 123456 }] 阅读全文
摘要:
使用命令初始化 npm init vue@latest 初始化成功后项目截图 具备了store router,还有ts的功能等 阅读全文
摘要:
// 生成多少个yield 就能被for of 遍历多少次 function* mytest() { for (let i = 0; i < 5; i++) { yield Math.random(10) * 1000 } } // for of 会迭代生成器里面所有的yield ,有多少个yiel 阅读全文
摘要:
const params = new URLSearchParams();//实现js参数转urlcode编码,直接可以传到url去请求 params.append('param1', 'value1'); params.append('param2', 'value2'); console.log 阅读全文
摘要:
// 生成多少个yield 就能被for of 遍历多少次 function* mytest() { for (let i = 0; i < 5; i++) { yield Math.random(10) * 1000 } } // for of 会迭代生成器里面所有的yield ,有多少个yiel 阅读全文
摘要:
实现代码 Object.prototype[Symbol.iterator] = function () { let keys = Object.keys(this); let index = 0; return { next: () => { return { value: this[keys[i 阅读全文