升级了部分依赖 安装了新的包

This commit is contained in:
luyuan 2020-10-13 09:30:06 +08:00
parent 5430f133ba
commit 84f5841176
Signed by: theluyuan
GPG Key ID: A7972FD973317FF3
4 changed files with 741 additions and 531 deletions

View File

@ -14,13 +14,14 @@
"core-js": "^3.6.5", "core-js": "^3.6.5",
"dayjs": "^1.9.1", "dayjs": "^1.9.1",
"postcss-pxtorem": "^5.1.1", "postcss-pxtorem": "^5.1.1",
"vod-js-sdk-v6": "^1.4.10",
"vue": "^3.0.0-0", "vue": "^3.0.0-0",
"vue-router": "^4.0.0-0", "vue-router": "^4.0.0-0",
"vuex": "^4.0.0-0" "vuex": "^4.0.0-0"
}, },
"devDependencies": { "devDependencies": {
"@typescript-eslint/eslint-plugin": "^2.33.0", "@typescript-eslint/eslint-plugin": "^4.4.1",
"@typescript-eslint/parser": "^2.33.0", "@typescript-eslint/parser": "^4.4.1",
"@vue/cli-plugin-babel": "~4.5.0", "@vue/cli-plugin-babel": "~4.5.0",
"@vue/cli-plugin-eslint": "~4.5.0", "@vue/cli-plugin-eslint": "~4.5.0",
"@vue/cli-plugin-router": "~4.5.0", "@vue/cli-plugin-router": "~4.5.0",
@ -28,12 +29,12 @@
"@vue/cli-plugin-vuex": "~4.5.0", "@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0", "@vue/cli-service": "~4.5.0",
"@vue/compiler-sfc": "^3.0.0-0", "@vue/compiler-sfc": "^3.0.0-0",
"@vue/eslint-config-typescript": "^5.0.2", "@vue/eslint-config-typescript": "^7.0.0",
"eslint": "^6.7.2", "eslint": "^7.11.0",
"eslint-plugin-vue": "^7.0.0-0", "eslint-plugin-vue": "^7.0.0-0",
"node-sass": "^4.14.1", "node-sass": "^4.14.1",
"sass-loader": "^10.0.2", "sass-loader": "^10.0.2",
"typescript": "~3.9.3" "typescript": "~4.0.3"
}, },
"eslintConfig": { "eslintConfig": {
"root": true, "root": true,

View File

@ -6,7 +6,7 @@ import { message } from 'ant-design-vue';
// 泛型接口 // 泛型接口
export interface Get { export interface Get {
<T>(url: string, params?: object, config?: AxiosRequestConfig): Promise<CustomSuccessData<T>>; <T>(url: string, params?: unknown, config?: AxiosRequestConfig): Promise<CustomSuccessData<T>>;
} }
axios.interceptors.response.use((response)=>{ axios.interceptors.response.use((response)=>{
@ -17,12 +17,12 @@ axios.interceptors.response.use((response)=>{
return Promise.reject(error) return Promise.reject(error)
}) })
const get: Get = async function (url: string,data?: object) { const get: Get = async function (url: string,data?: unknown) {
const res = await axios.get(url,{params:data}); const res = await axios.get(url,{params:data});
return res.data; return res.data;
} }
const post: Get = async function (url: string,data?: object) { const post: Get = async function (url: string,data?: unknown) {
const res = await axios.post(url,data) const res = await axios.post(url,data)
return res.data; return res.data;
} }

View File

@ -111,7 +111,7 @@ export default defineComponent({
/** /**
* 验证直播时间 * 验证直播时间
*/ */
async function validateDuration (rule: object, value: number): Promise<string | void> { async function validateDuration (rule: unknown, value: number): Promise<string | void> {
if (value < 30 || value > 120) { if (value < 30 || value > 120) {
return Promise.reject('*最短30min 最长120min'); return Promise.reject('*最短30min 最长120min');
} else { } else {
@ -121,7 +121,7 @@ export default defineComponent({
/** /**
* 验证直播人数 * 验证直播人数
*/ */
const validateNumber = async (rule: object, value: number): Promise<string | void> => { const validateNumber = async (rule: unknown, value: number): Promise<string | void> => {
if (value < 1 || value > 4) { if (value < 1 || value > 4) {
return Promise.reject('**最少1人最多4人'); return Promise.reject('**最少1人最多4人');
} else { } else {
@ -169,7 +169,7 @@ export default defineComponent({
e.preventDefault(); e.preventDefault();
validate().then(() => { validate().then(() => {
console.log(toRaw(form)); console.log(toRaw(form));
}).catch((err: object) => { }).catch((err: unknown) => {
console.log('error', err); console.log('error', err);
}); });
}; };

1249
yarn.lock

File diff suppressed because it is too large Load Diff