Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
qianlong66
uni-app
提交
24f27b35
U
uni-app
项目概览
qianlong66
/
uni-app
与 Fork 源项目一致
Fork自
DCloud / uni-app
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
24f27b35
编写于
10月 08, 2022
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix(h5): esbuild target = es2015
上级
ecd8b3b2
变更
10
展开全部
显示空白变更内容
内联
并排
Showing
10 changed file
with
62 addition
and
246 deletion
+62
-246
packages/playground/ssr/src/components/ssr-canvas/ssr-canvas.vue
...s/playground/ssr/src/components/ssr-canvas/ssr-canvas.vue
+3
-1
packages/uni-app-plus/dist/uni-app-view.umd.js
packages/uni-app-plus/dist/uni-app-view.umd.js
+1
-1
packages/uni-app-plus/vite.config.ts
packages/uni-app-plus/vite.config.ts
+5
-0
packages/uni-cli-shared/src/uni_modules.ts
packages/uni-cli-shared/src/uni_modules.ts
+4
-6
packages/uni-h5/api.ts
packages/uni-h5/api.ts
+1
-1
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+0
-7
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+40
-230
packages/uni-h5/package.json
packages/uni-h5/package.json
+1
-0
packages/uni-h5/vite.config.ts
packages/uni-h5/vite.config.ts
+5
-0
pnpm-lock.yaml
pnpm-lock.yaml
+2
-0
未找到文件。
packages/playground/ssr/src/components/ssr-canvas/ssr-canvas.vue
浏览文件 @
24f27b35
...
...
@@ -58,7 +58,9 @@ export default {
const
canvas
=
document
.
querySelector
(
"
.mycanvas>canvas
"
);
this
.
canvasWidth
=
canvas
.
getBoundingClientRect
().
width
;
// this.ctx = canvas.getContext("2d"); //创建绘图对象
this
.
ctx
=
uni
.
createCanvasContext
(
"
mycanvas
"
,
this
);
//创建绘图对象
const
ctx
=
uni
.
createCanvasContext
(
"
mycanvas
"
,
this
);
//创建绘图对象
console
.
log
(
ctx
)
this
.
ctx
=
ctx
//设置画笔样式
this
.
ctx
.
lineWidth
=
4
;
...
...
packages/uni-app-plus/dist/uni-app-view.umd.js
浏览文件 @
24f27b35
此差异已折叠。
点击以展开。
packages/uni-app-plus/vite.config.ts
浏览文件 @
24f27b35
...
...
@@ -120,6 +120,11 @@ export default defineConfig({
}),
vueJsx
({
optimize
:
true
,
isCustomElement
:
isH5CustomElement
}),
],
esbuild
:
{
// 强制为 es2015,否则默认为 esnext,将会生成 __publicField 代码,
// 部分 API 写的时候,使用了动态定义 prototype 的方式,与 __publicField 冲突,比如 createCanvasContext
target
:
'
es2015
'
,
},
build
:
{
target
:
'
es2015
'
,
cssTarget
,
...
...
packages/uni-cli-shared/src/uni_modules.ts
浏览文件 @
24f27b35
import
path
from
'
path
'
import
fs
from
'
fs-extra
'
import
{
isArray
,
isPlainObject
,
isString
}
from
'
@vue/shared
'
import
{
recursive
}
from
'
merge
'
import
{
parseJson
}
from
'
./json
'
type
Define
=
string
|
string
[]
|
Record
<
string
,
string
>
type
Defines
=
{
...
...
@@ -25,7 +23,7 @@ export function genUniModulesExports() {
if
(
!
fs
.
existsSync
(
pkgPath
))
{
return
}
const
exports
=
parseJson
(
fs
.
readFileSync
(
pkgPath
,
'
utf8
'
))?.
uni_modules
const
exports
=
JSON
.
parse
(
fs
.
readFileSync
(
pkgPath
,
'
utf8
'
))?.
uni_modules
?.
exports
as
Exports
|
undefined
if
(
exports
)
{
const
[
exportsImportCodes
,
exportsAssignCodes
]
=
parseExports
(
...
...
@@ -108,15 +106,15 @@ function parseDefine(
):
[
string
[],
string
[]]
{
const
importCodes
:
string
[]
=
[]
const
assignCodes
:
string
[]
=
[]
if
(
isString
(
define
)
)
{
if
(
typeof
define
===
'
string
'
)
{
importCodes
.
push
(
`import
${
define
}
from '
${
source
}
'`
)
assignCodes
.
push
(
`
${
globalObject
}
.
${
define
}
=
${
define
}
`
)
}
else
if
(
isArray
(
define
))
{
}
else
if
(
Array
.
isArray
(
define
))
{
importCodes
.
push
(
`import {
${
define
.
join
(
'
,
'
)}
} from '
${
source
}
'`
)
define
.
forEach
((
d
)
=>
{
assignCodes
.
push
(
`
${
globalObject
}
.
${
d
}
=
${
d
}
`
)
})
}
else
if
(
isPlainObject
(
define
))
{
}
else
{
const
keys
=
Object
.
keys
(
define
)
const
specifiers
:
string
[]
=
[]
...
...
packages/uni-h5/api.ts
浏览文件 @
24f27b35
...
...
@@ -4,7 +4,7 @@ import { parse } from 'acorn-loose'
import
{
simple
}
from
'
acorn-walk
'
import
{
hyphenate
}
from
'
@vue/shared
'
import
{
isBuiltInComponent
}
from
'
@dcloudio/uni-shared
'
import
{
ExportNamedDeclaration
}
from
'
estree
'
import
type
{
ExportNamedDeclaration
}
from
'
estree
'
const
BLACKLIST
=
[
'
AsyncErrorComponent
'
,
...
...
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
24f27b35
"
use strict
"
;
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
;
};
Object
.
defineProperties
(
exports
,
{
__esModule
:
{
value
:
true
},
[
Symbol
.
toStringTag
]:
{
value
:
"
Module
"
}
});
const
vue
=
require
(
"
vue
"
);
const
shared
=
require
(
"
@vue/shared
"
);
...
...
@@ -10629,7 +10623,6 @@ function normalizeContentType(header) {
}
class
RequestTask
{
constructor
(
xhr
)
{
__publicField
(
this
,
"
_xhr
"
);
this
.
_xhr
=
xhr
;
}
abort
()
{
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
24f27b35
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;
};
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, invokeCreateErrorHandler, invokeCreateVueAppHook, parseQuery, NAVBAR_HEIGHT, 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";
...
...
@@ -1277,10 +1271,8 @@ function normalizeTabBarRoute(index2, oldPagePath, newPagePath) {
}
class ComponentDescriptor {
constructor(vm) {
__publicField(this, "$vm");
__publicField(this, "$el");
__publicField(this, "$bindClass", false);
__publicField(this, "$bindStyle", false);
this.$bindClass = false;
this.$bindStyle = false;
this.$vm = vm;
{
this.$el = resolveOwnerEl(vm.$);
...
...
@@ -3420,8 +3412,6 @@ validator.concat({
const RATES = [0.5, 0.8, 1, 1.25, 1.5, 2];
class VideoContext {
constructor(id2, pageId) {
__publicField(this, "id");
__publicField(this, "pageId");
this.id = id2;
this.pageId = pageId;
}
...
...
@@ -3488,8 +3478,6 @@ const operateMapWrap = (id2, pageId, type, options) => {
};
class MapContext {
constructor(id2, pageId) {
__publicField(this, "id");
__publicField(this, "pageId");
this.id = id2;
this.pageId = pageId;
}
...
...
@@ -3895,9 +3883,6 @@ function checkColor(e2) {
}
class CanvasGradient {
constructor(type, data) {
__publicField(this, "type");
__publicField(this, "data");
__publicField(this, "colorStop");
this.type = type;
this.data = data;
this.colorStop = [];
...
...
@@ -3908,9 +3893,6 @@ class CanvasGradient {
}
class Pattern {
constructor(image2, repetition) {
__publicField(this, "type");
__publicField(this, "data");
__publicField(this, "colorStop");
this.type = "pattern";
this.data = image2;
this.colorStop = repetition;
...
...
@@ -3918,44 +3900,11 @@ class Pattern {
}
class TextMetrics {
constructor(width) {
__publicField(this, "width");
this.width = width;
}
}
class CanvasContext {
constructor(id2, pageId) {
__publicField(this, "id");
__publicField(this, "pageId");
__publicField(this, "actions");
__publicField(this, "path");
__publicField(this, "subpath");
__publicField(this, "state");
__publicField(this, "drawingState");
__publicField(this, "setFillStyle");
__publicField(this, "setStrokeStyle");
__publicField(this, "setGlobalAlpha");
__publicField(this, "setShadow");
__publicField(this, "addColorStop");
__publicField(this, "setLineWidth");
__publicField(this, "setLineCap");
__publicField(this, "setLineJoin");
__publicField(this, "setLineDash");
__publicField(this, "setMiterLimit");
__publicField(this, "fillRect");
__publicField(this, "strokeRect");
__publicField(this, "clearRect");
__publicField(this, "fill");
__publicField(this, "stroke");
__publicField(this, "scale");
__publicField(this, "rotate");
__publicField(this, "translate");
__publicField(this, "setFontSize");
__publicField(this, "fillText");
__publicField(this, "setTextAlign");
__publicField(this, "setTextBaseline");
__publicField(this, "drawImage");
__publicField(this, "strokeText");
__publicField(this, "setTransform");
this.id = id2;
this.pageId = pageId;
this.actions = [];
...
...
@@ -4615,10 +4564,6 @@ function normalizeRootMargin(margins = {}) {
}
class ServiceIntersectionObserver {
constructor(component, options) {
__publicField(this, "_reqId");
__publicField(this, "_pageId");
__publicField(this, "_component");
__publicField(this, "_options");
this._pageId = getPageIdByVm(component);
this._component = component;
this._options = extend({}, defaultOptions, options);
...
...
@@ -4670,9 +4615,6 @@ const createIntersectionObserver = /* @__PURE__ */ defineSyncApi("createIntersec
let reqComponentObserverId = 1;
class ServiceMediaQueryObserver {
constructor(component) {
__publicField(this, "_reqId");
__publicField(this, "_pageId");
__publicField(this, "_component");
this._pageId = component.$page && component.$page.id;
this._component = component;
}
...
...
@@ -4738,8 +4680,6 @@ function operateEditor(componentId, pageId, type, options) {
}
class EditorContext {
constructor(id2, pageId) {
__publicField(this, "id");
__publicField(this, "pageId");
this.id = id2;
this.pageId = pageId;
}
...
...
@@ -4805,10 +4745,6 @@ function convertContext(result) {
}
class NodesRef {
constructor(selectorQuery, component, selector, single) {
__publicField(this, "_selectorQuery");
__publicField(this, "_component");
__publicField(this, "_selector");
__publicField(this, "_single");
this._selectorQuery = selectorQuery;
this._component = component;
this._selector = selector;
...
...
@@ -4871,11 +4807,7 @@ class NodesRef {
}
class SelectorQuery {
constructor(page) {
__publicField(this, "_page");
__publicField(this, "_queue");
__publicField(this, "_component");
__publicField(this, "_queueCb");
__publicField(this, "_nodesRef");
this._component = void 0;
this._page = page;
this._queue = [];
this._queueCb = [];
...
...
@@ -4962,38 +4894,6 @@ const defaultOption = {
};
class MPAnimation {
constructor(option) {
__publicField(this, "actions");
__publicField(this, "currentTransform");
__publicField(this, "currentStepAnimates");
__publicField(this, "option");
__publicField(this, "matrix");
__publicField(this, "matrix3d");
__publicField(this, "rotate");
__publicField(this, "rotate3d");
__publicField(this, "rotateX");
__publicField(this, "rotateY");
__publicField(this, "rotateZ");
__publicField(this, "scale");
__publicField(this, "scale3d");
__publicField(this, "scaleX");
__publicField(this, "scaleY");
__publicField(this, "scaleZ");
__publicField(this, "skew");
__publicField(this, "skewX");
__publicField(this, "skewY");
__publicField(this, "translate");
__publicField(this, "translate3d");
__publicField(this, "translateX");
__publicField(this, "translateY");
__publicField(this, "translateZ");
__publicField(this, "opacity");
__publicField(this, "backgroundColor");
__publicField(this, "width");
__publicField(this, "height");
__publicField(this, "right");
__publicField(this, "top");
__publicField(this, "bottom");
__publicField(this, "left");
this.actions = [];
this.currentTransform = {};
this.currentStepAnimates = [];
...
...
@@ -11440,13 +11340,6 @@ const PickerView = /* @__PURE__ */ defineBuiltInComponent({
});
class Friction {
constructor(drag) {
__publicField(this, "_drag");
__publicField(this, "_dragLog");
__publicField(this, "_x");
__publicField(this, "_v");
__publicField(this, "_startTime");
__publicField(this, "_dt");
__publicField(this, "_powDragDt");
this._drag = drag;
this._dragLog = Math.log(drag);
this._x = 0;
...
...
@@ -11513,12 +11406,6 @@ function a(e2, t2) {
}
class Spring {
constructor(m, k, c) {
__publicField(this, "_m");
__publicField(this, "_k");
__publicField(this, "_c");
__publicField(this, "_solution");
__publicField(this, "_endPosition");
__publicField(this, "_startTime");
this._m = m;
this._k = k;
this._c = c;
...
...
@@ -11700,14 +11587,6 @@ class Spring {
}
class Scroll {
constructor(extent, friction, spring) {
__publicField(this, "_extent");
__publicField(this, "_friction");
__publicField(this, "_spring");
__publicField(this, "_startTime");
__publicField(this, "_springing");
__publicField(this, "_springOffset");
__publicField(this, "_lastTime");
__publicField(this, "_lastDx");
this._extent = extent;
this._friction = friction || new Friction(0.01);
this._spring = spring || new Spring(1, 90, 20);
...
...
@@ -11824,28 +11703,6 @@ function createAnimation(scroll, onScroll, onEnd) {
}
class Scroller {
constructor(element, options) {
__publicField(this, "_element");
__publicField(this, "_options");
__publicField(this, "_enableSnap");
__publicField(this, "_itemSize");
__publicField(this, "_enableX");
__publicField(this, "_enableY");
__publicField(this, "_shouldDispatchScrollEvent");
__publicField(this, "_extent");
__publicField(this, "_scrollWidth");
__publicField(this, "_scrollHeight");
__publicField(this, "_position");
__publicField(this, "_scroll");
__publicField(this, "_onTransitionEnd");
__publicField(this, "_startPosition");
__publicField(this, "_lastChangePos");
__publicField(this, "_animation");
__publicField(this, "_scrolling");
__publicField(this, "_lastTime");
__publicField(this, "_lastDelay");
__publicField(this, "_lastIdx");
__publicField(this, "_snapping");
__publicField(this, "_lastPos");
options = options || {};
this._element = element;
this._options = options;
...
...
@@ -16797,36 +16654,12 @@ function createCallout(maps2) {
}
class Callout {
constructor(option = {}, callback) {
__publicField(this, "option");
__publicField(this, "position");
__publicField(this, "index");
__publicField(this, "visible");
__publicField(this, "alwaysVisible");
__publicField(this, "div");
__publicField(this, "triangle");
__publicField(this, "callback");
__publicField(this, "Text");
__publicField(this, "setMap");
__publicField(this, "getMap");
__publicField(this, "getPanes");
__publicField(this, "getProjection");
__publicField(this, "map_changed");
__publicField(this, "set");
__publicField(this, "get");
__publicField(this, "setOptions");
__publicField(this, "bindTo");
__publicField(this, "bindsTo");
__publicField(this, "notify");
__publicField(this, "setValues");
__publicField(this, "unbind");
__publicField(this, "unbindAll");
__publicField(this, "addListener");
__publicField(this, "createAMapText", createAMapText);
__publicField(this, "removeAMapText", removeAMapText);
__publicField(this, "onAdd", onAdd);
__publicField(this, "construct", onAdd);
__publicField(this, "onRemove", onRemove);
__publicField(this, "destroy", onRemove);
this.createAMapText = createAMapText;
this.removeAMapText = removeAMapText;
this.onAdd = onAdd;
this.construct = onAdd;
this.onRemove = onRemove;
this.destroy = onRemove;
this.option = option || {};
const visible = this.visible = this.alwaysVisible = option.display === "ALWAYS";
if (getIsAMap()) {
...
...
@@ -17725,40 +17558,7 @@ const initInnerAudioContextEventOnce = /* @__PURE__ */ once(() => {
});
class InnerAudioContext {
constructor() {
__publicField(this, "duration");
__publicField(this, "currentTime");
__publicField(this, "paused");
__publicField(this, "src");
__publicField(this, "buffered");
__publicField(this, "autoplay");
__publicField(this, "loop");
__publicField(this, "obeyMuteSwitch");
__publicField(this, "volume");
__publicField(this, "_audio");
__publicField(this, "_stoping");
__publicField(this, "startTime");
__publicField(this, "_events");
__publicField(this, "_src", "");
__publicField(this, "onCanplay");
__publicField(this, "onPlay");
__publicField(this, "onPause");
__publicField(this, "onStop");
__publicField(this, "onEnded");
__publicField(this, "onTimeUpdate");
__publicField(this, "onError");
__publicField(this, "onWaiting");
__publicField(this, "onSeeking");
__publicField(this, "onSeeked");
__publicField(this, "offCanplay");
__publicField(this, "offPlay");
__publicField(this, "offPause");
__publicField(this, "offStop");
__publicField(this, "offEnded");
__publicField(this, "offTimeUpdate");
__publicField(this, "offError");
__publicField(this, "offWaiting");
__publicField(this, "offSeeking");
__publicField(this, "offSeeked");
this._src = "";
var audio = this._audio = new Audio();
this._stoping = false;
const propertys = [
...
...
@@ -18397,31 +18197,51 @@ const vibrateLong = /* @__PURE__ */ defineAsyncApi(
}
}
);
var __async = (__this, __arguments, generator) => {
return new Promise((resolve, reject) => {
var fulfilled = (value) => {
try {
step(generator.next(value));
} catch (e2) {
reject(e2);
}
};
var rejected = (value) => {
try {
step(generator.throw(value));
} catch (e2) {
reject(e2);
}
};
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
step((generator = generator.apply(__this, __arguments)).next());
});
};
const getClipboardData = /* @__PURE__ */ defineAsyncApi(
API_GET_CLIPBOARD_DATA,
async (_, { resolve, reject }) =>
{
(_0, _1) => __async(void 0, [_0, _1], function* (_, { resolve, reject })
{
initI18nGetClipboardDataMsgsOnce();
const { t: t2 } = useI18n();
try {
const data =
await
navigator.clipboard.readText();
const data =
yield
navigator.clipboard.readText();
resolve({ data });
} catch (error) {
_getClipboardData(resolve, () => {
reject(`${error} ${t2("uni.getClipboardData.fail")}`);
});
}
}
}
)
);
const setClipboardData = /* @__PURE__ */ defineAsyncApi(
API_SET_CLIPBOARD_DATA,
async ({ data }, { resolve, reject }) =>
{
(_0, _1) => __async(void 0, [_0, _1], function* ({ data }, { resolve, reject })
{
try {
await
navigator.clipboard.writeText(data);
yield
navigator.clipboard.writeText(data);
resolve();
} catch (error) {
_setClipboardData(data, resolve, reject);
}
},
}
)
,
SetClipboardDataProtocol,
SetClipboardDataOptions
);
...
...
@@ -19415,7 +19235,6 @@ function normalizeContentType(header) {
}
class RequestTask {
constructor(xhr) {
__publicField(this, "_xhr");
this._xhr = xhr;
}
abort() {
...
...
@@ -19444,8 +19263,7 @@ function parseHeaders(headers) {
}
class DownloadTask {
constructor(xhr) {
__publicField(this, "_xhr");
__publicField(this, "_callbacks", []);
this._callbacks = [];
this._xhr = xhr;
}
onProgressUpdate(callback) {
...
...
@@ -19537,9 +19355,7 @@ const downloadFile = /* @__PURE__ */ defineTaskApi(
);
class UploadTask {
constructor(xhr) {
__publicField(this, "_xhr");
__publicField(this, "_isAbort");
__publicField(this, "_callbacks", []);
this._callbacks = [];
this._xhr = xhr;
}
onProgressUpdate(callback) {
...
...
@@ -19670,18 +19486,12 @@ const globalEvent = {
};
class SocketTask {
constructor(url, protocols, callback) {
__publicField(this, "_webSocket");
__publicField(this, "_callbacks", {
this._callbacks = {
open: [],
close: [],
error: [],
message: []
});
__publicField(this, "CLOSED");
__publicField(this, "CLOSING");
__publicField(this, "CONNECTING");
__publicField(this, "OPEN");
__publicField(this, "readyState");
};
let error;
try {
const webSocket = this._webSocket = new WebSocket(url, protocols);
...
...
packages/uni-h5/package.json
浏览文件 @
24f27b35
...
...
@@ -43,6 +43,7 @@
"gitHead"
:
"33e807d66e1fe47e2ee08ad9c59247e37b8884da"
,
"devDependencies"
:
{
"@dcloudio/uni-cli-shared"
:
"3.0.0-alpha-3060420220922006"
,
"@types/estree"
:
"^0.0.51"
,
"@types/google.maps"
:
"^3.45.6"
,
"@amap/amap-jsapi-types"
:
"^0.0.8"
,
"acorn-loose"
:
"^8.2.1"
,
...
...
packages/uni-h5/vite.config.ts
浏览文件 @
24f27b35
...
...
@@ -104,6 +104,11 @@ export default defineConfig({
}),
vueJsx
({
optimize
:
true
,
isCustomElement
:
isH5CustomElement
}),
],
esbuild
:
{
// 强制为 es2015,否则默认为 esnext,将会生成 __publicField 代码,
// 部分 API 写的时候,使用了动态定义 prototype 的方式,与 __publicField 冲突,比如 createCanvasContext
target
:
'
es2015
'
,
},
build
:
{
target
:
'
modules
'
,
// keep import.meta...
emptyOutDir
:
FORMAT
===
'
es
'
,
...
...
pnpm-lock.yaml
浏览文件 @
24f27b35
...
...
@@ -449,6 +449,7 @@ importers:
'
@dcloudio/uni-h5-vue'
:
3.0.0-alpha-3060420220922006
'
@dcloudio/uni-i18n'
:
3.0.0-alpha-3060420220922006
'
@dcloudio/uni-shared'
:
3.0.0-alpha-3060420220922006
'
@types/estree'
:
^0.0.51
'
@types/google.maps'
:
^3.45.6
'
@vue/server-renderer'
:
3.2.40
'
@vue/shared'
:
3.2.40
...
...
@@ -474,6 +475,7 @@ importers:
devDependencies
:
'
@amap/amap-jsapi-types'
:
0.0.8
'
@dcloudio/uni-cli-shared'
:
link:../uni-cli-shared
'
@types/estree'
:
0.0.51
'
@types/google.maps'
:
3.50.2
acorn-loose
:
8.3.0
acorn-walk
:
8.2.0
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录