Skip to content

Commit

Permalink
build: compile 1.11.2
Browse files Browse the repository at this point in the history
  • Loading branch information
landluck committed Dec 5, 2023
1 parent d869a81 commit c3ae27b
Show file tree
Hide file tree
Showing 22 changed files with 46 additions and 8 deletions.
2 changes: 2 additions & 0 deletions dist/calendar/calendar.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<wxs src="./index.wxs" module="computed" />
<wxs src="../wxs/utils.wxs" module="utils" />
<view class="van-calendar">
<header
title="{{ title }}"
Expand Down
1 change: 1 addition & 0 deletions dist/common/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ 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;
2 changes: 2 additions & 0 deletions dist/common/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -82,3 +82,5 @@ export function getCurrentPage() {
return pages[pages.length - 1];
}
export const isPC = ['mac', 'windows'].includes(getSystemInfoSync().platform);
// 是否企业微信
export const isWxWork = getSystemInfoSync().environment === 'wxwork';
8 changes: 7 additions & 1 deletion dist/common/version.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
/// <reference types="miniprogram-api-typings" />
export declare function getSystemInfoSync(): WechatMiniprogram.SystemInfo;
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 {};
2 changes: 2 additions & 0 deletions dist/dialog/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
show-message-card="{{ showMessageCard }}"
app-parameter="{{ appParameter }}"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bind:click="onConfirm"
bindgetuserinfo="onGetUserInfo"
bindcontact="onContact"
Expand Down Expand Up @@ -107,6 +108,7 @@
show-message-card="{{ showMessageCard }}"
app-parameter="{{ appParameter }}"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bind:click="onConfirm"
bindgetuserinfo="onGetUserInfo"
bindcontact="onContact"
Expand Down
1 change: 1 addition & 0 deletions dist/field/input.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<input
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class"
Expand Down
2 changes: 2 additions & 0 deletions dist/field/textarea.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<textarea
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class"
Expand Down
1 change: 1 addition & 0 deletions dist/goods-action-button/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
bindopensetting="onOpenSetting"
bindgetuserinfo="onGetUserInfo"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bindgetphonenumber="onGetPhoneNumber"
bindlaunchapp="onLaunchApp"
>
Expand Down
2 changes: 1 addition & 1 deletion dist/icon/index.wxss

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions dist/popup/popup.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<view
wx:if="{{ inited }}"
class="custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop, safeTabBar: safeAreaTabBar }]) }}"
Expand Down
4 changes: 2 additions & 2 deletions dist/uploader/utils.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { pickExclude, isPC } from '../common/utils';
import { pickExclude, isPC, isWxWork } from '../common/utils';
import { isImageUrl, isVideoUrl } from '../common/validator';
export function isImageFile(item) {
if (item.isImage != null) {
Expand Down Expand Up @@ -42,7 +42,7 @@ export function chooseFile({ accept, multiple, capture, compressed, maxDuration,
return new Promise((resolve, reject) => {
switch (accept) {
case 'image':
if (isPC) {
if (isPC || isWxWork) {
wx.chooseImage({
count: multiple ? Math.min(maxCount, 9) : 1,
sourceType: capture,
Expand Down
2 changes: 2 additions & 0 deletions lib/calendar/calendar.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<wxs src="./index.wxs" module="computed" />
<wxs src="../wxs/utils.wxs" module="utils" />
<view class="van-calendar">
<header
title="{{ title }}"
Expand Down
1 change: 1 addition & 0 deletions lib/common/utils.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@ 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;
4 changes: 3 additions & 1 deletion lib/common/utils.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.isPC = exports.getCurrentPage = exports.clamp = exports.addNumber = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.nextTick = exports.range = exports.getSystemInfoSync = exports.isDef = void 0;
exports.isWxWork = exports.isPC = exports.getCurrentPage = exports.clamp = exports.addNumber = exports.toPromise = exports.groupSetData = exports.getAllRect = exports.getRect = exports.pickExclude = exports.requestAnimationFrame = exports.addUnit = exports.nextTick = exports.range = exports.getSystemInfoSync = exports.isDef = void 0;
var validator_1 = require("./validator");
var version_1 = require("./version");
var validator_2 = require("./validator");
Expand Down Expand Up @@ -105,3 +105,5 @@ function getCurrentPage() {
}
exports.getCurrentPage = getCurrentPage;
exports.isPC = ['mac', 'windows'].includes((0, version_1.getSystemInfoSync)().platform);
// 是否企业微信
exports.isWxWork = (0, version_1.getSystemInfoSync)().environment === 'wxwork';
8 changes: 7 additions & 1 deletion lib/common/version.d.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
/// <reference types="miniprogram-api-typings" />
export declare function getSystemInfoSync(): WechatMiniprogram.SystemInfo;
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 {};
2 changes: 2 additions & 0 deletions lib/dialog/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
show-message-card="{{ showMessageCard }}"
app-parameter="{{ appParameter }}"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bind:click="onConfirm"
bindgetuserinfo="onGetUserInfo"
bindcontact="onContact"
Expand Down Expand Up @@ -107,6 +108,7 @@
show-message-card="{{ showMessageCard }}"
app-parameter="{{ appParameter }}"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bind:click="onConfirm"
bindgetuserinfo="onGetUserInfo"
bindcontact="onContact"
Expand Down
1 change: 1 addition & 0 deletions lib/field/input.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<input
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, { disabled, error }]) }} input-class"
Expand Down
2 changes: 2 additions & 0 deletions lib/field/textarea.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<textarea
id="{{ name }}"
class="{{ utils.bem('field__control', [inputAlign, type, { disabled, error }]) }} input-class"
Expand Down
1 change: 1 addition & 0 deletions lib/goods-action-button/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
bindopensetting="onOpenSetting"
bindgetuserinfo="onGetUserInfo"
bindagreeprivacyauthorization="onAgreePrivacyAuthorization"
bindgetRealTimePhoneNumber="onGetRealTimePhoneNumber"
bindgetphonenumber="onGetPhoneNumber"
bindlaunchapp="onLaunchApp"
>
Expand Down
2 changes: 1 addition & 1 deletion lib/icon/index.wxss

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions lib/popup/popup.wxml
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<wxs src="../wxs/utils.wxs" module="utils" />
<wxs src="./index.wxs" module="computed" />
<view
wx:if="{{ inited }}"
class="custom-class {{ classes }} {{ utils.bem('popup', [position, { round, safe: safeAreaInsetBottom, safeTop: safeAreaInsetTop, safeTabBar: safeAreaTabBar }]) }}"
Expand Down
2 changes: 1 addition & 1 deletion lib/uploader/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function chooseFile(_a) {
return new Promise(function (resolve, reject) {
switch (accept) {
case 'image':
if (utils_1.isPC) {
if (utils_1.isPC || utils_1.isWxWork) {
wx.chooseImage({
count: multiple ? Math.min(maxCount, 9) : 1,
sourceType: capture,
Expand Down

0 comments on commit c3ae27b

Please sign in to comment.