调整分包,完成隐私协议(样式待优化)
This commit is contained in:
		
							
								
								
									
										7
									
								
								node_modules/@vant/weapp/dist/common/color.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								node_modules/@vant/weapp/dist/common/color.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| export declare const RED = "#ee0a24"; | ||||
| export declare const BLUE = "#1989fa"; | ||||
| export declare const WHITE = "#fff"; | ||||
| export declare const GREEN = "#07c160"; | ||||
| export declare const ORANGE = "#ff976a"; | ||||
| export declare const GRAY = "#323233"; | ||||
| export declare const GRAY_DARK = "#969799"; | ||||
							
								
								
									
										7
									
								
								node_modules/@vant/weapp/dist/common/color.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								node_modules/@vant/weapp/dist/common/color.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,7 @@ | ||||
| export const RED = '#ee0a24'; | ||||
| export const BLUE = '#1989fa'; | ||||
| export const WHITE = '#fff'; | ||||
| export const GREEN = '#07c160'; | ||||
| export const ORANGE = '#ff976a'; | ||||
| export const GRAY = '#323233'; | ||||
| export const GRAY_DARK = '#969799'; | ||||
							
								
								
									
										4
									
								
								node_modules/@vant/weapp/dist/common/component.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								node_modules/@vant/weapp/dist/common/component.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,4 @@ | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| import { VantComponentOptions } from 'definitions/index'; | ||||
| declare function VantComponent<Data extends WechatMiniprogram.Component.DataOption, Props extends WechatMiniprogram.Component.PropertyOption, Methods extends WechatMiniprogram.Component.MethodOption>(vantOptions: VantComponentOptions<Data, Props, Methods>): void; | ||||
| export { VantComponent }; | ||||
							
								
								
									
										46
									
								
								node_modules/@vant/weapp/dist/common/component.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										46
									
								
								node_modules/@vant/weapp/dist/common/component.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,46 @@ | ||||
| import { basic } from '../mixins/basic'; | ||||
| function mapKeys(source, target, map) { | ||||
|     Object.keys(map).forEach((key) => { | ||||
|         if (source[key]) { | ||||
|             target[map[key]] = source[key]; | ||||
|         } | ||||
|     }); | ||||
| } | ||||
| function VantComponent(vantOptions) { | ||||
|     const options = {}; | ||||
|     mapKeys(vantOptions, options, { | ||||
|         data: 'data', | ||||
|         props: 'properties', | ||||
|         watch: 'observers', | ||||
|         mixins: 'behaviors', | ||||
|         methods: 'methods', | ||||
|         beforeCreate: 'created', | ||||
|         created: 'attached', | ||||
|         mounted: 'ready', | ||||
|         destroyed: 'detached', | ||||
|         classes: 'externalClasses', | ||||
|     }); | ||||
|     // add default externalClasses | ||||
|     options.externalClasses = options.externalClasses || []; | ||||
|     options.externalClasses.push('custom-class'); | ||||
|     // add default behaviors | ||||
|     options.behaviors = options.behaviors || []; | ||||
|     options.behaviors.push(basic); | ||||
|     // add relations | ||||
|     const { relation } = vantOptions; | ||||
|     if (relation) { | ||||
|         options.relations = relation.relations; | ||||
|         options.behaviors.push(relation.mixin); | ||||
|     } | ||||
|     // map field to form-field behavior | ||||
|     if (vantOptions.field) { | ||||
|         options.behaviors.push('wx://form-field'); | ||||
|     } | ||||
|     // add default options | ||||
|     options.options = { | ||||
|         multipleSlots: true, | ||||
|         addGlobalClass: true, | ||||
|     }; | ||||
|     Component(options); | ||||
| } | ||||
| export { VantComponent }; | ||||
							
								
								
									
										1
									
								
								node_modules/@vant/weapp/dist/common/index.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/@vant/weapp/dist/common/index.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| .van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3}.van-clearfix:after{clear:both;content:"";display:table}.van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:" ";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} | ||||
							
								
								
									
										15
									
								
								node_modules/@vant/weapp/dist/common/relation.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								node_modules/@vant/weapp/dist/common/relation.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| type TrivialInstance = WechatMiniprogram.Component.TrivialInstance; | ||||
| export declare function useParent(name: string, onEffect?: (this: TrivialInstance) => void): { | ||||
|     relations: { | ||||
|         [x: string]: WechatMiniprogram.Component.RelationOption; | ||||
|     }; | ||||
|     mixin: string; | ||||
| }; | ||||
| export declare function useChildren(name: string, onEffect?: (this: TrivialInstance, target: TrivialInstance) => void): { | ||||
|     relations: { | ||||
|         [x: string]: WechatMiniprogram.Component.RelationOption; | ||||
|     }; | ||||
|     mixin: string; | ||||
| }; | ||||
| export {}; | ||||
							
								
								
									
										56
									
								
								node_modules/@vant/weapp/dist/common/relation.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								node_modules/@vant/weapp/dist/common/relation.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,56 @@ | ||||
| export function useParent(name, onEffect) { | ||||
|     const path = `../${name}/index`; | ||||
|     return { | ||||
|         relations: { | ||||
|             [path]: { | ||||
|                 type: 'ancestor', | ||||
|                 linked() { | ||||
|                     onEffect && onEffect.call(this); | ||||
|                 }, | ||||
|                 linkChanged() { | ||||
|                     onEffect && onEffect.call(this); | ||||
|                 }, | ||||
|                 unlinked() { | ||||
|                     onEffect && onEffect.call(this); | ||||
|                 }, | ||||
|             }, | ||||
|         }, | ||||
|         mixin: Behavior({ | ||||
|             created() { | ||||
|                 Object.defineProperty(this, 'parent', { | ||||
|                     get: () => this.getRelationNodes(path)[0], | ||||
|                 }); | ||||
|                 Object.defineProperty(this, 'index', { | ||||
|                     // @ts-ignore | ||||
|                     get: () => { var _a, _b; return (_b = (_a = this.parent) === null || _a === void 0 ? void 0 : _a.children) === null || _b === void 0 ? void 0 : _b.indexOf(this); }, | ||||
|                 }); | ||||
|             }, | ||||
|         }), | ||||
|     }; | ||||
| } | ||||
| export function useChildren(name, onEffect) { | ||||
|     const path = `../${name}/index`; | ||||
|     return { | ||||
|         relations: { | ||||
|             [path]: { | ||||
|                 type: 'descendant', | ||||
|                 linked(target) { | ||||
|                     onEffect && onEffect.call(this, target); | ||||
|                 }, | ||||
|                 linkChanged(target) { | ||||
|                     onEffect && onEffect.call(this, target); | ||||
|                 }, | ||||
|                 unlinked(target) { | ||||
|                     onEffect && onEffect.call(this, target); | ||||
|                 }, | ||||
|             }, | ||||
|         }, | ||||
|         mixin: Behavior({ | ||||
|             created() { | ||||
|                 Object.defineProperty(this, 'children', { | ||||
|                     get: () => this.getRelationNodes(path) || [], | ||||
|                 }); | ||||
|             }, | ||||
|         }), | ||||
|     }; | ||||
| } | ||||
							
								
								
									
										1
									
								
								node_modules/@vant/weapp/dist/common/style/clearfix.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/@vant/weapp/dist/common/style/clearfix.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| .van-clearfix:after{clear:both;content:"";display:table} | ||||
							
								
								
									
										1
									
								
								node_modules/@vant/weapp/dist/common/style/ellipsis.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/@vant/weapp/dist/common/style/ellipsis.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| .van-ellipsis{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.van-multi-ellipsis--l2{-webkit-line-clamp:2}.van-multi-ellipsis--l2,.van-multi-ellipsis--l3{-webkit-box-orient:vertical;display:-webkit-box;overflow:hidden;text-overflow:ellipsis}.van-multi-ellipsis--l3{-webkit-line-clamp:3} | ||||
							
								
								
									
										1
									
								
								node_modules/@vant/weapp/dist/common/style/hairline.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								node_modules/@vant/weapp/dist/common/style/hairline.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1 @@ | ||||
| .van-hairline,.van-hairline--bottom,.van-hairline--left,.van-hairline--right,.van-hairline--surround,.van-hairline--top,.van-hairline--top-bottom{position:relative}.van-hairline--bottom:after,.van-hairline--left:after,.van-hairline--right:after,.van-hairline--surround:after,.van-hairline--top-bottom:after,.van-hairline--top:after,.van-hairline:after{border:0 solid #ebedf0;bottom:-50%;box-sizing:border-box;content:" ";left:-50%;pointer-events:none;position:absolute;right:-50%;top:-50%;transform:scale(.5);transform-origin:center}.van-hairline--top:after{border-top-width:1px}.van-hairline--left:after{border-left-width:1px}.van-hairline--right:after{border-right-width:1px}.van-hairline--bottom:after{border-bottom-width:1px}.van-hairline--top-bottom:after{border-width:1px 0}.van-hairline--surround:after{border-width:1px} | ||||
							
								
								
									
										0
									
								
								node_modules/@vant/weapp/dist/common/style/var.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								node_modules/@vant/weapp/dist/common/style/var.wxss
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
								
								
									
										21
									
								
								node_modules/@vant/weapp/dist/common/utils.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								node_modules/@vant/weapp/dist/common/utils.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| /// <reference types="node" /> | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| export { isDef } from './validator'; | ||||
| export { getSystemInfoSync } from './version'; | ||||
| export declare function range(num: number, min: number, max: number): number; | ||||
| export declare function nextTick(cb: (...args: any[]) => void): void; | ||||
| export declare function addUnit(value?: string | number): string | undefined; | ||||
| export declare function requestAnimationFrame(cb: () => void): NodeJS.Timeout; | ||||
| export declare function pickExclude(obj: unknown, keys: string[]): {}; | ||||
| export declare function getRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult>; | ||||
| export declare function getAllRect(context: WechatMiniprogram.Component.TrivialInstance, selector: string): Promise<WechatMiniprogram.BoundingClientRectCallbackResult[]>; | ||||
| export declare function groupSetData(context: WechatMiniprogram.Component.TrivialInstance, cb: () => void): void; | ||||
| export declare function toPromise(promiseLike: Promise<unknown> | unknown): Promise<unknown>; | ||||
| export declare function addNumber(num1: any, num2: any): number; | ||||
| export declare const clamp: (num: any, min: any, max: any) => number; | ||||
| export declare function getCurrentPage<T>(): T & WechatMiniprogram.OptionalInterface<WechatMiniprogram.Page.ILifetime> & WechatMiniprogram.Page.InstanceProperties & WechatMiniprogram.Page.InstanceMethods<WechatMiniprogram.IAnyObject> & WechatMiniprogram.Page.Data<WechatMiniprogram.IAnyObject> & WechatMiniprogram.IAnyObject; | ||||
| export declare const isPC: boolean; | ||||
| export declare const isWxWork: boolean; | ||||
							
								
								
									
										86
									
								
								node_modules/@vant/weapp/dist/common/utils.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								node_modules/@vant/weapp/dist/common/utils.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,86 @@ | ||||
| import { isDef, isNumber, isPlainObject, isPromise } from './validator'; | ||||
| import { canIUseGroupSetData, canIUseNextTick, getSystemInfoSync, } from './version'; | ||||
| export { isDef } from './validator'; | ||||
| export { getSystemInfoSync } from './version'; | ||||
| export function range(num, min, max) { | ||||
|     return Math.min(Math.max(num, min), max); | ||||
| } | ||||
| export function nextTick(cb) { | ||||
|     if (canIUseNextTick()) { | ||||
|         wx.nextTick(cb); | ||||
|     } | ||||
|     else { | ||||
|         setTimeout(() => { | ||||
|             cb(); | ||||
|         }, 1000 / 30); | ||||
|     } | ||||
| } | ||||
| export function addUnit(value) { | ||||
|     if (!isDef(value)) { | ||||
|         return undefined; | ||||
|     } | ||||
|     value = String(value); | ||||
|     return isNumber(value) ? `${value}px` : value; | ||||
| } | ||||
| export function requestAnimationFrame(cb) { | ||||
|     return setTimeout(() => { | ||||
|         cb(); | ||||
|     }, 1000 / 30); | ||||
| } | ||||
| export function pickExclude(obj, keys) { | ||||
|     if (!isPlainObject(obj)) { | ||||
|         return {}; | ||||
|     } | ||||
|     return Object.keys(obj).reduce((prev, key) => { | ||||
|         if (!keys.includes(key)) { | ||||
|             prev[key] = obj[key]; | ||||
|         } | ||||
|         return prev; | ||||
|     }, {}); | ||||
| } | ||||
| export function getRect(context, selector) { | ||||
|     return new Promise((resolve) => { | ||||
|         wx.createSelectorQuery() | ||||
|             .in(context) | ||||
|             .select(selector) | ||||
|             .boundingClientRect() | ||||
|             .exec((rect = []) => resolve(rect[0])); | ||||
|     }); | ||||
| } | ||||
| export function getAllRect(context, selector) { | ||||
|     return new Promise((resolve) => { | ||||
|         wx.createSelectorQuery() | ||||
|             .in(context) | ||||
|             .selectAll(selector) | ||||
|             .boundingClientRect() | ||||
|             .exec((rect = []) => resolve(rect[0])); | ||||
|     }); | ||||
| } | ||||
| export function groupSetData(context, cb) { | ||||
|     if (canIUseGroupSetData()) { | ||||
|         context.groupSetData(cb); | ||||
|     } | ||||
|     else { | ||||
|         cb(); | ||||
|     } | ||||
| } | ||||
| export function toPromise(promiseLike) { | ||||
|     if (isPromise(promiseLike)) { | ||||
|         return promiseLike; | ||||
|     } | ||||
|     return Promise.resolve(promiseLike); | ||||
| } | ||||
| // 浮点数精度处理 | ||||
| export function addNumber(num1, num2) { | ||||
|     const cardinal = Math.pow(10, 10); | ||||
|     return Math.round((num1 + num2) * cardinal) / cardinal; | ||||
| } | ||||
| // 限制value在[min, max]之间 | ||||
| export const clamp = (num, min, max) => Math.min(Math.max(num, min), max); | ||||
| export function getCurrentPage() { | ||||
|     const pages = getCurrentPages(); | ||||
|     return pages[pages.length - 1]; | ||||
| } | ||||
| export const isPC = ['mac', 'windows'].includes(getSystemInfoSync().platform); | ||||
| // 是否企业微信 | ||||
| export const isWxWork = getSystemInfoSync().environment === 'wxwork'; | ||||
							
								
								
									
										9
									
								
								node_modules/@vant/weapp/dist/common/validator.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										9
									
								
								node_modules/@vant/weapp/dist/common/validator.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,9 @@ | ||||
| export declare function isFunction(val: unknown): val is Function; | ||||
| export declare function isPlainObject(val: unknown): val is Record<string, unknown>; | ||||
| export declare function isPromise<T = unknown>(val: unknown): val is Promise<T>; | ||||
| export declare function isDef(value: unknown): boolean; | ||||
| export declare function isObj(x: unknown): x is Record<string, unknown>; | ||||
| export declare function isNumber(value: string): boolean; | ||||
| export declare function isBoolean(value: unknown): value is boolean; | ||||
| export declare function isImageUrl(url: string): boolean; | ||||
| export declare function isVideoUrl(url: string): boolean; | ||||
							
								
								
									
										31
									
								
								node_modules/@vant/weapp/dist/common/validator.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										31
									
								
								node_modules/@vant/weapp/dist/common/validator.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,31 @@ | ||||
| // eslint-disable-next-line @typescript-eslint/ban-types | ||||
| export function isFunction(val) { | ||||
|     return typeof val === 'function'; | ||||
| } | ||||
| export function isPlainObject(val) { | ||||
|     return val !== null && typeof val === 'object' && !Array.isArray(val); | ||||
| } | ||||
| export function isPromise(val) { | ||||
|     return isPlainObject(val) && isFunction(val.then) && isFunction(val.catch); | ||||
| } | ||||
| export function isDef(value) { | ||||
|     return value !== undefined && value !== null; | ||||
| } | ||||
| export function isObj(x) { | ||||
|     const type = typeof x; | ||||
|     return x !== null && (type === 'object' || type === 'function'); | ||||
| } | ||||
| export function isNumber(value) { | ||||
|     return /^\d+(\.\d+)?$/.test(value); | ||||
| } | ||||
| export function isBoolean(value) { | ||||
|     return typeof value === 'boolean'; | ||||
| } | ||||
| const IMAGE_REGEXP = /\.(jpeg|jpg|gif|png|svg|webp|jfif|bmp|dpg)/i; | ||||
| const VIDEO_REGEXP = /\.(mp4|mpg|mpeg|dat|asf|avi|rm|rmvb|mov|wmv|flv|mkv)/i; | ||||
| export function isImageUrl(url) { | ||||
|     return IMAGE_REGEXP.test(url); | ||||
| } | ||||
| export function isVideoUrl(url) { | ||||
|     return VIDEO_REGEXP.test(url); | ||||
| } | ||||
							
								
								
									
										15
									
								
								node_modules/@vant/weapp/dist/common/version.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								node_modules/@vant/weapp/dist/common/version.d.ts
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,15 @@ | ||||
| /// <reference types="miniprogram-api-typings" /> | ||||
| interface WxWorkSystemInfo extends WechatMiniprogram.SystemInfo { | ||||
|     environment?: 'wxwork'; | ||||
| } | ||||
| interface SystemInfo extends WxWorkSystemInfo, WechatMiniprogram.SystemInfo { | ||||
| } | ||||
| export declare function getSystemInfoSync(): SystemInfo; | ||||
| export declare function canIUseModel(): boolean; | ||||
| export declare function canIUseFormFieldButton(): boolean; | ||||
| export declare function canIUseAnimate(): boolean; | ||||
| export declare function canIUseGroupSetData(): boolean; | ||||
| export declare function canIUseNextTick(): boolean; | ||||
| export declare function canIUseCanvas2d(): boolean; | ||||
| export declare function canIUseGetUserProfile(): boolean; | ||||
| export {}; | ||||
							
								
								
									
										59
									
								
								node_modules/@vant/weapp/dist/common/version.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										59
									
								
								node_modules/@vant/weapp/dist/common/version.js
									
									
									
										generated
									
									
										vendored
									
									
										Normal file
									
								
							| @@ -0,0 +1,59 @@ | ||||
| let systemInfo; | ||||
| export function getSystemInfoSync() { | ||||
|     if (systemInfo == null) { | ||||
|         systemInfo = wx.getSystemInfoSync(); | ||||
|     } | ||||
|     return systemInfo; | ||||
| } | ||||
| function compareVersion(v1, v2) { | ||||
|     v1 = v1.split('.'); | ||||
|     v2 = v2.split('.'); | ||||
|     const len = Math.max(v1.length, v2.length); | ||||
|     while (v1.length < len) { | ||||
|         v1.push('0'); | ||||
|     } | ||||
|     while (v2.length < len) { | ||||
|         v2.push('0'); | ||||
|     } | ||||
|     for (let i = 0; i < len; i++) { | ||||
|         const num1 = parseInt(v1[i], 10); | ||||
|         const num2 = parseInt(v2[i], 10); | ||||
|         if (num1 > num2) { | ||||
|             return 1; | ||||
|         } | ||||
|         if (num1 < num2) { | ||||
|             return -1; | ||||
|         } | ||||
|     } | ||||
|     return 0; | ||||
| } | ||||
| function gte(version) { | ||||
|     const system = getSystemInfoSync(); | ||||
|     return compareVersion(system.SDKVersion, version) >= 0; | ||||
| } | ||||
| export function canIUseModel() { | ||||
|     return gte('2.9.3'); | ||||
| } | ||||
| export function canIUseFormFieldButton() { | ||||
|     return gte('2.10.3'); | ||||
| } | ||||
| export function canIUseAnimate() { | ||||
|     return gte('2.9.0'); | ||||
| } | ||||
| export function canIUseGroupSetData() { | ||||
|     return gte('2.4.0'); | ||||
| } | ||||
| export function canIUseNextTick() { | ||||
|     try { | ||||
|         return wx.canIUse('nextTick'); | ||||
|     } | ||||
|     catch (e) { | ||||
|         return gte('2.7.1'); | ||||
|     } | ||||
| } | ||||
| export function canIUseCanvas2d() { | ||||
|     return gte('2.9.0'); | ||||
| } | ||||
| export function canIUseGetUserProfile() { | ||||
|     return !!wx.getUserProfile; | ||||
| } | ||||
		Reference in New Issue
	
	Block a user