升级了部分依赖 安装了新的包
This commit is contained in:
		
							parent
							
								
									5430f133ba
								
							
						
					
					
						commit
						84f5841176
					
				
							
								
								
									
										11
									
								
								package.json
									
									
									
									
									
								
							
							
						
						
									
										11
									
								
								package.json
									
									
									
									
									
								
							@ -14,13 +14,14 @@
 | 
			
		||||
    "core-js": "^3.6.5",
 | 
			
		||||
    "dayjs": "^1.9.1",
 | 
			
		||||
    "postcss-pxtorem": "^5.1.1",
 | 
			
		||||
    "vod-js-sdk-v6": "^1.4.10",
 | 
			
		||||
    "vue": "^3.0.0-0",
 | 
			
		||||
    "vue-router": "^4.0.0-0",
 | 
			
		||||
    "vuex": "^4.0.0-0"
 | 
			
		||||
  },
 | 
			
		||||
  "devDependencies": {
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^2.33.0",
 | 
			
		||||
    "@typescript-eslint/parser": "^2.33.0",
 | 
			
		||||
    "@typescript-eslint/eslint-plugin": "^4.4.1",
 | 
			
		||||
    "@typescript-eslint/parser": "^4.4.1",
 | 
			
		||||
    "@vue/cli-plugin-babel": "~4.5.0",
 | 
			
		||||
    "@vue/cli-plugin-eslint": "~4.5.0",
 | 
			
		||||
    "@vue/cli-plugin-router": "~4.5.0",
 | 
			
		||||
@ -28,12 +29,12 @@
 | 
			
		||||
    "@vue/cli-plugin-vuex": "~4.5.0",
 | 
			
		||||
    "@vue/cli-service": "~4.5.0",
 | 
			
		||||
    "@vue/compiler-sfc": "^3.0.0-0",
 | 
			
		||||
    "@vue/eslint-config-typescript": "^5.0.2",
 | 
			
		||||
    "eslint": "^6.7.2",
 | 
			
		||||
    "@vue/eslint-config-typescript": "^7.0.0",
 | 
			
		||||
    "eslint": "^7.11.0",
 | 
			
		||||
    "eslint-plugin-vue": "^7.0.0-0",
 | 
			
		||||
    "node-sass": "^4.14.1",
 | 
			
		||||
    "sass-loader": "^10.0.2",
 | 
			
		||||
    "typescript": "~3.9.3"
 | 
			
		||||
    "typescript": "~4.0.3"
 | 
			
		||||
  },
 | 
			
		||||
  "eslintConfig": {
 | 
			
		||||
    "root": true,
 | 
			
		||||
 | 
			
		||||
@ -6,7 +6,7 @@ import { message } from 'ant-design-vue';
 | 
			
		||||
 | 
			
		||||
// 泛型接口 
 | 
			
		||||
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)=>{
 | 
			
		||||
@ -17,12 +17,12 @@ axios.interceptors.response.use((response)=>{
 | 
			
		||||
    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});
 | 
			
		||||
    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)
 | 
			
		||||
    return res.data;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
@ -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) {
 | 
			
		||||
                return Promise.reject('*最短30min 最长120min');
 | 
			
		||||
            } 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) {
 | 
			
		||||
                return Promise.reject('**最少1人,最多4人');
 | 
			
		||||
            } else {
 | 
			
		||||
@ -169,7 +169,7 @@ export default defineComponent({
 | 
			
		||||
            e.preventDefault();
 | 
			
		||||
            validate().then(() => {
 | 
			
		||||
                console.log(toRaw(form));
 | 
			
		||||
            }).catch((err: object) => {
 | 
			
		||||
            }).catch((err: unknown) => {
 | 
			
		||||
                console.log('error', err);
 | 
			
		||||
            });
 | 
			
		||||
        };
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user