保存进度!
This commit is contained in:
parent
52bcee8d39
commit
b2712087a0
@ -2,7 +2,7 @@
|
|||||||
* @Author: Kane
|
* @Author: Kane
|
||||||
* @Date: 2022-12-14 15:12:46
|
* @Date: 2022-12-14 15:12:46
|
||||||
* @LastEditors: Kane
|
* @LastEditors: Kane
|
||||||
* @LastEditTime: 2023-03-05 00:14:41
|
* @LastEditTime: 2023-03-05 21:35:01
|
||||||
* @FilePath: /task_schedule/.eslintrc.cjs
|
* @FilePath: /task_schedule/.eslintrc.cjs
|
||||||
* @Description:
|
* @Description:
|
||||||
*
|
*
|
||||||
@ -81,6 +81,11 @@ module.exports = {
|
|||||||
"exports": "never",
|
"exports": "never",
|
||||||
"functions": "never",
|
"functions": "never",
|
||||||
},], //数组和对象键值对最后一个逗号
|
},], //数组和对象键值对最后一个逗号
|
||||||
|
"@typescript-eslint/quotes": ["error", "double",],
|
||||||
|
"@typescript-eslint/space-before-function-paren": "off",
|
||||||
|
"@typescript-eslint/strict-boolean-expressions": ["error", {
|
||||||
|
"allowString": true,
|
||||||
|
},],
|
||||||
"comma-style": ["error", "last",], //逗号在行位
|
"comma-style": ["error", "last",], //逗号在行位
|
||||||
"array-bracket-spacing": ["error", "never",],
|
"array-bracket-spacing": ["error", "never",],
|
||||||
"no-undef-init": "error",
|
"no-undef-init": "error",
|
||||||
@ -88,6 +93,8 @@ module.exports = {
|
|||||||
"no-use-before-define": "error",
|
"no-use-before-define": "error",
|
||||||
"no-shadow-restricted-names": "error", //禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
"no-shadow-restricted-names": "error", //禁止对一些关键字或者保留字进行赋值操作,比如NaN、Infinity、undefined、eval、arguments等
|
||||||
"prefer-const": "warn",
|
"prefer-const": "warn",
|
||||||
|
"spaced-comment": "error",
|
||||||
|
"space-before-function-paren": "off",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -15,7 +15,7 @@ type stringkey = Record<string, string>;
|
|||||||
* @param url 访问的url
|
* @param url 访问的url
|
||||||
* @returns
|
* @returns
|
||||||
*/
|
*/
|
||||||
function getURLParams(url: string)
|
function getURLParams(url: string): Record<string, string>
|
||||||
{
|
{
|
||||||
const arr = url.split("?");
|
const arr = url.split("?");
|
||||||
const params = arr[1].split("&");
|
const params = arr[1].split("&");
|
||||||
@ -38,7 +38,6 @@ function getURLParams(url: string)
|
|||||||
*/
|
*/
|
||||||
function getParamsFromURL(url: string): stringkey
|
function getParamsFromURL(url: string): stringkey
|
||||||
{
|
{
|
||||||
|
|
||||||
const indexOfQuestionMark: number = url.indexOf("?");
|
const indexOfQuestionMark: number = url.indexOf("?");
|
||||||
const indexOfSharp: number = url.indexOf("#");
|
const indexOfSharp: number = url.indexOf("#");
|
||||||
const paramObj: stringkey = {};
|
const paramObj: stringkey = {};
|
||||||
@ -69,7 +68,7 @@ function getParamsFromURL(url: string): stringkey
|
|||||||
|
|
||||||
paramArray.forEach((item) =>
|
paramArray.forEach((item) =>
|
||||||
{
|
{
|
||||||
if (item.length == 0)
|
if (item.length === 0)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user