提交 8789ce4e 编写于 作者: fxy060608's avatar fxy060608

wip(uts): log filename

上级 db1e568a
export function login(name: string, pwd: string) {
console.log('login')
return { name, pwd }
}
import android.util.Log;
fun login(name: String, pwd: String): UtsJSONObject {
console.log("login");
return object : UtsJSONObject() {
var name = name
var pwd = pwd
......
......@@ -3,6 +3,7 @@ import kotlinx.coroutines.*;
import io.dcloud.uts.runtime.*;
import android.util.Log;
fun login(name: String, pwd: String): UtsJSONObject {
console.log("login", "at app-android/login.uts:2");
return object : UtsJSONObject() {
var name = name
var pwd = pwd
......
......@@ -10274,6 +10274,7 @@ function updateDocumentTitle(title) {
ssrContext[uniShared.UNI_SSR_TITLE] = title;
}
}
UniServiceJSBridge.emit(uniShared.ON_NAVIGATION_BAR_CHANGE, { titleText: title });
}
function useDocumentTitle(pageMeta) {
function update() {
......@@ -10730,6 +10731,7 @@ function useState() {
marginWidth: 0,
leftWindowWidth: 0,
rightWindowWidth: 0,
navigationBarTitleText: "",
topWindowStyle: {},
leftWindowStyle: {},
rightWindowStyle: {}
......@@ -10756,6 +10758,9 @@ function useState() {
vue.watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({
"--window-right": value + "px"
}));
UniServiceJSBridge.on(uniShared.ON_NAVIGATION_BAR_CHANGE, (navigationBar) => {
layoutState.navigationBarTitleText = navigationBar.titleText;
});
const windowState = vue.computed(() => ({
matchTopWindow: layoutState.topWindowMediaQuery,
showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow,
......@@ -10882,8 +10887,9 @@ function createTopWindowTsx(topWindow, layoutState, windowState) {
"class": "uni-top-window",
"style": layoutState.topWindowStyle
}, [vue.createVNode(TopWindow, vue.mergeProps({
"ref": windowRef
}, windowState), null, 16)], 4), vue.createVNode("div", {
"ref": windowRef,
"navigation-bar-title-text": layoutState.navigationBarTitleText
}, windowState), null, 16, ["navigation-bar-title-text"])], 4), vue.createVNode("div", {
"class": "uni-top-window--placeholder",
"style": {
height: layoutState.topWindowHeight + "px"
......
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, h, 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, removeLeadingSlash, 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, 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, sortObject, 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, removeLeadingSlash, 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, 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, sortObject, ON_BACK_PRESS, parseUrl, addFont, ON_NAVIGATION_BAR_CHANGE, 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";
......@@ -14004,10 +14004,13 @@ function updateCurPageCssVar(pageMeta) {
tabBar2.shown && (windowBottomValue = parseInt(tabBar2.height));
}
updatePageCssVar({
"--window-top": normalizeWindowBottom(windowTopValue),
"--window-top": normalizeWindowTop(windowTopValue),
"--window-bottom": normalizeWindowBottom(windowBottomValue)
});
}
function normalizeWindowTop(windowTop) {
return envMethod ? `calc(${windowTop}px + ${envMethod}(safe-area-inset-top))` : `${windowTop}px`;
}
function normalizeWindowBottom(windowBottom) {
return envMethod ? `calc(${windowBottom}px + ${envMethod}(safe-area-inset-bottom))` : `${windowBottom}px`;
}
......@@ -19607,6 +19610,7 @@ function updateDocumentTitle(title) {
{
document.title = title;
}
UniServiceJSBridge.emit(ON_NAVIGATION_BAR_CHANGE, { titleText: title });
}
function useDocumentTitle(pageMeta) {
function update() {
......@@ -20182,6 +20186,7 @@ function useState() {
marginWidth: 0,
leftWindowWidth: 0,
rightWindowWidth: 0,
navigationBarTitleText: "",
topWindowStyle: {},
leftWindowStyle: {},
rightWindowStyle: {}
......@@ -20212,6 +20217,9 @@ function useState() {
watch(() => layoutState.rightWindowWidth + layoutState.marginWidth, (value) => updateCssVar({
"--window-right": value + "px"
}));
UniServiceJSBridge.on(ON_NAVIGATION_BAR_CHANGE, (navigationBar) => {
layoutState.navigationBarTitleText = navigationBar.titleText;
});
const windowState = computed(() => ({
matchTopWindow: layoutState.topWindowMediaQuery,
showTopWindow: layoutState.showTopWindow || layoutState.apiShowTopWindow,
......@@ -20344,8 +20352,9 @@ function createTopWindowTsx(topWindow, layoutState, windowState) {
"class": "uni-top-window",
"style": layoutState.topWindowStyle
}, [createVNode(TopWindow, mergeProps({
"ref": windowRef
}, windowState), null, 16)], 4), createVNode("div", {
"ref": windowRef,
"navigation-bar-title-text": layoutState.navigationBarTitleText
}, windowState), null, 16, ["navigation-bar-title-text"])], 4), createVNode("div", {
"class": "uni-top-window--placeholder",
"style": {
height: layoutState.topWindowHeight + "px"
......
......@@ -72,7 +72,8 @@ var setting = {
es6: true,
postcss: false,
minified: false,
newFeature: true
newFeature: true,
bigPackageSizeSupport: true
};
var compileType = "miniprogram";
var libVersion = "";
......
......@@ -35,6 +35,7 @@ export async function compile(filename: string) {
sourceMap: true,
extname: 'kt',
imports: ['kotlinx.coroutines.*', 'io.dcloud.uts.runtime.*'],
logFilename: true,
},
})
console.log('uts compile time: ' + (Date.now() - time) + 'ms')
......
......@@ -40,6 +40,7 @@ function resolveOptions(options: UtsOptions) {
input.filename = normalizePath(input.filename)
output.outDir = normalizePath(output.outDir)
output.sourceMap = normalizePath(output.sourceMap)
output.logFilename = !!output.logFilename
return options
}
......
......@@ -26,6 +26,7 @@ export type UtsOutputOptions = {
sourceMap?: boolean | string
inlineSourcesContent?: boolean
extname: string
logFilename?: boolean
}
export interface UtsOptions {
input: UtsInputOptions
......
......@@ -34,6 +34,7 @@ bundle({
imports: ['kotlinx.coroutines.*', 'io.dcloud.uts.runtime.*'],
sourceMap: true,
extname: 'kt',
logFilename: true,
},
}).then((res) => {
console.log('bundle: ' + (Date.now() - start) + 'ms')
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册