Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
fxy060608 committed May 2, 2022
1 parent 98f8328 commit aa71541
Show file tree
Hide file tree
Showing 19 changed files with 878 additions and 142 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
"rollup-plugin-vue": "^6.0.0",
"semver": "^7.3.5",
"ts-jest": "^27.0.3",
"typescript": "4.6.3",
"typescript": "4.6.4",
"vite": "^2.9.6",
"vue": "3.2.33",
"vue-router": "^4.0.14",
Expand Down
6 changes: 3 additions & 3 deletions packages/uni-app-plus/dist/uni-app-view.umd.js

Large diffs are not rendered by default.

28 changes: 18 additions & 10 deletions packages/uni-app-plus/dist/uni.runtime.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2257,6 +2257,8 @@ function initLaunchOptions({ path, query, referrerInfo, }) {
path,
query: query ? parseQuery(query) : {},
referrerInfo: referrerInfo || {},
channel: plus.runtime.channel,
launcher: plus.runtime.launcher,
});
extend(enterOptions, launchOptions);
return extend({}, launchOptions);
Expand Down Expand Up @@ -13260,9 +13262,12 @@ function getScreenInfo() {
};
}
const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
const platform = plus.os.name.toLowerCase();
const ios = platform === 'ios';
const isAndroid = platform === 'android';
const { getSystemInfoSync } = weex.requireModule('plus');
const info = getSystemInfoSync();
const { deviceBrand, deviceModel, osName, osVersion, osLanguage } = info;
const brand = deviceBrand.toLowerCase();
const _osName = osName.toLowerCase();
const ios = _osName === 'ios';
const { screenWidth, screenHeight } = getScreenInfo();
const statusBarHeight = getStatusbarHeight();
let safeAreaInsets;
Expand Down Expand Up @@ -13322,19 +13327,19 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
width: windowWidth - safeAreaInsets.left - safeAreaInsets.right,
height: windowHeightReal - safeAreaInsets.top - safeAreaInsets.bottom,
};
return {
brand: plus.device.vendor,
model: plus.device.model,
return extend({
brand: brand,
model: deviceModel,
pixelRatio: plus.screen.scale,
screenWidth,
screenHeight,
windowWidth,
windowHeight,
statusBarHeight,
language: plus.os.language,
system: `${ios ? 'iOS' : isAndroid ? 'Android' : ''} ${plus.os.version}`,
language: osLanguage,
system: `${osName} ${osVersion}`,
version: plus.runtime.innerVersion,
platform,
platform: _osName,
SDKVersion: '',
windowTop,
windowBottom,
Expand All @@ -13346,7 +13351,10 @@ const getSystemInfoSync = defineSyncApi('getSystemInfoSync', () => {
left: safeAreaInsets.left,
},
deviceId: deviceId$1(),
};
}, info, {
deviceBrand: brand,
osName: _osName,
});
});
const getSystemInfo = defineAsyncApi('getSystemInfo', (_, { resolve }) => {
return resolve(getSystemInfoSync());
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-cli-shared/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
"@vue/compiler-sfc": "3.2.33",
"@vue/server-renderer": "3.2.33",
"@vue/shared": "3.2.33",
"autoprefixer": "^10.4.5",
"autoprefixer": "^10.4.6",
"base64url": "^3.0.1",
"chokidar": "^3.5.3",
"compare-versions": "^3.6.0",
Expand Down
10 changes: 7 additions & 3 deletions packages/uni-h5/dist/uni-h5.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -5049,6 +5049,7 @@ function parseNodes(nodes, parentNode, scopeId, triggerItemClick) {
if (!elem) {
return;
}
scopeId && elem.setAttribute(scopeId, "");
const attrs = node.attrs;
if (shared.isPlainObject(attrs)) {
const tagAttrs = TAGS[tagName] || [];
Expand All @@ -5059,7 +5060,6 @@ function parseNodes(nodes, parentNode, scopeId, triggerItemClick) {
Array.isArray(value) && (value = value.join(" "));
case "style":
elem.setAttribute(name, value);
scopeId && elem.setAttribute(scopeId, "");
break;
default:
if (tagAttrs.indexOf(name) !== -1) {
Expand Down Expand Up @@ -6458,10 +6458,14 @@ const props$a = /* @__PURE__ */ shared.extend({}, props$k, {
},
confirmType: {
type: String,
default: ""
default: "return",
validator(val) {
return ConfirmTypes.concat("return").includes(val);
}
}
});
let fixMargin = false;
const ConfirmTypes = ["done", "go", "next", "search", "send"];
var index$i = /* @__PURE__ */ defineBuiltInComponent({
name: "Textarea",
props: props$a,
Expand All @@ -6478,7 +6482,7 @@ var index$i = /* @__PURE__ */ defineBuiltInComponent({
trigger
} = useField(props2, rootRef, emit2);
const valueCompute = vue.computed(() => state.value.split(uniShared.LINEFEED));
const isDone = vue.computed(() => ["done", "go", "next", "search", "send"].includes(props2.confirmType));
const isDone = vue.computed(() => ConfirmTypes.includes(props2.confirmType));
const heightRef = vue.ref(0);
const lineRef = vue.ref(null);
vue.watch(() => heightRef.value, (height) => {
Expand Down
75 changes: 64 additions & 11 deletions packages/uni-h5/dist/uni-h5.es.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { withModifiers, createVNode, getCurrentInstance, ref, defineComponent, openBlock, createElementBlock, provide, computed, watch, onUnmounted, inject, onBeforeUnmount, mergeProps, injectHook, reactive, onActivated, onMounted, nextTick, onBeforeMount, withDirectives, vShow, shallowRef, watchEffect, isVNode, Fragment, markRaw, Comment, createTextVNode, onBeforeActivate, onBeforeDeactivate, createBlock, renderList, onDeactivated, createApp, Transition, effectScope, withCtx, KeepAlive, resolveDynamicComponent, createElementVNode, normalizeStyle, renderSlot } from "vue";
import { isString, extend, isArray, remove, stringifyStyle, parseStringStyle, isPlainObject, isFunction, capitalize, camelize, hasOwn, isObject, toRawType, makeMap as makeMap$1, isPromise, hyphenate, invokeArrayFns as invokeArrayFns$1 } from "@vue/shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, addLeadingSlash, invokeArrayFns, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, removeLeadingSlash, getLen, debounce, ON_LOAD, UniLifecycleHooks, invokeCreateVueAppHook, NAVBAR_HEIGHT, parseQuery, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, updateElementStyle, ON_BACK_PRESS, parseUrl, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
import { once, UNI_STORAGE_LOCALE, I18N_JSON_DELIMITERS, Emitter, passive, initCustomDatasetOnce, resolveComponentInstance, addLeadingSlash, invokeArrayFns, resolveOwnerVm, resolveOwnerEl, ON_WXS_INVOKE_CALL_METHOD, normalizeTarget, ON_RESIZE, ON_APP_ENTER_FOREGROUND, ON_APP_ENTER_BACKGROUND, ON_SHOW, ON_HIDE, ON_PAGE_SCROLL, ON_REACH_BOTTOM, EventChannel, SCHEME_RE, DATA_RE, getCustomDataset, LINEFEED, ON_ERROR, callOptions, ON_UNHANDLE_REJECTION, ON_PAGE_NOT_FOUND, PRIMARY_COLOR, removeLeadingSlash, getLen, debounce, ON_LOAD, UniLifecycleHooks, invokeCreateVueAppHook, NAVBAR_HEIGHT, parseQuery, ON_UNLOAD, ON_REACH_BOTTOM_DISTANCE, decodedQuery, WEB_INVOKE_APPSERVICE, ON_WEB_INVOKE_APP_SERVICE, updateElementStyle, IEVersion, getDeviceBrand, ON_BACK_PRESS, parseUrl, addFont, scrollTo, RESPONSIVE_MIN_WIDTH, onCreateVueApp, formatDateTime, ON_NAVIGATION_BAR_BUTTON_TAP, ON_NAVIGATION_BAR_SEARCH_INPUT_CLICKED, ON_NAVIGATION_BAR_SEARCH_INPUT_FOCUS_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CHANGED, ON_NAVIGATION_BAR_SEARCH_INPUT_CONFIRMED, ON_PULL_DOWN_REFRESH } from "@dcloudio/uni-shared";
export { onCreateVueApp } from "@dcloudio/uni-shared";
import { initVueI18n, isI18nStr, LOCALE_EN, LOCALE_ES, LOCALE_FR, LOCALE_ZH_HANS, LOCALE_ZH_HANT } from "@dcloudio/uni-i18n";
import { useRoute, createRouter, createWebHistory, createWebHashHistory, useRouter, isNavigationFailure, RouterView } from "vue-router";
Expand Down Expand Up @@ -1202,11 +1202,14 @@ function resolveOwnerComponentPublicInstance(eventValue, instance2, checkArgsLen
}
function wrapperH5WxsEvent(event, eventValue, instance2, checkArgsLength = true) {
if (eventValue) {
Object.defineProperty(event, "instance", {
get() {
return getComponentDescriptor(instance2.proxy, false);
}
});
if (!event.__instance) {
event.__instance = true;
Object.defineProperty(event, "instance", {
get() {
return getComponentDescriptor(instance2.proxy, false);
}
});
}
const ownerVm = resolveOwnerComponentPublicInstance(eventValue, instance2, checkArgsLength);
if (ownerVm) {
return [event, getComponentDescriptor(ownerVm, false)];
Expand Down Expand Up @@ -11735,6 +11738,7 @@ function parseNodes(nodes, parentNode, scopeId, triggerItemClick) {
if (!elem) {
return;
}
scopeId && elem.setAttribute(scopeId, "");
const attrs2 = node.attrs;
if (isPlainObject(attrs2)) {
const tagAttrs = TAGS[tagName] || [];
Expand All @@ -11745,7 +11749,6 @@ function parseNodes(nodes, parentNode, scopeId, triggerItemClick) {
Array.isArray(value) && (value = value.join(" "));
case "style":
elem.setAttribute(name, value);
scopeId && elem.setAttribute(scopeId, "");
break;
default:
if (tagAttrs.indexOf(name) !== -1) {
Expand Down Expand Up @@ -13452,10 +13455,14 @@ const props$h = /* @__PURE__ */ extend({}, props$r, {
},
confirmType: {
type: String,
default: ""
default: "return",
validator(val) {
return ConfirmTypes.concat("return").includes(val);
}
}
});
let fixMargin = false;
const ConfirmTypes = ["done", "go", "next", "search", "send"];
function setFixMargin() {
const DARK_TEST_STRING = "(prefers-color-scheme: dark)";
fixMargin = String(navigator.platform).indexOf("iP") === 0 && String(navigator.vendor).indexOf("Apple") === 0 && window.matchMedia(DARK_TEST_STRING).media !== DARK_TEST_STRING;
Expand All @@ -13476,7 +13483,7 @@ var index$i = /* @__PURE__ */ defineBuiltInComponent({
trigger
} = useField(props2, rootRef, emit2);
const valueCompute = computed(() => state2.value.split(LINEFEED));
const isDone = computed(() => ["done", "go", "next", "search", "send"].includes(props2.confirmType));
const isDone = computed(() => ConfirmTypes.includes(props2.confirmType));
const heightRef = ref(0);
const lineRef = ref(null);
watch(() => heightRef.value, (height) => {
Expand Down Expand Up @@ -16291,6 +16298,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
let osname;
let osversion;
let model = "";
let deviceType = "phone";
if (isIOS$1) {
osname = "iOS";
const osversionFind = ua.match(/OS\s([\w_]+)\slike/);
Expand Down Expand Up @@ -16342,10 +16350,12 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
} else if (isIPadOS) {
model = "iPad";
osname = "iOS";
deviceType = "pad";
osversion = typeof window.BigInt === "function" ? "14.0" : "13.0";
} else if (isWindows || isMac || isLinux) {
model = "PC";
osname = "PC";
deviceType = "pc";
osversion = "0";
let osversionFind = ua.match(/\((.+?)\)/)[1];
if (isWindows) {
Expand Down Expand Up @@ -16396,6 +16406,7 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
} else {
osname = "Other";
osversion = "0";
deviceType = "other";
}
const system = `${osname} ${osversion}`;
const platform = osname.toLocaleLowerCase();
Expand All @@ -16410,6 +16421,27 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
const { top: windowTop, bottom: windowBottom } = getWindowOffset();
windowHeight -= windowTop;
windowHeight -= windowBottom;
let browserName = "";
let browseVersion = String(IEVersion());
if (browseVersion !== "-1") {
browserName = "IE";
} else {
const browseVendors = ["Version", "Firefox", "Chrome", "Edge{0,1}"];
const vendors = ["Safari", "Firefox", "Chrome", "Edge"];
for (let index2 = 0; index2 < browseVendors.length; index2++) {
const vendor = browseVendors[index2];
const reg = new RegExp(`(${vendor})/(\\S*)\\b`);
if (reg.test(ua)) {
browserName = vendors[index2];
browseVersion = ua.match(reg)[2];
}
}
}
let deviceBrand = "";
if (model) {
const _model = model.toLocaleLowerCase();
deviceBrand = getDeviceBrand(_model) || getDeviceBrand(osname.toLocaleLowerCase()) || _model.split(" ")[0];
}
return {
windowTop,
windowBottom,
Expand All @@ -16422,6 +16454,8 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
statusBarHeight,
system,
platform,
deviceBrand,
deviceType,
model,
safeArea,
safeAreaInsets: {
Expand All @@ -16430,9 +16464,28 @@ const getSystemInfoSync = /* @__PURE__ */ defineSyncApi("getSystemInfoSync", ()
bottom: out.bottom,
left: out.left
},
version: "",
version: __uniConfig.appVersion,
SDKVersion: "",
deviceId: deviceId$1()
deviceId: deviceId$1(),
ua,
uniPlatform: "web",
browserName,
browseVersion,
osLanguage: language,
osName: osname,
osVersion: osversion,
hostLanguage: language,
uniCompileVersion: __uniConfig.compilerVersion,
uniRuntimeVersion: __uniConfig.compilerVersion,
appId: __uniConfig.appId,
appName: __uniConfig.appName,
appVersion: __uniConfig.appVersion,
appVersionCode: __uniConfig.appVersionCode,
hostName: browserName,
hostVersion: browseVersion,
osTheme: "",
hostTheme: "",
hostPackageName: ""
};
});
const getSystemInfo = /* @__PURE__ */ defineAsyncApi("getSystemInfo", (_args, { resolve }) => {
Expand Down
Loading

0 comments on commit aa71541

Please sign in to comment.