摘要:
let input = document.getElementById('username'); let lastValue = input.value; input.value = '6d915519acf411e9b502fa528da74700'; let event = new Event(
阅读全文
posted @ 2021-11-16 14:49
chenlw101
阅读(243)
推荐(0)
摘要:
<web-view src="https://uniapp.dcloud.io/component/web-view" allow></web-view> onReady() { var currentWebview = this.$scope.$getAppWebview() setTimeout
阅读全文
posted @ 2021-11-15 15:10
chenlw101
阅读(6021)
推荐(0)
摘要:
页面可见区域宽: document.body.clientWidth;网页可见区域高: document.body.clientHeight;网页可见区域宽: document.body.offsetWidth (包括边线的宽);网页可见区域高: document.body.offsetHeight
阅读全文
posted @ 2021-03-02 17:08
chenlw101
阅读(48)
推荐(0)
摘要:
//对象删除某一属性 let obj = { a:1,b:2,c:3 } delete obj.a 或者 function delObjItem(obj,items){ let obj1 = {} for(let i in obj){ if(items.indexOf(i)<0){ obj1[i]
阅读全文
posted @ 2021-03-01 10:03
chenlw101
阅读(457)
推荐(0)
摘要:
//package.json(跨域设置) "proxy": "http://10.0.0.36", //打包路径出错修改 package.json中 "homepage": "./", //axios设置 import axios from 'axios' import qs from 'qs' i
阅读全文
posted @ 2021-01-16 13:42
chenlw101
阅读(454)
推荐(0)
摘要:
npx create-react-app my-app --template typescript
阅读全文
posted @ 2020-12-11 11:17
chenlw101
阅读(460)
推荐(0)
摘要:
// 类型别名 type PlusType = (x:number,y:number)=>number function sum(x:number,y:number):number{ return x+y } const sum2:PlusType = sum type NameResolver =
阅读全文
posted @ 2020-12-10 20:08
chenlw101
阅读(325)
推荐(0)
摘要:
function echo<T>(arg:T):T{ return arg } const result = echo("str") function swap<T,U>(arr:[T,U]):[U,T]{ return [arr[1],arr[0]] } const result1 = swap(
阅读全文
posted @ 2020-12-10 19:56
chenlw101
阅读(67)
推荐(0)
摘要:
const enum Direction { Up='Up', Down="Down", Left="Left", Right="Right" } console.log(Direction.Up)
阅读全文
posted @ 2020-12-10 19:06
chenlw101
阅读(50)
推荐(0)
摘要:
interface Radio{ switchRadio(triggrL:boolean):void; } interface Bettery{ checkBettery(); } interface RadioAndBettery extends Radio{ checkBettery(); }
阅读全文
posted @ 2020-12-10 18:58
chenlw101
阅读(93)
推荐(0)