Skip to content

Commit

Permalink
chore: build
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed Jul 19, 2024
1 parent 739b9d6 commit 4dce467
Show file tree
Hide file tree
Showing 11 changed files with 227 additions and 591 deletions.
590 changes: 81 additions & 509 deletions packages/uni-app-harmony/dist/uni.api.ets

Large diffs are not rendered by default.

68 changes: 41 additions & 27 deletions packages/uni-app-harmony/dist/uni.runtime.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -9108,11 +9108,6 @@ function removeIntersectionObserver({ reqId, component }, _pageId) {
UniServiceJSBridge.unsubscribe(getEventName(reqId));
}

let nativeApp;
function getNativeApp() {
return nativeApp;
}

const EVENT_BACKBUTTON = 'backbutton';
function backbuttonListener() {
uni.navigateBack({
Expand All @@ -9132,9 +9127,7 @@ function initLaunchOptions({ path, query, referrerInfo, }) {
launcher: plus.runtime.launcher,
});
extend(enterOptions$1, launchOptions$1);
const app = getNativeApp();
const schemaLink = app.getLaunchOptionsSync();
return extend({}, launchOptions$1, schemaLink);
return enterOptions$1;
}

const TEMP_PATH = ''; // TODO 需要从applicationContext获取
Expand Down Expand Up @@ -9163,6 +9156,13 @@ function operateVideoPlayer(videoId, pageId, type, data) {
}, pageId);
}

function operateMap(id, pageId, type, data, operateMapCallback) {
UniServiceJSBridge.invokeViewMethod('map.' + id, {
type,
data,
}, pageId, operateMapCallback);
}

const API_ADD_INTERCEPTOR = 'addInterceptor';
const API_REMOVE_INTERCEPTOR = 'removeInterceptor';
const AddInterceptorProtocol = [
Expand Down Expand Up @@ -9316,74 +9316,87 @@ const createVideoContext = defineSyncApi(API_CREATE_VIDEO_CONTEXT, (id, context)
return new VideoContext(id, getPageIdByVm(getCurrentPageVm()));
});

const operateMapCallback = (options, res) => {
const errMsg = res.errMsg || '';
if (new RegExp('\\:\\s*fail').test(errMsg)) {
options.fail && options.fail(res);
}
else {
options.success && options.success(res);
}
options.complete && options.complete(res);
};
const operateMapWrap = (id, pageId, type, options) => {
operateMap(id, pageId, type, options, (res) => {
options && operateMapCallback(options, res);
});
};
class MapContext {
constructor(id, pageId) {
this.id = id;
this.pageId = pageId;
}
getCenterLocation(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'getCenterLocation', options);
}
moveToLocation(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'moveToLocation', options);
}
getScale(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'getScale', options);
}
getRegion(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'getRegion', options);
}
includePoints(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'includePoints', options);
}
translateMarker(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'translateMarker', options);
}
$getAppMap() {
{
return plus.maps.getMapById(this.pageId + '-map-' + this.id);
}
}
addCustomLayer(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'addCustomLayer', options);
}
removeCustomLayer(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'removeCustomLayer', options);
}
addGroundOverlay(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'addGroundOverlay', options);
}
removeGroundOverlay(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'removeGroundOverlay', options);
}
updateGroundOverlay(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'updateGroundOverlay', options);
}
initMarkerCluster(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'initMarkerCluster', options);
}
addMarkers(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'addMarkers', options);
}
removeMarkers(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'removeMarkers', options);
}
moveAlong(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'moveAlong', options);
}
setLocMarkerIcon(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'setLocMarkerIcon', options);
}
openMapApp(options) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'openMapApp', options);
}
on(name, callback) {
operateMapWrap(this.id, this.pageId);
operateMapWrap(this.id, this.pageId, 'on', { name, callback });
}
}
defineSyncApi(API_CREATE_MAP_CONTEXT, (id, context) => {
const createMapContext = defineSyncApi(API_CREATE_MAP_CONTEXT, (id, context) => {
if (context) {
return new MapContext(id, getPageIdByVm(context));
}
Expand Down Expand Up @@ -13313,6 +13326,7 @@ var uni$1 = {
createAnimation: createAnimation,
createCanvasContext: createCanvasContext,
createIntersectionObserver: createIntersectionObserver,
createMapContext: createMapContext,
createMediaQueryObserver: createMediaQueryObserver,
createSelectorQuery: createSelectorQuery,
createVideoContext: createVideoContext,
Expand Down
2 changes: 1 addition & 1 deletion packages/uni-app-plus/dist/uni-app-view.umd.js

Large diffs are not rendered by default.

9 changes: 1 addition & 8 deletions packages/uni-app-plus/dist/uni.runtime.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -2386,11 +2386,6 @@ function getExtName(path) {
return array.length > 1 ? '.' + array[array.length - 1] : '';
}

let nativeApp;
function getNativeApp() {
return nativeApp;
}

const EVENT_BACKBUTTON = 'backbutton';
function backbuttonListener() {
uni.navigateBack({
Expand Down Expand Up @@ -2423,9 +2418,7 @@ function initLaunchOptions({ path, query, referrerInfo, }) {
launcher: plus.runtime.launcher,
});
extend(enterOptions, launchOptions);
const app = getNativeApp();
const schemaLink = app.getLaunchOptionsSync();
return extend({}, launchOptions, schemaLink);
return enterOptions;
}
function parseRedirectInfo() {
const weexPlus = weex.requireModule('plus');
Expand Down
79 changes: 53 additions & 26 deletions packages/uni-app-plus/dist/uni.x.runtime.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -531,16 +531,6 @@ function removePage(curPage) {
}
pages.splice(index2, 1);
}
var nativeApp;
function getNativeApp() {
return nativeApp;
}
function setNativeApp(app) {
nativeApp = app;
}
function getPageManager() {
return nativeApp.pageManager;
}
function backbuttonListener() {
uni.navigateBack({
from: "backbutton",
Expand All @@ -549,29 +539,27 @@ function backbuttonListener() {
// 传入空方法,避免返回Promise,因为onBackPress可能导致fail
});
}
var enterOptions = /* @__PURE__ */ createLaunchOptions();
var launchOptions = /* @__PURE__ */ createLaunchOptions();
var enterOptions$1 = /* @__PURE__ */ createLaunchOptions();
var launchOptions$1 = /* @__PURE__ */ createLaunchOptions();
function getLaunchOptions() {
return extend({}, launchOptions);
return extend({}, launchOptions$1);
}
function initLaunchOptions(_ref2) {
var {
path,
query,
referrerInfo
} = _ref2;
extend(launchOptions, {
extend(launchOptions$1, {
path,
query: query ? parseQuery(query) : {},
referrerInfo: referrerInfo || {},
// TODO uni-app x
channel: void 0,
launcher: void 0
});
extend(enterOptions, launchOptions);
var app = getNativeApp();
var schemaLink = app.getLaunchOptionsSync();
return extend({}, launchOptions, schemaLink);
extend(enterOptions$1, launchOptions$1);
return enterOptions$1;
}
var API_ADD_INTERCEPTOR = "addInterceptor";
var API_REMOVE_INTERCEPTOR = "removeInterceptor";
Expand Down Expand Up @@ -1037,6 +1025,16 @@ function createFactory(component) {
return setupPage(component);
};
}
var nativeApp;
function getNativeApp() {
return nativeApp;
}
function setNativeApp(app) {
nativeApp = app;
}
function getPageManager() {
return nativeApp.pageManager;
}
var ON_BACK_BUTTON = "onBackButton";
var ON_POP_GESTURE = "onPopGesture";
function hasLeadingSlash(str) {
Expand Down Expand Up @@ -2376,11 +2374,30 @@ var stopPullDownRefresh = /* @__PURE__ */ defineAsyncApi(API_STOP_PULL_DOWN_REFR
res.resolve();
});
var API_GET_LAUNCH_OPTIONS_SYNC = "getLaunchOptionsSync";
var launchOptions = {
path: "",
appScheme: null,
appLink: null
};
var setLaunchOptionsSync = function(options) {
launchOptions = options;
};
var getLaunchOptionsSync = /* @__PURE__ */ defineSyncApi(API_GET_LAUNCH_OPTIONS_SYNC, () => {
var app = getNativeApp();
var baseInfo = getLaunchOptions();
var schemaInfo = app.getLaunchOptionsSync();
return Object.assign({}, baseInfo, schemaInfo);
return Object.assign({}, baseInfo, launchOptions);
});
var API_GET_ENTER_OPTIONS_SYNC = "getEnterOptionsSync";
var enterOptions = {
path: "",
appScheme: null,
appLink: null
};
var setEnterOptionsSync = function(options) {
enterOptions = options;
};
var getEnterOptionsSync = /* @__PURE__ */ defineSyncApi(API_GET_ENTER_OPTIONS_SYNC, () => {
var baseInfo = getLaunchOptions();
return Object.assign({}, baseInfo, enterOptions);
});
var env = {
USER_DATA_PATH: "unifile://usr/",
Expand Down Expand Up @@ -3203,6 +3220,7 @@ const uni$1 = /* @__PURE__ */ Object.defineProperty({
createSelectorQuery,
env,
getElementById,
getEnterOptionsSync,
getLaunchOptionsSync,
getPerformance,
hideTabBar,
Expand Down Expand Up @@ -3285,8 +3303,13 @@ function initAppLaunch(appVm) {
query: entryPageQuery,
referrerInfo
});
invokeHook(appVm, ON_LAUNCH, args);
invokeHook(appVm, ON_SHOW, args);
var app = getNativeApp();
var schemaLink = app.getLaunchOptionsSync();
var launchOption = extend({}, args, schemaLink);
setLaunchOptionsSync(launchOption);
invokeHook(appVm, ON_LAUNCH, launchOption);
var showOption = extend({}, launchOption);
invokeHook(appVm, ON_SHOW, showOption);
var appStyle = appVm.$options.styles;
if (appStyle) {
loadFontFaceByStyles(appStyle, true);
Expand Down Expand Up @@ -3327,10 +3350,14 @@ function initSubscribeHandlers() {
}
function initOn(app) {
app.addEventListener(ON_SHOW, function(event) {
var page = getCurrentPage();
invokeHook(getApp(), ON_SHOW, {
var app2 = getNativeApp();
var schemaLink = app2.getLaunchOptionsSync();
var showOptions = extend({
path: __uniConfig.entryPagePath
});
}, schemaLink);
setEnterOptionsSync(showOptions);
var page = getCurrentPage();
invokeHook(getApp(), ON_SHOW, showOptions);
if (page) {
invokeHook(page, ON_SHOW);
}
Expand Down
4 changes: 3 additions & 1 deletion packages/uni-app-vue/dist/uvue.runtime.esm.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -9478,7 +9478,9 @@ function transformAttr(el, key, value, instance) {
}
if (opts["style"].indexOf(camelized) > -1) {
if (isString(value)) {
return [camelized, parseStringStyle(value)];
var _style = camelize(value);
var sytle2 = parseStringStyle(_style);
return [camelized, sytle2];
}
return [camelized, normalizeStyle$1(value)];
}
Expand Down
4 changes: 3 additions & 1 deletion packages/uni-app-vue/dist/uvue.runtime.esm.prod.js
Original file line number Diff line number Diff line change
Expand Up @@ -7928,7 +7928,9 @@ function transformAttr(el, key, value, instance) {
}
if (opts["style"].indexOf(camelized) > -1) {
if (isString(value)) {
return [camelized, parseStringStyle(value)];
var _style = camelize(value);
var sytle2 = parseStringStyle(_style);
return [camelized, sytle2];
}
return [camelized, normalizeStyle$1(value)];
}
Expand Down
6 changes: 3 additions & 3 deletions packages/uni-h5/dist-x/uni-h5.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -3616,12 +3616,12 @@ function resolveDigitDecimalPoint(event, cache, state, input, resetCache) {
function useCache(props2, type) {
if (type.value === "number") {
const value = typeof props2.modelValue === "undefined" ? props2.value : props2.modelValue;
const cache = vue.ref(typeof value !== "undefined" ? value.toLocaleString() : "");
const cache = vue.ref(typeof value !== "undefined" && value !== null ? value.toLocaleString() : "");
vue.watch(() => props2.modelValue, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
cache.value = typeof value2 !== "undefined" && value2 !== null ? value2.toLocaleString() : "";
});
vue.watch(() => props2.value, (value2) => {
cache.value = typeof value2 !== "undefined" ? value2.toLocaleString() : "";
cache.value = typeof value2 !== "undefined" && value2 !== null ? value2.toLocaleString() : "";
});
return cache;
} else {
Expand Down
Loading

0 comments on commit 4dce467

Please sign in to comment.