Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
DCloud
uni-app
提交
5aac7fd6
U
uni-app
项目概览
DCloud
/
uni-app
3 个月 前同步成功
通知
725
Star
38705
Fork
3642
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
7
列表
看板
标记
里程碑
合并请求
1
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
U
uni-app
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
7
Issue
7
列表
看板
标记
里程碑
合并请求
1
合并请求
1
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
5aac7fd6
编写于
5月 25, 2021
作者:
fxy060608
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: add unsupported api
上级
f992e2ff
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
328 addition
and
10 deletion
+328
-10
packages/uni-api/src/helpers/api/index.ts
packages/uni-api/src/helpers/api/index.ts
+20
-0
packages/uni-api/src/index.ts
packages/uni-api/src/index.ts
+7
-0
packages/uni-api/src/protocols/media/saveImageToPhotosAlbum.ts
...ges/uni-api/src/protocols/media/saveImageToPhotosAlbum.ts
+3
-0
packages/uni-api/src/protocols/media/saveVideoToPhotosAlbum.ts
...ges/uni-api/src/protocols/media/saveVideoToPhotosAlbum.ts
+3
-0
packages/uni-h5/dist/uni-h5.cjs.js
packages/uni-h5/dist/uni-h5.cjs.js
+13
-2
packages/uni-h5/dist/uni-h5.es.js
packages/uni-h5/dist/uni-h5.es.js
+92
-4
packages/uni-h5/src/framework/components/layout/index.tsx
packages/uni-h5/src/framework/components/layout/index.tsx
+13
-4
packages/uni-h5/src/service/api/index.ts
packages/uni-h5/src/service/api/index.ts
+2
-0
packages/uni-h5/src/service/api/todo/index.ts
packages/uni-h5/src/service/api/todo/index.ts
+175
-0
未找到文件。
packages/uni-api/src/helpers/api/index.ts
浏览文件 @
5aac7fd6
...
@@ -233,3 +233,23 @@ export function defineAsyncApi<T extends AsyncApiLike, P = AsyncApiOptions<T>>(
...
@@ -233,3 +233,23 @@ export function defineAsyncApi<T extends AsyncApiLike, P = AsyncApiOptions<T>>(
wrapperAsyncApi
(
name
,
fn
as
any
,
__DEV__
?
protocol
:
undefined
,
options
)
wrapperAsyncApi
(
name
,
fn
as
any
,
__DEV__
?
protocol
:
undefined
,
options
)
)
as
AsyncApi
<
P
>
)
as
AsyncApi
<
P
>
}
}
function
createUnsupportedMsg
(
name
:
string
)
{
return
`method 'uni.
${
name
}
' not supported`
}
export
function
createUnsupportedSyncApi
(
name
:
string
)
{
return
():
any
=>
{
console
.
error
(
createUnsupportedMsg
(
name
))
}
}
export
const
createUnsupportedOnApi
=
createUnsupportedSyncApi
export
const
createUnsupportedOffApi
=
createUnsupportedSyncApi
export
const
createUnsupportedTaskApi
=
createUnsupportedSyncApi
export
function
createUnsupportedAsyncApi
(
name
:
string
)
{
return
(
_args
:
unknown
,
{
reject
}:
{
reject
:
(
err
?:
string
)
=>
void
})
=>
{
return
reject
(
createUnsupportedMsg
(
name
))
}
}
packages/uni-api/src/index.ts
浏览文件 @
5aac7fd6
...
@@ -45,6 +45,8 @@ export * from './protocols/media/chooseFile'
...
@@ -45,6 +45,8 @@ export * from './protocols/media/chooseFile'
export
*
from
'
./protocols/media/getImageInfo
'
export
*
from
'
./protocols/media/getImageInfo
'
export
*
from
'
./protocols/media/previewImage
'
export
*
from
'
./protocols/media/previewImage
'
export
*
from
'
./protocols/media/getVideoInfo
'
export
*
from
'
./protocols/media/getVideoInfo
'
export
*
from
'
./protocols/media/saveImageToPhotosAlbum
'
export
*
from
'
./protocols/media/saveVideoToPhotosAlbum
'
export
*
from
'
./protocols/network/request
'
export
*
from
'
./protocols/network/request
'
export
*
from
'
./protocols/network/downloadFile
'
export
*
from
'
./protocols/network/downloadFile
'
...
@@ -75,6 +77,11 @@ export {
...
@@ -75,6 +77,11 @@ export {
defineTaskApi
,
defineTaskApi
,
defineSyncApi
,
defineSyncApi
,
defineAsyncApi
,
defineAsyncApi
,
createUnsupportedOnApi
,
createUnsupportedOffApi
,
createUnsupportedTaskApi
,
createUnsupportedSyncApi
,
createUnsupportedAsyncApi
,
}
from
'
./helpers/api
'
}
from
'
./helpers/api
'
export
{
handlePromise
}
from
'
./helpers/api/promise
'
export
{
handlePromise
}
from
'
./helpers/api/promise
'
...
...
packages/uni-api/src/protocols/media/saveImageToPhotosAlbum.ts
0 → 100644
浏览文件 @
5aac7fd6
export
const
API_SAVE_IMAGE_TO_PHOTOS_ALBUM
=
'
saveImageToPhotosAlbum
'
export
type
API_TYPE_SAVE_IMAGE_TO_PHOTOS_ALBUM
=
typeof
uni
.
saveImageToPhotosAlbum
packages/uni-api/src/protocols/media/saveVideoToPhotosAlbum.ts
0 → 100644
浏览文件 @
5aac7fd6
export
const
API_SAVE_VIDEO_TO_PHOTOS_ALBUM
=
'
saveVideoToPhotosAlbum
'
export
type
API_TYPE_SAVE_VIDEO_TO_PHOTOS_ALBUM
=
typeof
uni
.
saveVideoToPhotosAlbum
packages/uni-h5/dist/uni-h5.cjs.js
浏览文件 @
5aac7fd6
...
@@ -10568,8 +10568,8 @@ var LayoutComponent = /* @__PURE__ */ defineSystemComponent({
...
@@ -10568,8 +10568,8 @@ var LayoutComponent = /* @__PURE__ */ defineSystemComponent({
const
{
const
{
layoutState
,
layoutState
,
windowState
windowState
}
=
__UNI_FEATURE_RESPONSIVE__
?
useState
()
:
{}
;
}
=
useState
()
;
layoutState
&&
useMaxWidth
(
layoutState
,
rootRef
);
useMaxWidth
(
layoutState
,
rootRef
);
const
topWindow
=
__UNI_FEATURE_TOPWINDOW__
&&
useTopWindow
(
layoutState
);
const
topWindow
=
__UNI_FEATURE_TOPWINDOW__
&&
useTopWindow
(
layoutState
);
const
leftWindow
=
__UNI_FEATURE_LEFTWINDOW__
&&
useLeftWindow
(
layoutState
);
const
leftWindow
=
__UNI_FEATURE_LEFTWINDOW__
&&
useLeftWindow
(
layoutState
);
const
rightWindow
=
__UNI_FEATURE_RIGHTWINDOW__
&&
useRightWindow
(
layoutState
);
const
rightWindow
=
__UNI_FEATURE_RIGHTWINDOW__
&&
useRightWindow
(
layoutState
);
...
@@ -10631,6 +10631,17 @@ function useMaxWidth(layoutState, rootRef) {
...
@@ -10631,6 +10631,17 @@ function useMaxWidth(layoutState, rootRef) {
vue
.
watch
([()
=>
route
.
path
],
checkMaxWidth
);
vue
.
watch
([()
=>
route
.
path
],
checkMaxWidth
);
}
}
function
useState
()
{
function
useState
()
{
if
(
!
__UNI_FEATURE_RESPONSIVE__
)
{
const
layoutState2
=
vue
.
reactive
({
marginWidth
:
0
});
vue
.
watch
(()
=>
layoutState2
.
marginWidth
,
(
value
)
=>
updateCssVar
({
"
--window-margin
"
:
value
+
"
px
"
}));
return
{
layoutState
:
layoutState2
};
}
const
topWindowMediaQuery
=
vue
.
ref
(
false
);
const
topWindowMediaQuery
=
vue
.
ref
(
false
);
const
leftWindowMediaQuery
=
vue
.
ref
(
false
);
const
leftWindowMediaQuery
=
vue
.
ref
(
false
);
const
rightWindowMediaQuery
=
vue
.
ref
(
false
);
const
rightWindowMediaQuery
=
vue
.
ref
(
false
);
...
...
packages/uni-h5/dist/uni-h5.es.js
浏览文件 @
5aac7fd6
...
@@ -1680,6 +1680,20 @@ function defineSyncApi(name, fn, protocol, options) {
...
@@ -1680,6 +1680,20 @@ function defineSyncApi(name, fn, protocol, options) {
function defineAsyncApi(name, fn, protocol, options) {
function defineAsyncApi(name, fn, protocol, options) {
return promisify(wrapperAsyncApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options));
return promisify(wrapperAsyncApi(name, fn, process.env.NODE_ENV !== "production" ? protocol : void 0, options));
}
}
function createUnsupportedMsg(name) {
return `method 'uni.${name}' not supported`;
}
function createUnsupportedSyncApi(name) {
return () => {
console.error(createUnsupportedMsg(name));
};
}
const createUnsupportedOnApi = createUnsupportedSyncApi;
function createUnsupportedAsyncApi(name) {
return (_args, {reject}) => {
return reject(createUnsupportedMsg(name));
};
}
const API_BASE64_TO_ARRAY_BUFFER = "base64ToArrayBuffer";
const API_BASE64_TO_ARRAY_BUFFER = "base64ToArrayBuffer";
const Base64ToArrayBufferProtocol = [
const Base64ToArrayBufferProtocol = [
{
{
...
@@ -11750,6 +11764,8 @@ const GetVideoInfoProtocol = {
...
@@ -11750,6 +11764,8 @@ const GetVideoInfoProtocol = {
required: true
required: true
}
}
};
};
const API_SAVE_IMAGE_TO_PHOTOS_ALBUM = "saveImageToPhotosAlbum";
const API_SAVE_VIDEO_TO_PHOTOS_ALBUM = "saveVideoToPhotosAlbum";
const API_REQUEST = "request";
const API_REQUEST = "request";
const dataType = {
const dataType = {
JSON: "json"
JSON: "json"
...
@@ -18057,8 +18073,8 @@ var LayoutComponent = /* @__PURE__ */ defineSystemComponent({
...
@@ -18057,8 +18073,8 @@ var LayoutComponent = /* @__PURE__ */ defineSystemComponent({
const {
const {
layoutState,
layoutState,
windowState
windowState
} =
__UNI_FEATURE_RESPONSIVE__ ? useState() : {}
;
} =
useState()
;
layoutState &&
useMaxWidth(layoutState, rootRef);
useMaxWidth(layoutState, rootRef);
const topWindow = __UNI_FEATURE_TOPWINDOW__ && useTopWindow(layoutState);
const topWindow = __UNI_FEATURE_TOPWINDOW__ && useTopWindow(layoutState);
const leftWindow = __UNI_FEATURE_LEFTWINDOW__ && useLeftWindow(layoutState);
const leftWindow = __UNI_FEATURE_LEFTWINDOW__ && useLeftWindow(layoutState);
const rightWindow = __UNI_FEATURE_RIGHTWINDOW__ && useRightWindow(layoutState);
const rightWindow = __UNI_FEATURE_RIGHTWINDOW__ && useRightWindow(layoutState);
...
@@ -18139,6 +18155,17 @@ function useMaxWidth(layoutState, rootRef) {
...
@@ -18139,6 +18155,17 @@ function useMaxWidth(layoutState, rootRef) {
});
});
}
}
function useState() {
function useState() {
if (!__UNI_FEATURE_RESPONSIVE__) {
const layoutState2 = reactive({
marginWidth: 0
});
watch(() => layoutState2.marginWidth, (value) => updateCssVar({
"--window-margin": value + "px"
}));
return {
layoutState: layoutState2
};
}
const topWindowMediaQuery = ref(false);
const topWindowMediaQuery = ref(false);
const leftWindowMediaQuery = ref(false);
const leftWindowMediaQuery = ref(false);
const rightWindowMediaQuery = ref(false);
const rightWindowMediaQuery = ref(false);
...
@@ -18470,6 +18497,46 @@ const setRightWindowStyle = /* @__PURE__ */ defineSyncApi("setRightWindowStyle",
...
@@ -18470,6 +18497,46 @@ const setRightWindowStyle = /* @__PURE__ */ defineSyncApi("setRightWindowStyle",
state2.rightWindowStyle = style;
state2.rightWindowStyle = style;
}
}
});
});
const saveImageToPhotosAlbum = /* @__PURE__ */ defineAsyncApi(API_SAVE_IMAGE_TO_PHOTOS_ALBUM, createUnsupportedAsyncApi(API_SAVE_IMAGE_TO_PHOTOS_ALBUM));
const API_GET_RECORDER_MANAGER = "getRecorderManager";
const getRecorderManager = /* @__PURE__ */ defineSyncApi(API_GET_RECORDER_MANAGER, createUnsupportedSyncApi(API_GET_RECORDER_MANAGER));
const saveVideoToPhotosAlbum = /* @__PURE__ */ defineAsyncApi(API_SAVE_VIDEO_TO_PHOTOS_ALBUM, createUnsupportedAsyncApi(API_SAVE_VIDEO_TO_PHOTOS_ALBUM));
const API_CREATE_CAMERA_CONTEXT = "createCameraContext";
const createCameraContext = /* @__PURE__ */ defineSyncApi(API_CREATE_CAMERA_CONTEXT, createUnsupportedSyncApi(API_CREATE_CAMERA_CONTEXT));
const API_CREATE_LIVE_PLAYER_CONTEXT = "createLivePlayerContext";
const createLivePlayerContext = /* @__PURE__ */ defineSyncApi(API_CREATE_LIVE_PLAYER_CONTEXT, createUnsupportedSyncApi(API_CREATE_LIVE_PLAYER_CONTEXT));
const API_SAVE_FILE = "saveFile";
const saveFile = /* @__PURE__ */ defineAsyncApi(API_SAVE_FILE, createUnsupportedAsyncApi(API_SAVE_FILE));
const API_GET_SAVED_FILE_LIST = "getSavedFileList";
const getSavedFileList = /* @__PURE__ */ defineAsyncApi(API_GET_SAVED_FILE_LIST, createUnsupportedAsyncApi(API_GET_SAVED_FILE_LIST));
const API_GET_SAVED_FILE_INFO = "getSavedFileInfo";
const getSavedFileInfo = /* @__PURE__ */ defineAsyncApi(API_GET_SAVED_FILE_INFO, createUnsupportedAsyncApi(API_GET_SAVED_FILE_INFO));
const API_REMOVE_SAVED_FILE_INFO = "removeSavedFileInfo";
const removeSavedFileInfo = /* @__PURE__ */ defineAsyncApi(API_REMOVE_SAVED_FILE_INFO, createUnsupportedAsyncApi(API_REMOVE_SAVED_FILE_INFO));
const API_ON_MEMORY_WARNING = "onMemoryWarning";
const onMemoryWarning = /* @__PURE__ */ defineOnApi(API_ON_MEMORY_WARNING, createUnsupportedOnApi(API_ON_MEMORY_WARNING));
const API_ON_GYROSCOPE_CHANGE = "onGyroscopeChange";
const onGyroscopeChange = /* @__PURE__ */ defineOnApi(API_ON_GYROSCOPE_CHANGE, createUnsupportedOnApi(API_ON_GYROSCOPE_CHANGE));
const API_START_GYROSCOPE = "startGyroscope";
const startGyroscope = /* @__PURE__ */ defineAsyncApi(API_START_GYROSCOPE, createUnsupportedAsyncApi(API_START_GYROSCOPE));
const API_STOP_GYROSCOPE = "stopGyroscope";
const stopGyroscope = /* @__PURE__ */ defineAsyncApi(API_STOP_GYROSCOPE, createUnsupportedAsyncApi(API_STOP_GYROSCOPE));
const API_SCAN_CODE = "scanCode";
const scanCode = /* @__PURE__ */ defineAsyncApi(API_SCAN_CODE, createUnsupportedAsyncApi(API_SCAN_CODE));
const API_SET_SCREEN_BRIGHTNESS = "setScreenBrightness";
const setScreenBrightness = /* @__PURE__ */ defineAsyncApi(API_SET_SCREEN_BRIGHTNESS, createUnsupportedAsyncApi(API_SET_SCREEN_BRIGHTNESS));
const API_GET_SCREEN_BRIGHTNESS = "getScreenBrightness";
const getScreenBrightness = /* @__PURE__ */ defineAsyncApi(API_GET_SCREEN_BRIGHTNESS, createUnsupportedAsyncApi(API_GET_SCREEN_BRIGHTNESS));
const API_SET_KEEP_SCREEN_ON = "setKeepScreenOn";
const setKeepScreenOn = /* @__PURE__ */ defineAsyncApi(API_SET_KEEP_SCREEN_ON, createUnsupportedAsyncApi(API_SET_KEEP_SCREEN_ON));
const API_ON_USER_CAPTURE_SCREEN = "onUserCaptureScreen";
const onUserCaptureScreen = /* @__PURE__ */ defineOnApi(API_ON_USER_CAPTURE_SCREEN, createUnsupportedOnApi(API_ON_USER_CAPTURE_SCREEN));
const API_ADD_PHONE_CONTACT = "addPhoneContact";
const addPhoneContact = /* @__PURE__ */ defineAsyncApi(API_ADD_PHONE_CONTACT, createUnsupportedAsyncApi(API_ADD_PHONE_CONTACT));
const API_LOGIN = "login";
const login = /* @__PURE__ */ defineAsyncApi(API_LOGIN, createUnsupportedAsyncApi(API_LOGIN));
const API_GET_PROVIDER = "getProvider";
const getProvider = /* @__PURE__ */ defineAsyncApi(API_GET_PROVIDER, createUnsupportedAsyncApi(API_GET_PROVIDER));
var api = /* @__PURE__ */ Object.freeze({
var api = /* @__PURE__ */ Object.freeze({
__proto__: null,
__proto__: null,
[Symbol.toStringTag]: "Module",
[Symbol.toStringTag]: "Module",
...
@@ -18590,7 +18657,28 @@ var api = /* @__PURE__ */ Object.freeze({
...
@@ -18590,7 +18657,28 @@ var api = /* @__PURE__ */ Object.freeze({
getLeftWindowStyle,
getLeftWindowStyle,
setLeftWindowStyle,
setLeftWindowStyle,
getRightWindowStyle,
getRightWindowStyle,
setRightWindowStyle
setRightWindowStyle,
saveImageToPhotosAlbum,
getRecorderManager,
saveVideoToPhotosAlbum,
createCameraContext,
createLivePlayerContext,
saveFile,
getSavedFileList,
getSavedFileInfo,
removeSavedFileInfo,
onMemoryWarning,
onGyroscopeChange,
startGyroscope,
stopGyroscope,
scanCode,
setScreenBrightness,
getScreenBrightness,
setKeepScreenOn,
onUserCaptureScreen,
addPhoneContact,
login,
getProvider
});
});
const CONTEXT_ID = "MAP_LOCATION";
const CONTEXT_ID = "MAP_LOCATION";
const ICON_PATH = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAIQAAACECAMAAABmmnOVAAAC01BMVEUAAAAAef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef8Aef96quGStdqStdpbnujMzMzCyM7Gyc7Ky83MzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMzMwAef8GfP0yjfNWnOp0qOKKsdyYt9mju9aZt9mMstx1qeJYnekyjvIIfP0qivVmouaWttnMzMyat9lppOUujPQKffxhoOfNzc3Y2Njh4eHp6enu7u7y8vL19fXv7+/i4uLZ2dnOzs6auNgOf/sKff15quHR0dHx8fH9/f3////j4+N6quFdn+iywdPb29vw8PD+/v7c3NyywtLa2tr29vbS0tLd3d38/Pzf39/o6Ojc7f+q0v+HwP9rsf9dqv9Hnv9Vpv/q6urj8P+Vx/9Am/8Pgf8Iff/z8/OAvP95uf/n5+c5l//V6f+52v+y1//7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3RPLdfSfpv3MRRZfPoLc6Xs/5bt3EyMGzE9h07/Xft2t15z6i9+zgGg8FgMBgMBoPBYDAYDAYj8/APG67Rie8pUDsAAAAASUVORK5CYII=";
...
@@ -20578,4 +20666,4 @@ var index = /* @__PURE__ */ defineSystemComponent({
...
@@ -20578,4 +20666,4 @@ var index = /* @__PURE__ */ defineSystemComponent({
return openBlock(), createBlock("div", clazz, [loadingVNode]);
return openBlock(), createBlock("div", clazz, [loadingVNode]);
}
}
});
});
export {$emit, $off, $on, $once, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, _sfc_main$2 as Audio, index$r as Button, index$q as Canvas, index$o as Checkbox, index$p as CheckboxGroup, index$3 as CoverImage, index$4 as CoverView, index$n as Editor, index$t as Form, Friction, index$m as Icon, index$l as Image, Input, index$s as Label, LayoutComponent, Map$1 as Map, MovableArea, MovableView, index$k as Navigator, index$2 as PageComponent, _sfc_main$1 as Picker, PickerView, PickerViewColumn, index$j as Progress, index$h as Radio, index$i as RadioGroup, ResizeSensor, index$g as RichText, ScrollView, Scroller, index$f as Slider, Spring, Swiper, SwiperItem, index$e as Switch, index$d as Text, index$c as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$7 as Video, index$b as View, index$6 as WebView, addInterceptor, a
rrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closeSocket, connectSocket, createAnimation, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, defineBuiltInComponent, defineSystemComponent, disableScrollBounce, downloadFile, getApp$1 as getApp, getContextInfo, getCurrentPages$1 as getCurrentPages, getFileInfo, getImageInfo, getLeftWindowStyle, getLocation, getNetworkType, getRightWindowStyle, getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, initScrollBounce, loadFontFace, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, offWindowResize, onAccelerometerChange, onCompassChange, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onWindowResize, openDocument, openLocation, pageScrollTo, index$8 as plugin, preloadPage, previewImage, promiseInterceptor, reLaunch, redirectTo, removeInterceptor, removeStorage, removeStorageSync, removeTabBarBadge, request, sendSocketMessage, setLeftWindowStyle, setNavigationBarColor, setNavigationBarTitle, setRightWindowStyle, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startPullDownRefresh, stopAccelerometer, stopCompass
, stopPullDownRefresh, switchTab, uni$1 as uni, uniFormKey, uploadFile, upx2px, useAttrs, useBooleanAttr, useContextInfo, useCustomEvent, useNativeEvent, useOn, useScroller, useSubscribe, useTouchtrack, useUserAction, vibrateLong, vibrateShort, withWebEvent};
export {$emit, $off, $on, $once, index$1 as AsyncErrorComponent, index as AsyncLoadingComponent, _sfc_main$2 as Audio, index$r as Button, index$q as Canvas, index$o as Checkbox, index$p as CheckboxGroup, index$3 as CoverImage, index$4 as CoverView, index$n as Editor, index$t as Form, Friction, index$m as Icon, index$l as Image, Input, index$s as Label, LayoutComponent, Map$1 as Map, MovableArea, MovableView, index$k as Navigator, index$2 as PageComponent, _sfc_main$1 as Picker, PickerView, PickerViewColumn, index$j as Progress, index$h as Radio, index$i as RadioGroup, ResizeSensor, index$g as RichText, ScrollView, Scroller, index$f as Slider, Spring, Swiper, SwiperItem, index$e as Switch, index$d as Text, index$c as Textarea, UniServiceJSBridge$1 as UniServiceJSBridge, UniViewJSBridge$1 as UniViewJSBridge, index$7 as Video, index$b as View, index$6 as WebView, addInterceptor, a
ddPhoneContact, arrayBufferToBase64, base64ToArrayBuffer, canIUse, canvasGetImageData, canvasPutImageData, canvasToTempFilePath, chooseFile, chooseImage, chooseLocation, chooseVideo, clearStorage, clearStorageSync, closeSocket, connectSocket, createAnimation, createCameraContext, createCanvasContext, createInnerAudioContext, createIntersectionObserver, createLivePlayerContext, createMapContext, createMediaQueryObserver, createSelectorQuery, createVideoContext, cssBackdropFilter, cssConstant, cssEnv, cssVar, defineBuiltInComponent, defineSystemComponent, disableScrollBounce, downloadFile, getApp$1 as getApp, getContextInfo, getCurrentPages$1 as getCurrentPages, getFileInfo, getImageInfo, getLeftWindowStyle, getLocation, getNetworkType, getProvider, getRecorderManager, getRightWindowStyle, getSavedFileInfo, getSavedFileList, getScreenBrightness, getSelectedTextRange, getStorage, getStorageInfo, getStorageInfoSync, getStorageSync, getSystemInfo, getSystemInfoSync, getTopWindowStyle, getVideoInfo, hideKeyboard, hideLeftWindow, hideLoading, hideNavigationBarLoading, hideRightWindow, hideTabBar, hideTabBarRedDot, hideToast, hideTopWindow, initScrollBounce, loadFontFace, login, makePhoneCall, navigateBack, navigateTo, offAccelerometerChange, offCompassChange, offNetworkStatusChange, offWindowResize, onAccelerometerChange, onCompassChange, onGyroscopeChange, onMemoryWarning, onNetworkStatusChange, onSocketClose, onSocketError, onSocketMessage, onSocketOpen, onTabBarMidButtonTap, onUserCaptureScreen, onWindowResize, openDocument, openLocation, pageScrollTo, index$8 as plugin, preloadPage, previewImage, promiseInterceptor, reLaunch, redirectTo, removeInterceptor, removeSavedFileInfo, removeStorage, removeStorageSync, removeTabBarBadge, request, saveFile, saveImageToPhotosAlbum, saveVideoToPhotosAlbum, scanCode, sendSocketMessage, setKeepScreenOn, setLeftWindowStyle, setNavigationBarColor, setNavigationBarTitle, setRightWindowStyle, setScreenBrightness, setStorage, setStorageSync, setTabBarBadge, setTabBarItem, setTabBarStyle, setTopWindowStyle, setupApp, setupPage, showActionSheet, showLeftWindow, showLoading, showModal, showNavigationBarLoading, showRightWindow, showTabBar, showTabBarRedDot, showToast, showTopWindow, startAccelerometer, startCompass, startGyroscope, startPullDownRefresh, stopAccelerometer, stopCompass, stopGyroscope
, stopPullDownRefresh, switchTab, uni$1 as uni, uniFormKey, uploadFile, upx2px, useAttrs, useBooleanAttr, useContextInfo, useCustomEvent, useNativeEvent, useOn, useScroller, useSubscribe, useTouchtrack, useUserAction, vibrateLong, vibrateShort, withWebEvent};
packages/uni-h5/src/framework/components/layout/index.tsx
浏览文件 @
5aac7fd6
...
@@ -47,10 +47,8 @@ export default /*#__PURE__*/ defineSystemComponent({
...
@@ -47,10 +47,8 @@ export default /*#__PURE__*/ defineSystemComponent({
!
__NODE_JS__
&&
initCssVar
()
!
__NODE_JS__
&&
initCssVar
()
const
keepAliveRoute
=
(
__UNI_FEATURE_PAGES__
&&
const
keepAliveRoute
=
(
__UNI_FEATURE_PAGES__
&&
useKeepAliveRoute
())
as
KeepAliveRoute
useKeepAliveRoute
())
as
KeepAliveRoute
const
{
layoutState
,
windowState
}
=
__UNI_FEATURE_RESPONSIVE__
const
{
layoutState
,
windowState
}
=
useState
()
?
useState
()
useMaxWidth
(
layoutState
,
rootRef
)
:
({}
as
{
layoutState
:
undefined
;
windowState
:
undefined
})
layoutState
&&
useMaxWidth
(
layoutState
,
rootRef
)
const
topWindow
=
__UNI_FEATURE_TOPWINDOW__
&&
useTopWindow
(
layoutState
!
)
const
topWindow
=
__UNI_FEATURE_TOPWINDOW__
&&
useTopWindow
(
layoutState
!
)
const
leftWindow
=
__UNI_FEATURE_LEFTWINDOW__
&&
useLeftWindow
(
layoutState
!
)
const
leftWindow
=
__UNI_FEATURE_LEFTWINDOW__
&&
useLeftWindow
(
layoutState
!
)
const
rightWindow
=
const
rightWindow
=
...
@@ -185,6 +183,17 @@ function useMaxWidth(
...
@@ -185,6 +183,17 @@ function useMaxWidth(
}
}
function
useState
()
{
function
useState
()
{
if
(
!
__UNI_FEATURE_RESPONSIVE__
)
{
// max width
const
layoutState
=
reactive
({
marginWidth
:
0
,
})
as
LayoutState
watch
(
()
=>
layoutState
.
marginWidth
,
(
value
)
=>
updateCssVar
({
'
--window-margin
'
:
value
+
'
px
'
})
)
return
{
layoutState
}
}
const
topWindowMediaQuery
=
ref
(
false
)
const
topWindowMediaQuery
=
ref
(
false
)
const
leftWindowMediaQuery
=
ref
(
false
)
const
leftWindowMediaQuery
=
ref
(
false
)
const
rightWindowMediaQuery
=
ref
(
false
)
const
rightWindowMediaQuery
=
ref
(
false
)
...
...
packages/uni-h5/src/service/api/index.ts
浏览文件 @
5aac7fd6
...
@@ -61,6 +61,8 @@ export * from './ui/stopPullDownRefresh'
...
@@ -61,6 +61,8 @@ export * from './ui/stopPullDownRefresh'
export
*
from
'
./ui/tabBar
'
export
*
from
'
./ui/tabBar
'
export
*
from
'
./ui/window
'
export
*
from
'
./ui/window
'
export
*
from
'
./todo/index
'
export
{
export
{
upx2px
,
upx2px
,
addInterceptor
,
addInterceptor
,
...
...
packages/uni-h5/src/service/api/todo/index.ts
0 → 100644
浏览文件 @
5aac7fd6
import
{
API_SAVE_IMAGE_TO_PHOTOS_ALBUM
,
API_SAVE_VIDEO_TO_PHOTOS_ALBUM
,
API_TYPE_SAVE_IMAGE_TO_PHOTOS_ALBUM
,
API_TYPE_SAVE_VIDEO_TO_PHOTOS_ALBUM
,
createUnsupportedAsyncApi
,
createUnsupportedOnApi
,
createUnsupportedSyncApi
,
defineAsyncApi
,
defineOnApi
,
defineSyncApi
,
}
from
'
@dcloudio/uni-api
'
export
const
saveImageToPhotosAlbum
=
defineAsyncApi
<
API_TYPE_SAVE_IMAGE_TO_PHOTOS_ALBUM
>
(
API_SAVE_IMAGE_TO_PHOTOS_ALBUM
,
createUnsupportedAsyncApi
(
API_SAVE_IMAGE_TO_PHOTOS_ALBUM
)
)
const
API_GET_RECORDER_MANAGER
=
'
getRecorderManager
'
export
const
getRecorderManager
=
defineSyncApi
<
typeof
uni
.
getRecorderManager
>
(
API_GET_RECORDER_MANAGER
,
createUnsupportedSyncApi
(
API_GET_RECORDER_MANAGER
)
)
export
const
saveVideoToPhotosAlbum
=
defineAsyncApi
<
API_TYPE_SAVE_VIDEO_TO_PHOTOS_ALBUM
>
(
API_SAVE_VIDEO_TO_PHOTOS_ALBUM
,
createUnsupportedAsyncApi
(
API_SAVE_VIDEO_TO_PHOTOS_ALBUM
)
)
const
API_CREATE_CAMERA_CONTEXT
=
'
createCameraContext
'
export
const
createCameraContext
=
defineSyncApi
<
typeof
uni
.
createCameraContext
>
(
API_CREATE_CAMERA_CONTEXT
,
createUnsupportedSyncApi
(
API_CREATE_CAMERA_CONTEXT
)
)
const
API_CREATE_LIVE_PLAYER_CONTEXT
=
'
createLivePlayerContext
'
export
const
createLivePlayerContext
=
defineSyncApi
<
typeof
uni
.
createLivePlayerContext
>
(
API_CREATE_LIVE_PLAYER_CONTEXT
,
createUnsupportedSyncApi
(
API_CREATE_LIVE_PLAYER_CONTEXT
)
)
const
API_SAVE_FILE
=
'
saveFile
'
export
const
saveFile
=
defineAsyncApi
<
typeof
uni
.
saveFile
>
(
API_SAVE_FILE
,
createUnsupportedAsyncApi
(
API_SAVE_FILE
)
)
const
API_GET_SAVED_FILE_LIST
=
'
getSavedFileList
'
export
const
getSavedFileList
=
defineAsyncApi
<
typeof
uni
.
getSavedFileList
>
(
API_GET_SAVED_FILE_LIST
,
createUnsupportedAsyncApi
(
API_GET_SAVED_FILE_LIST
)
)
const
API_GET_SAVED_FILE_INFO
=
'
getSavedFileInfo
'
export
const
getSavedFileInfo
=
defineAsyncApi
<
typeof
uni
.
getSavedFileInfo
>
(
API_GET_SAVED_FILE_INFO
,
createUnsupportedAsyncApi
(
API_GET_SAVED_FILE_INFO
)
)
const
API_REMOVE_SAVED_FILE_INFO
=
'
removeSavedFileInfo
'
export
const
removeSavedFileInfo
=
defineAsyncApi
(
API_REMOVE_SAVED_FILE_INFO
,
createUnsupportedAsyncApi
(
API_REMOVE_SAVED_FILE_INFO
)
)
const
API_ON_MEMORY_WARNING
=
'
onMemoryWarning
'
export
const
onMemoryWarning
=
defineOnApi
<
typeof
uni
.
onMemoryWarning
>
(
API_ON_MEMORY_WARNING
,
createUnsupportedOnApi
(
API_ON_MEMORY_WARNING
)
)
const
API_ON_GYROSCOPE_CHANGE
=
'
onGyroscopeChange
'
export
const
onGyroscopeChange
=
defineOnApi
<
typeof
uni
.
onGyroscopeChange
>
(
API_ON_GYROSCOPE_CHANGE
,
createUnsupportedOnApi
(
API_ON_GYROSCOPE_CHANGE
)
)
const
API_START_GYROSCOPE
=
'
startGyroscope
'
export
const
startGyroscope
=
defineAsyncApi
<
typeof
uni
.
startGyroscope
>
(
API_START_GYROSCOPE
,
createUnsupportedAsyncApi
(
API_START_GYROSCOPE
)
)
const
API_STOP_GYROSCOPE
=
'
stopGyroscope
'
export
const
stopGyroscope
=
defineAsyncApi
<
typeof
uni
.
stopGyroscope
>
(
API_STOP_GYROSCOPE
,
createUnsupportedAsyncApi
(
API_STOP_GYROSCOPE
)
)
const
API_SCAN_CODE
=
'
scanCode
'
export
const
scanCode
=
defineAsyncApi
<
typeof
uni
.
scanCode
>
(
API_SCAN_CODE
,
createUnsupportedAsyncApi
(
API_SCAN_CODE
)
)
const
API_SET_SCREEN_BRIGHTNESS
=
'
setScreenBrightness
'
export
const
setScreenBrightness
=
defineAsyncApi
<
typeof
uni
.
setScreenBrightness
>
(
API_SET_SCREEN_BRIGHTNESS
,
createUnsupportedAsyncApi
(
API_SET_SCREEN_BRIGHTNESS
)
)
const
API_GET_SCREEN_BRIGHTNESS
=
'
getScreenBrightness
'
export
const
getScreenBrightness
=
defineAsyncApi
<
typeof
uni
.
getScreenBrightness
>
(
API_GET_SCREEN_BRIGHTNESS
,
createUnsupportedAsyncApi
(
API_GET_SCREEN_BRIGHTNESS
)
)
const
API_SET_KEEP_SCREEN_ON
=
'
setKeepScreenOn
'
export
const
setKeepScreenOn
=
defineAsyncApi
<
typeof
uni
.
setKeepScreenOn
>
(
API_SET_KEEP_SCREEN_ON
,
createUnsupportedAsyncApi
(
API_SET_KEEP_SCREEN_ON
)
)
const
API_ON_USER_CAPTURE_SCREEN
=
'
onUserCaptureScreen
'
export
const
onUserCaptureScreen
=
defineOnApi
<
typeof
uni
.
onUserCaptureScreen
>
(
API_ON_USER_CAPTURE_SCREEN
,
createUnsupportedOnApi
(
API_ON_USER_CAPTURE_SCREEN
)
)
const
API_ADD_PHONE_CONTACT
=
'
addPhoneContact
'
export
const
addPhoneContact
=
defineAsyncApi
<
typeof
uni
.
addPhoneContact
>
(
API_ADD_PHONE_CONTACT
,
createUnsupportedAsyncApi
(
API_ADD_PHONE_CONTACT
)
)
const
API_LOGIN
=
'
login
'
export
const
login
=
defineAsyncApi
<
typeof
uni
.
login
>
(
API_LOGIN
,
createUnsupportedAsyncApi
(
API_LOGIN
)
)
const
API_GET_PROVIDER
=
'
getProvider
'
export
const
getProvider
=
defineAsyncApi
<
typeof
uni
.
getProvider
>
(
API_GET_PROVIDER
,
createUnsupportedAsyncApi
(
API_GET_PROVIDER
)
)
// TODO...
// 'openBluetoothAdapter',
// 'startBluetoothDevicesDiscovery',
// 'onBluetoothDeviceFound',
// 'stopBluetoothDevicesDiscovery',
// 'onBluetoothAdapterStateChange',
// 'getConnectedBluetoothDevices',
// 'getBluetoothDevices',
// 'getBluetoothAdapterState',
// 'closeBluetoothAdapter',
// 'writeBLECharacteristicValue',
// 'readBLECharacteristicValue',
// 'onBLEConnectionStateChange',
// 'onBLECharacteristicValueChange',
// 'notifyBLECharacteristicValueChange',
// 'getBLEDeviceServices',
// 'getBLEDeviceCharacteristics',
// 'createBLEConnection',
// 'closeBLEConnection',
// 'onBeaconServiceChange',
// 'onBeaconUpdate',
// 'getBeacons',
// 'startBeaconDiscovery',
// 'stopBeaconDiscovery',
// 'setBackgroundColor',
// 'setBackgroundTextStyle',
// 'checkSession',
// 'getUserInfo',
// 'share',
// 'onShareAppMessage',
// 'showShareMenu',
// 'hideShareMenu',
// 'requestPayment',
// 'subscribePush',
// 'unsubscribePush',
// 'onPush',
// 'offPush'
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录