提交 8944889e 编写于 作者: fxy060608's avatar fxy060608

fix: change tsconfig target

上级 f294c0e4
......@@ -735,14 +735,11 @@ var serviceContext = (function (vue) {
return `on${capitalize(camelize(type))}`;
}
class UniEvent {
type;
bubbles;
cancelable;
defaultPrevented = false;
timeStamp = Date.now();
_stop = false;
_end = false;
constructor(type, opts) {
this.defaultPrevented = false;
this.timeStamp = Date.now();
this._stop = false;
this._end = false;
this.type = type;
this.bubbles = !!opts.bubbles;
this.cancelable = !!opts.cancelable;
......@@ -770,7 +767,9 @@ var serviceContext = (function (vue) {
return uniEvent;
}
class UniEventTarget {
listeners = Object.create(null);
constructor() {
this.listeners = Object.create(null);
}
dispatchEvent(evt) {
const listeners = this.listeners[evt.type];
if (!listeners) {
......@@ -843,15 +842,11 @@ var serviceContext = (function (vue) {
}
// 为优化性能,各平台不使用proxy来实现node的操作拦截,而是直接通过pageNode定制
class UniNode extends UniEventTarget {
nodeId;
nodeType;
nodeName;
childNodes;
pageNode = null;
parentNode = null;
_text = null;
constructor(nodeType, nodeName, container) {
super();
this.pageNode = null;
this.parentNode = null;
this._text = null;
if (container) {
const { pageNode } = container;
if (pageNode) {
......@@ -1057,7 +1052,6 @@ var serviceContext = (function (vue) {
const isObject = (val) => val !== null && typeof val === 'object';
class BaseFormatter {
_caches;
constructor() {
this._caches = Object.create(null);
}
......@@ -1195,13 +1189,12 @@ var serviceContext = (function (vue) {
}
}
class I18n {
locale = LOCALE_EN;
fallbackLocale = LOCALE_EN;
message = {};
messages = {};
watchers = [];
formater;
constructor({ locale, fallbackLocale, messages, watcher, formater, }) {
this.locale = LOCALE_EN;
this.fallbackLocale = LOCALE_EN;
this.message = {};
this.messages = {};
this.watchers = [];
if (fallbackLocale) {
this.fallbackLocale = fallbackLocale;
}
......@@ -2202,8 +2195,6 @@ var serviceContext = (function (vue) {
const API_CREATE_INNER_AUDIO_CONTEXT = 'createInnerAudioContext';
class VideoContext {
id;
pageId;
constructor(id, pageId) {
this.id = id;
this.pageId = pageId;
......@@ -2247,8 +2238,6 @@ var serviceContext = (function (vue) {
});
class MapContext {
id;
pageId;
constructor(id, pageId) {
this.id = id;
this.pageId = pageId;
......@@ -2642,9 +2631,6 @@ var serviceContext = (function (vue) {
//#endregion
//#region Class
class CanvasGradient {
type;
data;
colorStop;
constructor(type, data) {
this.type = type;
this.data = data;
......@@ -2655,27 +2641,17 @@ var serviceContext = (function (vue) {
}
}
class Pattern {
image;
repetition;
constructor(image, repetition) {
this.image = image;
this.repetition = repetition;
}
}
class TextMetrics {
width;
constructor(width) {
this.width = width;
}
}
class CanvasContext {
id;
pageId;
actions;
path;
subpath;
state;
drawingState;
constructor(id, pageId) {
this.id = id;
this.pageId = pageId;
......@@ -3000,31 +2976,6 @@ var serviceContext = (function (vue) {
data: [type],
});
}
'setFillStyle';
'setStrokeStyle';
'setGlobalAlpha';
'setShadow';
'addColorStop';
'setLineWidth';
'setLineCap';
'setLineJoin';
'setLineDash';
'setMiterLimit';
'fillRect';
'strokeRect';
'clearRect';
'fill';
'stroke';
'scale';
'rotate';
'translate';
'setFontSize';
'fillText';
'setTextAlign';
'setTextBaseline';
'drawImage';
'strokeText';
'setTransform';
}
const initCanvasContextProperty = /*#__PURE__*/ once(() => {
[...methods1, ...methods2].forEach(function (method) {
......@@ -3365,10 +3316,6 @@ var serviceContext = (function (vue) {
return MARGINS.map((name) => `${Number(margins[name]) || 0}px`).join(' ');
}
class ServiceIntersectionObserver {
_reqId;
_pageId;
_component;
_options;
constructor(component, options) {
this._pageId = getPageIdByVm(component);
this._component = component;
......@@ -3415,9 +3362,6 @@ var serviceContext = (function (vue) {
let reqComponentObserverId = 1;
class ServiceMediaQueryObserver {
_reqId;
_pageId;
_component;
constructor(component) {
this._pageId = component.$page && component.$page.id;
this._component = component;
......@@ -3475,8 +3419,6 @@ var serviceContext = (function (vue) {
});
}
class EditorContext {
id;
pageId;
constructor(id, pageId) {
this.id = id;
this.pageId = pageId;
......@@ -3543,10 +3485,6 @@ var serviceContext = (function (vue) {
}
}
class NodesRef {
_selectorQuery;
_component;
_selector;
_single;
constructor(selectorQuery, component, selector, single) {
this._selectorQuery = selectorQuery;
this._component = component;
......@@ -3582,12 +3520,8 @@ var serviceContext = (function (vue) {
}
}
class SelectorQuery {
_page;
_queue;
_component = undefined;
_queueCb;
_nodesRef;
constructor(page) {
this._component = undefined;
this._page = page;
this._queue = [];
this._queueCb = [];
......@@ -3681,10 +3615,6 @@ var serviceContext = (function (vue) {
transformOrigin: '50% 50% 0',
};
class MPAnimation {
actions;
currentTransform;
currentStepAnimates;
option;
constructor(option) {
this.actions = [];
this.currentTransform = {};
......@@ -3737,34 +3667,6 @@ var serviceContext = (function (vue) {
this.currentStepAnimates = [];
return this;
}
'matrix';
'matrix3d';
'rotate';
'rotate3d';
'rotateX';
'rotateY';
'rotateZ';
'scale';
'scale3d';
'scaleX';
'scaleY';
'scaleZ';
'skew';
'skewX';
'skewY';
'translate';
'translate3d';
'translateX';
'translateY';
'translateZ';
'opacity';
'backgroundColor';
'width';
'height';
'right';
'top';
'bottom';
'left';
}
const initAnimationProperty = /*#__PURE__*/ once(() => {
const animateTypes1 = [
......@@ -6246,9 +6148,8 @@ var serviceContext = (function (vue) {
});
class DownloadTask {
_downloader;
_callbacks = [];
constructor(downloader) {
this._callbacks = [];
this._downloader = downloader;
downloader.addEventListener('statechanged', (download, status) => {
if (download.downloadedSize && download.totalSize) {
......@@ -6367,7 +6268,6 @@ var serviceContext = (function (vue) {
* 请求任务类
*/
class RequestTask {
_requestTask;
constructor(requestTask) {
this._requestTask = requestTask;
}
......@@ -6542,14 +6442,6 @@ var serviceContext = (function (vue) {
});
}
class SocketTask {
_callbacks;
_socket;
id;
CLOSED;
CLOSING;
CONNECTING;
OPEN;
readyState;
constructor(socket, socketId) {
this.id = socketId;
this._socket = socket;
......@@ -6705,9 +6597,8 @@ var serviceContext = (function (vue) {
const onSocketClose = /*#__PURE__*/ on('close');
class UploadTask {
_uploader;
_callbacks = [];
constructor(uploader) {
this._callbacks = [];
this._uploader = uploader;
uploader.addEventListener('statechanged', (upload, status) => {
if (upload.uploadedSize && upload.totalSize) {
......@@ -6961,61 +6852,6 @@ var serviceContext = (function (vue) {
},
];
class InnerAudioContext {
/**
* 当前音频的长度(单位:s),只有在当前有合法的 src 时返回
*/
'duration';
/**
* 音频开始播放的位置(单位:s)
*/
'startTime';
/**
* 当前音频的播放位置(单位:s),只有在当前有合法的 src 时返回
*/
'currentTime';
/**
* 当前是是否暂停或停止状态,true 表示暂停或停止,false 表示正在播放
*/
'paused';
/**
* 音频的数据链接,用于直接播放。
*/
'src';
/**
* 音频缓冲的时间点,仅保证当前播放时间点到此时间点内容已缓冲
*/
'buffered';
/**
* 是否自动开始播放,默认 false
*/
'autoplay';
/**
* 是否循环播放,默认 false
*/
'loop';
/**
* 是否遵循系统静音开关,当此参数为 false 时,即使用户打开了静音开关,也能继续发出声音,默认值 true
*/
'obeyMuteSwitch';
/**
* 音量。范围 0~1。
*/
'volume';
/**
* 事件监听
*/
_callbacks;
/**
*
* @param id 当前Audio示例id
*/
id;
/**
*
* @param __timing 当前Audio所使用的timer
*/
__timing;
_options;
constructor(id) {
this.id = id;
this._callbacks = {};
......@@ -7078,26 +6914,6 @@ var serviceContext = (function (vue) {
operationType: type,
}));
}
'onCanplay';
'onPlay';
'onPause';
'onStop';
'onEnded';
'onTimeUpdate';
'onError';
'onWaiting';
'onSeeking';
'onSeeked';
'offCanplay';
'offPlay';
'offPause';
'offStop';
'offEnded';
'offTimeUpdate';
'offError';
'offWaiting';
'offSeeking';
'offSeeked';
}
const initInnerAudioContextEventOnce = /*#__PURE__*/ once(() => {
// 批量设置音频上下文事件监听方法
......@@ -7405,19 +7221,6 @@ var serviceContext = (function (vue) {
},
];
class BackgroundAudioManager {
'duration';
'startTime';
'currentTime';
'paused';
'src';
'buffered';
'title';
'epname';
'singer';
'coverImgUrl';
'webUrl';
'protocol';
_options;
constructor() {
this._options = {};
props.forEach((item) => {
......@@ -7456,16 +7259,6 @@ var serviceContext = (function (vue) {
operationType: type,
}));
}
'onCanplay';
'onPlay';
'onPause';
'onStop';
'onEnded';
'onTimeUpdate';
'onWaiting';
'onPrev';
'onNext';
'onError';
}
let backgroundAudioManager;
const getBackgroundAudioManager = defineSyncApi(API_GET_BACKGROUND_AUDIO_MANAGER, () => backgroundAudioManager ||
......@@ -7644,7 +7437,6 @@ var serviceContext = (function (vue) {
callbacks[pageId] = callback;
}
class Page {
webview;
constructor(webview) {
this.webview = webview;
}
......@@ -9296,7 +9088,6 @@ var serviceContext = (function (vue) {
adClicked: 'adClicked',
};
class AdEventHandler {
_callbacks;
constructor() {
this._callbacks = {};
}
......@@ -9338,16 +9129,15 @@ var serviceContext = (function (vue) {
}
}
class AdBase extends AdEventHandler {
_isLoaded = false;
_isLoading = false;
_preload = true;
_loadPromiseResolve = null;
_loadPromiseReject = null;
_showPromiseResolve = null;
_showPromiseReject = null;
_adInstance;
constructor(adInstance, options) {
super();
this._isLoaded = false;
this._isLoading = false;
this._preload = true;
this._loadPromiseResolve = null;
this._loadPromiseReject = null;
this._showPromiseResolve = null;
this._showPromiseReject = null;
this._preload = options.preload !== undefined ? options.preload : false;
const ad = (this._adInstance = adInstance);
ad.onLoad(() => {
......@@ -9525,19 +9315,19 @@ var serviceContext = (function (vue) {
});
}
class InteractiveAd extends AdEventHandler {
_adpid = '';
_provider = '';
_userData = null;
_isLoaded = false;
_isLoading = false;
_loadPromiseResolve = null;
_loadPromiseReject = null;
_showPromiseResolve = null;
_showPromiseReject = null;
_adInstance = null;
_adError = '';
constructor(options) {
super();
this._adpid = '';
this._provider = '';
this._userData = null;
this._isLoaded = false;
this._isLoading = false;
this._loadPromiseResolve = null;
this._loadPromiseReject = null;
this._showPromiseResolve = null;
this._showPromiseReject = null;
this._adInstance = null;
this._adError = '';
this._adpid = options.adpid;
this._provider = options.provider;
this._userData = options.userData;
......@@ -9903,19 +9693,13 @@ var serviceContext = (function (vue) {
}
class UniPageNode extends UniNode {
pageId;
_id = 1;
_created = false;
createAction;
createdAction;
_createActionMap = new Map();
updateActions = [];
dicts = [];
normalizeDict;
isUnmounted;
_update;
constructor(pageId, options, setup = false) {
super(NODE_TYPE_PAGE, '#page', null);
this._id = 1;
this._created = false;
this._createActionMap = new Map();
this.updateActions = [];
this.dicts = [];
this.nodeId = 0;
this.pageId = pageId;
this.pageNode = this;
......
var __defProp = Object.defineProperty;
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
var __publicField = (obj, key, value) => {
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
return value;
};
(function(factory) {
typeof define === "function" && define.amd ? define(factory) : factory();
})(function() {
......@@ -271,7 +265,6 @@ var __publicField = (obj, key, value) => {
const isObject = (val) => val !== null && typeof val === "object";
class BaseFormatter {
constructor() {
__publicField(this, "_caches");
this._caches = Object.create(null);
}
interpolate(message, values) {
......@@ -387,12 +380,11 @@ var __publicField = (obj, key, value) => {
}
class I18n {
constructor({ locale, fallbackLocale, messages, watcher, formater }) {
__publicField(this, "locale", LOCALE_EN);
__publicField(this, "fallbackLocale", LOCALE_EN);
__publicField(this, "message", {});
__publicField(this, "messages", {});
__publicField(this, "watchers", []);
__publicField(this, "formater");
this.locale = LOCALE_EN;
this.fallbackLocale = LOCALE_EN;
this.message = {};
this.messages = {};
this.watchers = [];
if (fallbackLocale) {
this.fallbackLocale = fallbackLocale;
}
......
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
export default function vueFactory(exports) {
/**
* Make a map and return a function for checking if a key
......@@ -72,20 +70,10 @@ export default function vueFactory(exports) {
class UniEvent {
constructor(type, opts) {
_defineProperty(this, "type", void 0);
_defineProperty(this, "bubbles", void 0);
_defineProperty(this, "cancelable", void 0);
_defineProperty(this, "defaultPrevented", false);
_defineProperty(this, "timeStamp", Date.now());
_defineProperty(this, "_stop", false);
_defineProperty(this, "_end", false);
this.defaultPrevented = false;
this.timeStamp = Date.now();
this._stop = false;
this._end = false;
this.type = type;
this.bubbles = !!opts.bubbles;
this.cancelable = !!opts.cancelable;
......@@ -121,7 +109,7 @@ export default function vueFactory(exports) {
class UniEventTarget {
constructor() {
_defineProperty(this, "listeners", Object.create(null));
this.listeners = Object.create(null);
}
dispatchEvent(evt) {
......@@ -253,20 +241,9 @@ export default function vueFactory(exports) {
class UniNode extends UniEventTarget {
constructor(nodeType, nodeName, container) {
super();
_defineProperty(this, "nodeId", void 0);
_defineProperty(this, "nodeType", void 0);
_defineProperty(this, "nodeName", void 0);
_defineProperty(this, "childNodes", void 0);
_defineProperty(this, "pageNode", null);
_defineProperty(this, "parentNode", null);
_defineProperty(this, "_text", null);
this.pageNode = null;
this.parentNode = null;
this._text = null;
if (container) {
var {
......@@ -402,13 +379,10 @@ export default function vueFactory(exports) {
class UniBaseNode extends UniNode {
constructor(nodeType, nodeName, container) {
super(nodeType, nodeName, container); // this.style = proxyStyle(new UniCSSStyleDeclaration())
_defineProperty(this, "attributes", Object.create(null));
_defineProperty(this, "style", null);
_defineProperty(this, "_html", null);
super(nodeType, nodeName, container);
this.attributes = Object.create(null);
this.style = null;
this._html = null; // this.style = proxyStyle(new UniCSSStyleDeclaration())
}
get className() {
......@@ -547,9 +521,6 @@ export default function vueFactory(exports) {
class UniElement extends UniBaseNode {
constructor(nodeName, container) {
super(NODE_TYPE_ELEMENT, nodeName.toUpperCase(), container);
_defineProperty(this, "tagName", void 0);
this.tagName = this.nodeName;
}
......
......@@ -2,7 +2,7 @@
"compilerOptions": {
"outDir": "dist",
"sourceMap": false,
"target": "esnext",
"target": "es2015",
"module": "esnext",
"moduleResolution": "node",
"allowJs": false,
......
......@@ -42,6 +42,7 @@ const UniH5Plugin = {
},
configResolved(config) {
initLogger(config);
config.cacheDir = '';
},
handleHotUpdate: handleHotUpdate_1.createHandleHotUpdate(),
transformIndexHtml: transformIndexHtml_1.createTransformIndexHtml(),
......
......@@ -4,7 +4,6 @@ Object.defineProperty(exports, '__esModule', { value: true });
const isObject = (val) => val !== null && typeof val === 'object';
class BaseFormatter {
_caches;
constructor() {
this._caches = Object.create(null);
}
......@@ -142,13 +141,12 @@ function normalizeLocale(locale, messages) {
}
}
class I18n {
locale = LOCALE_EN;
fallbackLocale = LOCALE_EN;
message = {};
messages = {};
watchers = [];
formater;
constructor({ locale, fallbackLocale, messages, watcher, formater, }) {
this.locale = LOCALE_EN;
this.fallbackLocale = LOCALE_EN;
this.message = {};
this.messages = {};
this.watchers = [];
if (fallbackLocale) {
this.fallbackLocale = fallbackLocale;
}
......
const isObject = (val) => val !== null && typeof val === 'object';
class BaseFormatter {
_caches;
constructor() {
this._caches = Object.create(null);
}
......@@ -138,13 +137,12 @@ function normalizeLocale(locale, messages) {
}
}
class I18n {
locale = LOCALE_EN;
fallbackLocale = LOCALE_EN;
message = {};
messages = {};
watchers = [];
formater;
constructor({ locale, fallbackLocale, messages, watcher, formater, }) {
this.locale = LOCALE_EN;
this.fallbackLocale = LOCALE_EN;
this.message = {};
this.messages = {};
this.watchers = [];
if (fallbackLocale) {
this.fallbackLocale = fallbackLocale;
}
......
......@@ -2,7 +2,7 @@
"compilerOptions": {
"outDir": "dist",
"sourceMap": false,
"target": "esnext",
"target": "es2015",
"module": "esnext",
"moduleResolution": "node",
"allowJs": false,
......
......@@ -340,14 +340,11 @@ function normalizeEventType(type, options) {
return `on${shared.capitalize(shared.camelize(type))}`;
}
class UniEvent {
type;
bubbles;
cancelable;
defaultPrevented = false;
timeStamp = Date.now();
_stop = false;
_end = false;
constructor(type, opts) {
this.defaultPrevented = false;
this.timeStamp = Date.now();
this._stop = false;
this._end = false;
this.type = type;
this.bubbles = !!opts.bubbles;
this.cancelable = !!opts.cancelable;
......@@ -375,7 +372,9 @@ function createUniEvent(evt) {
return uniEvent;
}
class UniEventTarget {
listeners = Object.create(null);
constructor() {
this.listeners = Object.create(null);
}
dispatchEvent(evt) {
const listeners = this.listeners[evt.type];
if (!listeners) {
......@@ -469,15 +468,11 @@ function checkNodeId(node) {
}
// 为优化性能,各平台不使用proxy来实现node的操作拦截,而是直接通过pageNode定制
class UniNode extends UniEventTarget {
nodeId;
nodeType;
nodeName;
childNodes;
pageNode = null;
parentNode = null;
_text = null;
constructor(nodeType, nodeName, container) {
super();
this.pageNode = null;
this.parentNode = null;
this._text = null;
if (container) {
const { pageNode } = container;
if (pageNode) {
......@@ -574,11 +569,11 @@ class UniNode extends UniEventTarget {
const ATTR_CLASS = 'class';
const ATTR_STYLE = 'style';
class UniBaseNode extends UniNode {
attributes = Object.create(null);
style = null;
_html = null;
constructor(nodeType, nodeName, container) {
super(nodeType, nodeName, container);
this.attributes = Object.create(null);
this.style = null;
this._html = null;
// this.style = proxyStyle(new UniCSSStyleDeclaration())
}
get className() {
......@@ -687,7 +682,6 @@ class UniCommentNode extends UniNode {
}
class UniElement extends UniBaseNode {
tagName;
constructor(nodeName, container) {
super(NODE_TYPE_ELEMENT, nodeName.toUpperCase(), container);
this.tagName = this.nodeName;
......
......@@ -336,14 +336,11 @@ function normalizeEventType(type, options) {
return `on${capitalize(camelize(type))}`;
}
class UniEvent {
type;
bubbles;
cancelable;
defaultPrevented = false;
timeStamp = Date.now();
_stop = false;
_end = false;
constructor(type, opts) {
this.defaultPrevented = false;
this.timeStamp = Date.now();
this._stop = false;
this._end = false;
this.type = type;
this.bubbles = !!opts.bubbles;
this.cancelable = !!opts.cancelable;
......@@ -371,7 +368,9 @@ function createUniEvent(evt) {
return uniEvent;
}
class UniEventTarget {
listeners = Object.create(null);
constructor() {
this.listeners = Object.create(null);
}
dispatchEvent(evt) {
const listeners = this.listeners[evt.type];
if (!listeners) {
......@@ -465,15 +464,11 @@ function checkNodeId(node) {
}
// 为优化性能,各平台不使用proxy来实现node的操作拦截,而是直接通过pageNode定制
class UniNode extends UniEventTarget {
nodeId;
nodeType;
nodeName;
childNodes;
pageNode = null;
parentNode = null;
_text = null;
constructor(nodeType, nodeName, container) {
super();
this.pageNode = null;
this.parentNode = null;
this._text = null;
if (container) {
const { pageNode } = container;
if (pageNode) {
......@@ -570,11 +565,11 @@ class UniNode extends UniEventTarget {
const ATTR_CLASS = 'class';
const ATTR_STYLE = 'style';
class UniBaseNode extends UniNode {
attributes = Object.create(null);
style = null;
_html = null;
constructor(nodeType, nodeName, container) {
super(nodeType, nodeName, container);
this.attributes = Object.create(null);
this.style = null;
this._html = null;
// this.style = proxyStyle(new UniCSSStyleDeclaration())
}
get className() {
......@@ -683,7 +678,6 @@ class UniCommentNode extends UniNode {
}
class UniElement extends UniBaseNode {
tagName;
constructor(nodeName, container) {
super(NODE_TYPE_ELEMENT, nodeName.toUpperCase(), container);
this.tagName = this.nodeName;
......
......@@ -4,7 +4,7 @@
"sourceMap": false,
"declaration": true,
"declarationDir": "./dist/packages/uni-shared/src",
"target": "esnext",
"target": "es2015",
"module": "esnext",
"moduleResolution": "node",
"allowJs": false,
......
......@@ -3,7 +3,7 @@
"baseUrl": ".",
"outDir": "dist",
"sourceMap": false,
"target": "esnext",
"target": "es2015",
"module": "esnext",
"moduleResolution": "node",
"allowJs": true,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册