更新
This commit is contained in:
+202
@@ -0,0 +1,202 @@
|
||||
|
||||
Apache License
|
||||
Version 2.0, January 2004
|
||||
http://www.apache.org/licenses/
|
||||
|
||||
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
||||
|
||||
1. Definitions.
|
||||
|
||||
"License" shall mean the terms and conditions for use, reproduction,
|
||||
and distribution as defined by Sections 1 through 9 of this document.
|
||||
|
||||
"Licensor" shall mean the copyright owner or entity authorized by
|
||||
the copyright owner that is granting the License.
|
||||
|
||||
"Legal Entity" shall mean the union of the acting entity and all
|
||||
other entities that control, are controlled by, or are under common
|
||||
control with that entity. For the purposes of this definition,
|
||||
"control" means (i) the power, direct or indirect, to cause the
|
||||
direction or management of such entity, whether by contract or
|
||||
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
||||
outstanding shares, or (iii) beneficial ownership of such entity.
|
||||
|
||||
"You" (or "Your") shall mean an individual or Legal Entity
|
||||
exercising permissions granted by this License.
|
||||
|
||||
"Source" form shall mean the preferred form for making modifications,
|
||||
including but not limited to software source code, documentation
|
||||
source, and configuration files.
|
||||
|
||||
"Object" form shall mean any form resulting from mechanical
|
||||
transformation or translation of a Source form, including but
|
||||
not limited to compiled object code, generated documentation,
|
||||
and conversions to other media types.
|
||||
|
||||
"Work" shall mean the work of authorship, whether in Source or
|
||||
Object form, made available under the License, as indicated by a
|
||||
copyright notice that is included in or attached to the work
|
||||
(an example is provided in the Appendix below).
|
||||
|
||||
"Derivative Works" shall mean any work, whether in Source or Object
|
||||
form, that is based on (or derived from) the Work and for which the
|
||||
editorial revisions, annotations, elaborations, or other modifications
|
||||
represent, as a whole, an original work of authorship. For the purposes
|
||||
of this License, Derivative Works shall not include works that remain
|
||||
separable from, or merely link (or bind by name) to the interfaces of,
|
||||
the Work and Derivative Works thereof.
|
||||
|
||||
"Contribution" shall mean any work of authorship, including
|
||||
the original version of the Work and any modifications or additions
|
||||
to that Work or Derivative Works thereof, that is intentionally
|
||||
submitted to Licensor for inclusion in the Work by the copyright owner
|
||||
or by an individual or Legal Entity authorized to submit on behalf of
|
||||
the copyright owner. For the purposes of this definition, "submitted"
|
||||
means any form of electronic, verbal, or written communication sent
|
||||
to the Licensor or its representatives, including but not limited to
|
||||
communication on electronic mailing lists, source code control systems,
|
||||
and issue tracking systems that are managed by, or on behalf of, the
|
||||
Licensor for the purpose of discussing and improving the Work, but
|
||||
excluding communication that is conspicuously marked or otherwise
|
||||
designated in writing by the copyright owner as "Not a Contribution."
|
||||
|
||||
"Contributor" shall mean Licensor and any individual or Legal Entity
|
||||
on behalf of whom a Contribution has been received by Licensor and
|
||||
subsequently incorporated within the Work.
|
||||
|
||||
2. Grant of Copyright License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
copyright license to reproduce, prepare Derivative Works of,
|
||||
publicly display, publicly perform, sublicense, and distribute the
|
||||
Work and such Derivative Works in Source or Object form.
|
||||
|
||||
3. Grant of Patent License. Subject to the terms and conditions of
|
||||
this License, each Contributor hereby grants to You a perpetual,
|
||||
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
||||
(except as stated in this section) patent license to make, have made,
|
||||
use, offer to sell, sell, import, and otherwise transfer the Work,
|
||||
where such license applies only to those patent claims licensable
|
||||
by such Contributor that are necessarily infringed by their
|
||||
Contribution(s) alone or by combination of their Contribution(s)
|
||||
with the Work to which such Contribution(s) was submitted. If You
|
||||
institute patent litigation against any entity (including a
|
||||
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
||||
or a Contribution incorporated within the Work constitutes direct
|
||||
or contributory patent infringement, then any patent licenses
|
||||
granted to You under this License for that Work shall terminate
|
||||
as of the date such litigation is filed.
|
||||
|
||||
4. Redistribution. You may reproduce and distribute copies of the
|
||||
Work or Derivative Works thereof in any medium, with or without
|
||||
modifications, and in Source or Object form, provided that You
|
||||
meet the following conditions:
|
||||
|
||||
(a) You must give any other recipients of the Work or
|
||||
Derivative Works a copy of this License; and
|
||||
|
||||
(b) You must cause any modified files to carry prominent notices
|
||||
stating that You changed the files; and
|
||||
|
||||
(c) You must retain, in the Source form of any Derivative Works
|
||||
that You distribute, all copyright, patent, trademark, and
|
||||
attribution notices from the Source form of the Work,
|
||||
excluding those notices that do not pertain to any part of
|
||||
the Derivative Works; and
|
||||
|
||||
(d) If the Work includes a "NOTICE" text file as part of its
|
||||
distribution, then any Derivative Works that You distribute must
|
||||
include a readable copy of the attribution notices contained
|
||||
within such NOTICE file, excluding those notices that do not
|
||||
pertain to any part of the Derivative Works, in at least one
|
||||
of the following places: within a NOTICE text file distributed
|
||||
as part of the Derivative Works; within the Source form or
|
||||
documentation, if provided along with the Derivative Works; or,
|
||||
within a display generated by the Derivative Works, if and
|
||||
wherever such third-party notices normally appear. The contents
|
||||
of the NOTICE file are for informational purposes only and
|
||||
do not modify the License. You may add Your own attribution
|
||||
notices within Derivative Works that You distribute, alongside
|
||||
or as an addendum to the NOTICE text from the Work, provided
|
||||
that such additional attribution notices cannot be construed
|
||||
as modifying the License.
|
||||
|
||||
You may add Your own copyright statement to Your modifications and
|
||||
may provide additional or different license terms and conditions
|
||||
for use, reproduction, or distribution of Your modifications, or
|
||||
for any such Derivative Works as a whole, provided Your use,
|
||||
reproduction, and distribution of the Work otherwise complies with
|
||||
the conditions stated in this License.
|
||||
|
||||
5. Submission of Contributions. Unless You explicitly state otherwise,
|
||||
any Contribution intentionally submitted for inclusion in the Work
|
||||
by You to the Licensor shall be under the terms and conditions of
|
||||
this License, without any additional terms or conditions.
|
||||
Notwithstanding the above, nothing herein shall supersede or modify
|
||||
the terms of any separate license agreement you may have executed
|
||||
with Licensor regarding such Contributions.
|
||||
|
||||
6. Trademarks. This License does not grant permission to use the trade
|
||||
names, trademarks, service marks, or product names of the Licensor,
|
||||
except as required for reasonable and customary use in describing the
|
||||
origin of the Work and reproducing the content of the NOTICE file.
|
||||
|
||||
7. Disclaimer of Warranty. Unless required by applicable law or
|
||||
agreed to in writing, Licensor provides the Work (and each
|
||||
Contributor provides its Contributions) on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
||||
implied, including, without limitation, any warranties or conditions
|
||||
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
||||
PARTICULAR PURPOSE. You are solely responsible for determining the
|
||||
appropriateness of using or redistributing the Work and assume any
|
||||
risks associated with Your exercise of permissions under this License.
|
||||
|
||||
8. Limitation of Liability. In no event and under no legal theory,
|
||||
whether in tort (including negligence), contract, or otherwise,
|
||||
unless required by applicable law (such as deliberate and grossly
|
||||
negligent acts) or agreed to in writing, shall any Contributor be
|
||||
liable to You for damages, including any direct, indirect, special,
|
||||
incidental, or consequential damages of any character arising as a
|
||||
result of this License or out of the use or inability to use the
|
||||
Work (including but not limited to damages for loss of goodwill,
|
||||
work stoppage, computer failure or malfunction, or any and all
|
||||
other commercial damages or losses), even if such Contributor
|
||||
has been advised of the possibility of such damages.
|
||||
|
||||
9. Accepting Warranty or Additional Liability. While redistributing
|
||||
the Work or Derivative Works thereof, You may choose to offer,
|
||||
and charge a fee for, acceptance of support, warranty, indemnity,
|
||||
or other liability obligations and/or rights consistent with this
|
||||
License. However, in accepting such obligations, You may act only
|
||||
on Your own behalf and on Your sole responsibility, not on behalf
|
||||
of any other Contributor, and only if You agree to indemnify,
|
||||
defend, and hold each Contributor harmless for any liability
|
||||
incurred by, or claims asserted against, such Contributor by reason
|
||||
of your accepting any such warranty or additional liability.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
APPENDIX: How to apply the Apache License to your work.
|
||||
|
||||
To apply the Apache License to your work, attach the following
|
||||
boilerplate notice, with the fields enclosed by brackets "[]"
|
||||
replaced with your own identifying information. (Don't include
|
||||
the brackets!) The text should be enclosed in the appropriate
|
||||
comment syntax for the file format. We also recommend that a
|
||||
file or class name and description of purpose be included on the
|
||||
same "printed page" as the copyright notice for easier
|
||||
identification within third-party archives.
|
||||
|
||||
Copyright [yyyy] [name of copyright owner]
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
# @dcloudio/uni-app-plus
|
||||
|
||||
uni-app 处理 App。
|
||||
|
||||
包含 `uni-app-x` 内置 api/components 等逻辑
|
||||
|
||||
## 项目结构
|
||||
|
||||
本身是一个 vite 项目,存在 `vite.config.ts` 和 `x.vite.config.ts` 两个配置文件。
|
||||
|
||||
### 处理 `uni-app-x`
|
||||
|
||||
通过 `node scripts/build.js uni-app-plus` 运行编译时候,会通过 `vite build --config x.vite.config.ts`
|
||||
|
||||
最终得到 `dist/uni.x.runtime.esm.js`,后续其他项目会依赖产物进一步处理。
|
||||
|
||||
## 参与贡献
|
||||
|
||||
### uni-app-x
|
||||
|
||||
如果你想参与到 `uni-app-x` 的贡献中,你可以着重了解 `src/x` 目录。
|
||||
+1
File diff suppressed because one or more lines are too long
+178
@@ -0,0 +1,178 @@
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.Tools = {}));
|
||||
})(this, (function (exports) { 'use strict';
|
||||
|
||||
/**
|
||||
* @vue/shared v3.4.21
|
||||
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
||||
* @license MIT
|
||||
**/
|
||||
|
||||
!!(process.env.NODE_ENV !== "production") ? Object.freeze({}) : {};
|
||||
!!(process.env.NODE_ENV !== "production") ? Object.freeze([]) : [];
|
||||
const hasOwnProperty = Object.prototype.hasOwnProperty;
|
||||
const hasOwn = (val, key) => hasOwnProperty.call(val, key);
|
||||
|
||||
const ACTION_TYPE_PAGE_CREATE = 1;
|
||||
const ACTION_TYPE_PAGE_CREATED = 2;
|
||||
const ACTION_TYPE_CREATE = 3;
|
||||
const ACTION_TYPE_INSERT = 4;
|
||||
const ACTION_TYPE_REMOVE = 5;
|
||||
const ACTION_TYPE_SET_ATTRIBUTE = 6;
|
||||
const ACTION_TYPE_REMOVE_ATTRIBUTE = 7;
|
||||
const ACTION_TYPE_ADD_EVENT = 8;
|
||||
const ACTION_TYPE_REMOVE_EVENT = 9;
|
||||
const ACTION_TYPE_SET_TEXT = 10;
|
||||
const ACTION_TYPE_ADD_WXS_EVENT = 12;
|
||||
|
||||
const ACTION_TYPE_DICT = 0;
|
||||
|
||||
function createGetDict(dict) {
|
||||
if (!dict.length) {
|
||||
return (v) => v;
|
||||
}
|
||||
const getDict = (value, includeValue = true) => {
|
||||
if (typeof value === 'number') {
|
||||
return dict[value];
|
||||
}
|
||||
const res = {};
|
||||
value.forEach(([n, v]) => {
|
||||
if (includeValue) {
|
||||
res[getDict(n)] = getDict(v);
|
||||
}
|
||||
else {
|
||||
res[getDict(n)] = v;
|
||||
}
|
||||
});
|
||||
return res;
|
||||
};
|
||||
return getDict;
|
||||
}
|
||||
function decodeActions(actions) {
|
||||
const [type, dict] = actions[0];
|
||||
if (type !== ACTION_TYPE_DICT) {
|
||||
return actions;
|
||||
}
|
||||
const getDict = createGetDict(dict);
|
||||
return actions.map((action) => {
|
||||
switch (action[0]) {
|
||||
case ACTION_TYPE_DICT:
|
||||
return action;
|
||||
case ACTION_TYPE_PAGE_CREATE:
|
||||
return decodePageCreateAction(action);
|
||||
case ACTION_TYPE_PAGE_CREATED:
|
||||
return decodePageCreatedAction(action);
|
||||
case ACTION_TYPE_CREATE:
|
||||
return decodeCreateAction(action, getDict);
|
||||
case ACTION_TYPE_INSERT:
|
||||
return decodeInsertAction(action, getDict);
|
||||
case ACTION_TYPE_REMOVE:
|
||||
return decodeRemoveAction(action);
|
||||
case ACTION_TYPE_SET_ATTRIBUTE:
|
||||
return decodeSetAttributeAction(action, getDict);
|
||||
case ACTION_TYPE_REMOVE_ATTRIBUTE:
|
||||
return decodeRemoveAttributeAction(action, getDict);
|
||||
case ACTION_TYPE_ADD_EVENT:
|
||||
return decodeAddEventAction(action, getDict);
|
||||
case ACTION_TYPE_ADD_WXS_EVENT:
|
||||
return decodeAddWxsEventAction(action, getDict);
|
||||
case ACTION_TYPE_REMOVE_EVENT:
|
||||
return decodeRemoveEventAction(action, getDict);
|
||||
case ACTION_TYPE_SET_TEXT:
|
||||
return decodeSetTextAction(action, getDict);
|
||||
}
|
||||
});
|
||||
}
|
||||
function decodePageCreateAction([, pageCreateData]) {
|
||||
return ['pageCreate', pageCreateData];
|
||||
}
|
||||
function decodePageCreatedAction([]) {
|
||||
return ['pageCreated'];
|
||||
}
|
||||
function decodeNodeJson(getDict, nodeJson) {
|
||||
if (!nodeJson) {
|
||||
return;
|
||||
}
|
||||
if (hasOwn(nodeJson, 'a')) {
|
||||
nodeJson.a = getDict(nodeJson.a);
|
||||
}
|
||||
if (hasOwn(nodeJson, 'e')) {
|
||||
nodeJson.e = getDict(nodeJson.e, false);
|
||||
}
|
||||
if (hasOwn(nodeJson, 'w')) {
|
||||
nodeJson.w = getWxsEventDict(nodeJson.w, getDict);
|
||||
}
|
||||
if (hasOwn(nodeJson, 's')) {
|
||||
nodeJson.s = getDict(nodeJson.s);
|
||||
}
|
||||
if (hasOwn(nodeJson, 't')) {
|
||||
nodeJson.t = getDict(nodeJson.t);
|
||||
}
|
||||
return nodeJson;
|
||||
}
|
||||
function getWxsEventDict(w, getDict) {
|
||||
const res = {};
|
||||
w.forEach(([name, [wxsEvent, flag]]) => {
|
||||
res[getDict(name)] = [getDict(wxsEvent), flag];
|
||||
});
|
||||
return res;
|
||||
}
|
||||
function decodeCreateAction([, nodeId, nodeName, parentNodeId, refNodeId, nodeJson], getDict) {
|
||||
return [
|
||||
'create',
|
||||
nodeId,
|
||||
getDict(nodeName),
|
||||
parentNodeId,
|
||||
refNodeId,
|
||||
decodeNodeJson(getDict, nodeJson),
|
||||
];
|
||||
}
|
||||
function decodeInsertAction([, ...action], getDict) {
|
||||
return [
|
||||
'insert',
|
||||
action[0],
|
||||
action[1],
|
||||
action[2],
|
||||
action[3] ? decodeNodeJson(getDict, action[3]) : {},
|
||||
];
|
||||
}
|
||||
function decodeRemoveAction([, ...action]) {
|
||||
return ['remove', ...action];
|
||||
}
|
||||
function decodeAddEventAction([, ...action], getDict) {
|
||||
return ['addEvent', action[0], getDict(action[1]), action[2]];
|
||||
}
|
||||
function decodeAddWxsEventAction([, ...action], getDict) {
|
||||
return [
|
||||
'addWxsEvent',
|
||||
action[0],
|
||||
getDict(action[1]),
|
||||
getDict(action[2]),
|
||||
action[3],
|
||||
];
|
||||
}
|
||||
function decodeRemoveEventAction([, ...action], getDict) {
|
||||
return ['removeEvent', action[0], getDict(action[1])];
|
||||
}
|
||||
function decodeSetAttributeAction([, ...action], getDict) {
|
||||
return [
|
||||
'setAttr',
|
||||
action[0],
|
||||
getDict(action[1]),
|
||||
getDict(action[2]),
|
||||
];
|
||||
}
|
||||
function decodeRemoveAttributeAction([, ...action], getDict) {
|
||||
return ['removeAttr', action[0], getDict(action[1])];
|
||||
}
|
||||
function decodeSetTextAction([, ...action], getDict) {
|
||||
return ['setText', action[0], getDict(action[1])];
|
||||
}
|
||||
|
||||
exports.createGetDict = createGetDict;
|
||||
exports.decodeActions = decodeActions;
|
||||
exports.decodeNodeJson = decodeNodeJson;
|
||||
|
||||
}));
|
||||
+7
File diff suppressed because one or more lines are too long
+13
@@ -0,0 +1,13 @@
|
||||
'use strict';
|
||||
|
||||
var appVite = require('@dcloudio/uni-app-vite');
|
||||
var appUVue = require('@dcloudio/uni-app-uts');
|
||||
|
||||
function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
|
||||
|
||||
var appVite__default = /*#__PURE__*/_interopDefault(appVite);
|
||||
var appUVue__default = /*#__PURE__*/_interopDefault(appUVue);
|
||||
|
||||
var index = [process.env.UNI_APP_X === 'true' ? appUVue__default.default : appVite__default.default];
|
||||
|
||||
module.exports = index;
|
||||
+21291
File diff suppressed because it is too large
Load Diff
+311
@@ -0,0 +1,311 @@
|
||||
import { invokeArrayFns, isUniLifecycleHook, decodedQuery, ON_LOAD, ON_SHOW, LINEFEED, RENDERJS_MODULES, formatLog, WXS_PROTOCOL, WXS_MODULES, ON_ERROR, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
|
||||
import { isString, isArray, hasOwn, isFunction } from '@vue/shared';
|
||||
import { injectHook, logError } from 'vue';
|
||||
|
||||
function get$pageByPage(page) {
|
||||
return page.$page;
|
||||
}
|
||||
|
||||
function getCurrentPage() {
|
||||
const pages = getCurrentPages();
|
||||
const len = pages.length;
|
||||
if (len) {
|
||||
return pages[len - 1];
|
||||
}
|
||||
}
|
||||
function getCurrentPageVm() {
|
||||
const page = getCurrentPage();
|
||||
if (page) {
|
||||
return page.$vm;
|
||||
}
|
||||
}
|
||||
|
||||
function invokeHook(vm, name, args) {
|
||||
if (isString(vm)) {
|
||||
args = name;
|
||||
name = vm;
|
||||
vm = getCurrentPageVm();
|
||||
}
|
||||
else if (typeof vm === 'number') {
|
||||
const page = getCurrentPages().find((page) => get$pageByPage(page).id === vm);
|
||||
if (page) {
|
||||
vm = page.$vm;
|
||||
}
|
||||
else {
|
||||
vm = getCurrentPageVm();
|
||||
}
|
||||
}
|
||||
if (!vm) {
|
||||
return;
|
||||
}
|
||||
// 兼容 nvue
|
||||
{
|
||||
if (vm.__call_hook) {
|
||||
return vm.__call_hook(name, args);
|
||||
}
|
||||
}
|
||||
const hooks = vm.$[name];
|
||||
return hooks && invokeArrayFns(hooks, args);
|
||||
}
|
||||
|
||||
function injectLifecycleHook(name, hook, publicThis, instance) {
|
||||
if (isFunction(hook)) {
|
||||
injectHook(name, hook.bind(publicThis), instance);
|
||||
}
|
||||
}
|
||||
function initHooks(options, instance, publicThis) {
|
||||
const mpType = options.mpType || publicThis.$mpType;
|
||||
if (!mpType || mpType === 'component') {
|
||||
// 仅 App,Page 类型支持在 options 中配置 on 生命周期,组件可以使用组合式 API 定义页面生命周期
|
||||
return;
|
||||
}
|
||||
Object.keys(options).forEach((name) => {
|
||||
if (isUniLifecycleHook(name, options[name], false)) {
|
||||
const hooks = options[name];
|
||||
if (isArray(hooks)) {
|
||||
hooks.forEach((hook) => injectLifecycleHook(name, hook, publicThis, instance));
|
||||
}
|
||||
else {
|
||||
injectLifecycleHook(name, hooks, publicThis, instance);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (mpType === 'page') {
|
||||
instance.__isVisible = true;
|
||||
// 直接触发页面 onLoad、onShow 组件内的 onLoad 和 onShow 在注册时,直接触发一次
|
||||
try {
|
||||
let query = instance.attrs.__pageQuery;
|
||||
// onLoad 的 query 进行 decode
|
||||
if (false) ;
|
||||
if ('app' === 'app' && false) ;
|
||||
invokeHook(publicThis, ON_LOAD, query);
|
||||
delete instance.attrs.__pageQuery;
|
||||
// iOS-X 的非 Tab 页面与 uni-app 一致固定触发 onShow
|
||||
const $basePage = false
|
||||
? publicThis.$basePage
|
||||
: publicThis.$page;
|
||||
if (!('app' === 'app' && false && ($basePage === null || $basePage === void 0 ? void 0 : $basePage.meta.isTabBar))) {
|
||||
if (($basePage === null || $basePage === void 0 ? void 0 : $basePage.openType) !== 'preloadPage') {
|
||||
invokeHook(publicThis, ON_SHOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e.message + LINEFEED + e.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initRenderjs(options, instance) {
|
||||
initModules(instance, options.$renderjs, options['$' + RENDERJS_MODULES]);
|
||||
}
|
||||
function initModules(instance, modules, moduleIds = {}) {
|
||||
if (!isArray(modules)) {
|
||||
return;
|
||||
}
|
||||
const ownerId = instance.uid;
|
||||
// 在vue的定制内核中,通过$wxsModules来判断事件函数源码中是否包含该模块调用
|
||||
// !$wxsModules.find(module => invokerSourceCode.indexOf('.' + module + '.') > -1)
|
||||
const $wxsModules = (instance.$wxsModules ||
|
||||
(instance.$wxsModules = []));
|
||||
const ctx = instance.ctx;
|
||||
modules.forEach((module) => {
|
||||
if (moduleIds[module]) {
|
||||
ctx[module] = proxyModule(ownerId, moduleIds[module], module);
|
||||
$wxsModules.push(module);
|
||||
}
|
||||
else {
|
||||
if ((process.env.NODE_ENV !== 'production')) {
|
||||
console.error(formatLog('initModules', modules, moduleIds));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function proxyModule(ownerId, moduleId, module) {
|
||||
const target = {};
|
||||
return new Proxy(target, {
|
||||
get(_, p) {
|
||||
return (target[p] ||
|
||||
(target[p] = createModuleFunction(ownerId, moduleId, module, p)));
|
||||
},
|
||||
});
|
||||
}
|
||||
function createModuleFunction(ownerId, moduleId, module, name) {
|
||||
const target = () => { };
|
||||
const toJSON = () => WXS_PROTOCOL + JSON.stringify([ownerId, moduleId, module + '.' + name]);
|
||||
return new Proxy(target, {
|
||||
get(_, p) {
|
||||
if (p === 'toJSON') {
|
||||
return toJSON;
|
||||
}
|
||||
return (target[p] ||
|
||||
(target[p] = createModuleFunction(ownerId, moduleId, module + '.' + name, p)));
|
||||
},
|
||||
apply(_target, _thisArg, args) {
|
||||
return (WXS_PROTOCOL +
|
||||
JSON.stringify([ownerId, moduleId, module + '.' + name, [...args]]));
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function initWxs(options, instance) {
|
||||
initModules(instance, options.$wxs, options['$' + WXS_MODULES]);
|
||||
}
|
||||
|
||||
function applyOptions(options, instance, publicThis) {
|
||||
{
|
||||
initWxs(options, instance);
|
||||
initRenderjs(options, instance);
|
||||
}
|
||||
initHooks(options, instance, publicThis);
|
||||
}
|
||||
|
||||
function set(target, key, val) {
|
||||
return (target[key] = val);
|
||||
}
|
||||
function $callMethod(method, ...args) {
|
||||
const fn = this[method];
|
||||
if (fn) {
|
||||
return fn(...args);
|
||||
}
|
||||
console.error(`method ${method} not found`);
|
||||
return null;
|
||||
}
|
||||
|
||||
function createErrorHandler(app) {
|
||||
const userErrorHandler = app.config.errorHandler;
|
||||
return function errorHandler(err, instance, info) {
|
||||
if (userErrorHandler) {
|
||||
userErrorHandler(err, instance, info);
|
||||
}
|
||||
const appInstance = app._instance;
|
||||
if (!appInstance || !appInstance.proxy) {
|
||||
throw err;
|
||||
}
|
||||
if (appInstance[ON_ERROR]) {
|
||||
{
|
||||
invokeHook(appInstance.proxy, ON_ERROR, err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
logError(err, info, instance ? instance.$.vnode : null, false);
|
||||
}
|
||||
};
|
||||
}
|
||||
function mergeAsArray(to, from) {
|
||||
return to ? [...new Set([].concat(to, from))] : from;
|
||||
}
|
||||
function initOptionMergeStrategies(optionMergeStrategies) {
|
||||
UniLifecycleHooks.forEach((name) => {
|
||||
optionMergeStrategies[name] = mergeAsArray;
|
||||
});
|
||||
}
|
||||
|
||||
let realAtob;
|
||||
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
|
||||
if (typeof atob !== 'function') {
|
||||
realAtob = function (str) {
|
||||
str = String(str).replace(/[\t\n\f\r ]+/g, '');
|
||||
if (!b64re.test(str)) {
|
||||
throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
||||
}
|
||||
// Adding the padding if missing, for semplicity
|
||||
str += '=='.slice(2 - (str.length & 3));
|
||||
var bitmap;
|
||||
var result = '';
|
||||
var r1;
|
||||
var r2;
|
||||
var i = 0;
|
||||
for (; i < str.length;) {
|
||||
bitmap =
|
||||
(b64.indexOf(str.charAt(i++)) << 18) |
|
||||
(b64.indexOf(str.charAt(i++)) << 12) |
|
||||
((r1 = b64.indexOf(str.charAt(i++))) << 6) |
|
||||
(r2 = b64.indexOf(str.charAt(i++)));
|
||||
result +=
|
||||
r1 === 64
|
||||
? String.fromCharCode((bitmap >> 16) & 255)
|
||||
: r2 === 64
|
||||
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
||||
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
else {
|
||||
// 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
|
||||
realAtob = atob;
|
||||
}
|
||||
function b64DecodeUnicode(str) {
|
||||
return decodeURIComponent(realAtob(str)
|
||||
.split('')
|
||||
.map(function (c) {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
})
|
||||
.join(''));
|
||||
}
|
||||
function getCurrentUserInfo() {
|
||||
const token = uni.getStorageSync('uni_id_token') || '';
|
||||
const tokenArr = token.split('.');
|
||||
if (!token || tokenArr.length !== 3) {
|
||||
return {
|
||||
uid: null,
|
||||
role: [],
|
||||
permission: [],
|
||||
tokenExpired: 0,
|
||||
};
|
||||
}
|
||||
let userInfo;
|
||||
try {
|
||||
userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
|
||||
}
|
||||
userInfo.tokenExpired = userInfo.exp * 1000;
|
||||
delete userInfo.exp;
|
||||
delete userInfo.iat;
|
||||
return userInfo;
|
||||
}
|
||||
function uniIdMixin(globalProperties) {
|
||||
globalProperties.uniIDHasRole = function (roleId) {
|
||||
const { role } = getCurrentUserInfo();
|
||||
return role.indexOf(roleId) > -1;
|
||||
};
|
||||
globalProperties.uniIDHasPermission = function (permissionId) {
|
||||
const { permission } = getCurrentUserInfo();
|
||||
return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
|
||||
};
|
||||
globalProperties.uniIDTokenValid = function () {
|
||||
const { tokenExpired } = getCurrentUserInfo();
|
||||
return tokenExpired > Date.now();
|
||||
};
|
||||
}
|
||||
|
||||
function initApp(app) {
|
||||
const appConfig = app.config;
|
||||
// 该逻辑全平台会调用
|
||||
// - 需要兼容支持开发者自定义的 errorHandler
|
||||
// - nvue、vue 需要使用同一个(once) errorHandler
|
||||
// - 需要支持 uni.onError 注册监听
|
||||
// * 目前仅部分小程序平台支持,调用uni.onError时,如果app已存在,则添加到instance的hooks中,如果不存在,则临时存储,初始化instance时添加到hooks中
|
||||
// * 目前在 errorHandler 中,会调用 app.$callHook(ON_ERROR, err),所以上一步需要将 uni.onError 存储到 app 的 hooks 中
|
||||
// - 部分平台(目前主要是小程序)开发阶段 uni-console 会调用 uni.onError 注册监听
|
||||
appConfig.errorHandler = invokeCreateErrorHandler(app, createErrorHandler);
|
||||
initOptionMergeStrategies(appConfig.optionMergeStrategies);
|
||||
const globalProperties = appConfig.globalProperties;
|
||||
{
|
||||
uniIdMixin(globalProperties);
|
||||
}
|
||||
{
|
||||
globalProperties.$set = set;
|
||||
globalProperties.$applyOptions = applyOptions;
|
||||
globalProperties.$callMethod = $callMethod;
|
||||
}
|
||||
{
|
||||
invokeCreateVueAppHook(app);
|
||||
}
|
||||
}
|
||||
|
||||
export { initApp };
|
||||
+9369
File diff suppressed because it is too large
Load Diff
Generated
Vendored
+9936
File diff suppressed because it is too large
Load Diff
+325
@@ -0,0 +1,325 @@
|
||||
import { invokeArrayFns, isUniLifecycleHook, decodedQuery, ON_LOAD, ON_SHOW, LINEFEED, RENDERJS_MODULES, formatLog, WXS_PROTOCOL, WXS_MODULES, ON_ERROR, UniLifecycleHooks, invokeCreateErrorHandler, invokeCreateVueAppHook } from '@dcloudio/uni-shared';
|
||||
import { isString, isArray, hasOwn, isFunction } from '@vue/shared';
|
||||
import { injectHook, logError } from 'vue';
|
||||
|
||||
function get$pageByPage(page) {
|
||||
return page.vm.$basePage
|
||||
;
|
||||
}
|
||||
|
||||
function getCurrentPage() {
|
||||
const pages = getCurrentPages();
|
||||
const len = pages.length;
|
||||
if (len) {
|
||||
return pages[len - 1];
|
||||
}
|
||||
}
|
||||
function getCurrentPageVm() {
|
||||
var _a;
|
||||
const page = (_a = getCurrentPage()) === null || _a === void 0 ? void 0 : _a.vm
|
||||
;
|
||||
if (page) {
|
||||
return page.$vm;
|
||||
}
|
||||
}
|
||||
|
||||
function invokeHook(vm, name, args) {
|
||||
if (isString(vm)) {
|
||||
args = name;
|
||||
name = vm;
|
||||
vm = getCurrentPageVm();
|
||||
}
|
||||
else if (typeof vm === 'number') {
|
||||
const page = getCurrentPages().find((page) => get$pageByPage(page).id === vm);
|
||||
if (page) {
|
||||
vm = page.$vm;
|
||||
}
|
||||
else {
|
||||
vm = getCurrentPageVm();
|
||||
}
|
||||
}
|
||||
if (!vm) {
|
||||
return;
|
||||
}
|
||||
// 兼容 nvue
|
||||
{
|
||||
if (vm.__call_hook) {
|
||||
return vm.__call_hook(name, args);
|
||||
}
|
||||
}
|
||||
const hooks = vm.$[name];
|
||||
return hooks && invokeArrayFns(hooks, args);
|
||||
}
|
||||
|
||||
function injectLifecycleHook(name, hook, publicThis, instance) {
|
||||
if (isFunction(hook)) {
|
||||
injectHook(name, hook.bind(publicThis), instance);
|
||||
}
|
||||
}
|
||||
function initHooks(options, instance, publicThis) {
|
||||
const mpType = options.mpType || publicThis.$mpType;
|
||||
if (!mpType || mpType === 'component') {
|
||||
// 仅 App,Page 类型支持在 options 中配置 on 生命周期,组件可以使用组合式 API 定义页面生命周期
|
||||
return;
|
||||
}
|
||||
Object.keys(options).forEach((name) => {
|
||||
if (isUniLifecycleHook(name, options[name], false)) {
|
||||
const hooks = options[name];
|
||||
if (isArray(hooks)) {
|
||||
hooks.forEach((hook) => injectLifecycleHook(name, hook, publicThis, instance));
|
||||
}
|
||||
else {
|
||||
injectLifecycleHook(name, hooks, publicThis, instance);
|
||||
}
|
||||
}
|
||||
});
|
||||
if (mpType === 'page') {
|
||||
instance.__isVisible = true;
|
||||
// 直接触发页面 onLoad、onShow 组件内的 onLoad 和 onShow 在注册时,直接触发一次
|
||||
try {
|
||||
let query = instance.attrs.__pageQuery;
|
||||
// onLoad 的 query 进行 decode
|
||||
if (true) {
|
||||
query = new UTSJSONObject(decodedQuery(query));
|
||||
}
|
||||
if ('app' === 'app' && true) {
|
||||
// TODO 统一处理 Web
|
||||
// @ts-expect-error
|
||||
const { setupState } = instance;
|
||||
// 组合式 API 时,如果开发者定义了 options 变量,再次赋值会导致 warn & error issues:15107
|
||||
// 现有规范开发者不需要再从 pageVm 上获取 options, 但为了控制修改影响范围,只在上述情况下不再赋值
|
||||
if (!(setupState.__isScriptSetup && hasOwn(setupState, 'options'))) {
|
||||
publicThis.options = query || {};
|
||||
}
|
||||
}
|
||||
invokeHook(publicThis, ON_LOAD, query);
|
||||
delete instance.attrs.__pageQuery;
|
||||
// iOS-X 的非 Tab 页面与 uni-app 一致固定触发 onShow
|
||||
const $basePage = true
|
||||
? publicThis.$basePage
|
||||
: publicThis.$page;
|
||||
if (!('app' === 'app' && true && ($basePage === null || $basePage === void 0 ? void 0 : $basePage.meta.isTabBar))) {
|
||||
if (($basePage === null || $basePage === void 0 ? void 0 : $basePage.openType) !== 'preloadPage') {
|
||||
invokeHook(publicThis, ON_SHOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (e) {
|
||||
console.error(e.message + LINEFEED + e.stack);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function initRenderjs(options, instance) {
|
||||
initModules(instance, options.$renderjs, options['$' + RENDERJS_MODULES]);
|
||||
}
|
||||
function initModules(instance, modules, moduleIds = {}) {
|
||||
if (!isArray(modules)) {
|
||||
return;
|
||||
}
|
||||
const ownerId = instance.uid;
|
||||
// 在vue的定制内核中,通过$wxsModules来判断事件函数源码中是否包含该模块调用
|
||||
// !$wxsModules.find(module => invokerSourceCode.indexOf('.' + module + '.') > -1)
|
||||
const $wxsModules = (instance.$wxsModules ||
|
||||
(instance.$wxsModules = []));
|
||||
const ctx = instance.ctx;
|
||||
modules.forEach((module) => {
|
||||
if (moduleIds[module]) {
|
||||
ctx[module] = proxyModule(ownerId, moduleIds[module], module);
|
||||
$wxsModules.push(module);
|
||||
}
|
||||
else {
|
||||
if ((process.env.NODE_ENV !== 'production')) {
|
||||
console.error(formatLog('initModules', modules, moduleIds));
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function proxyModule(ownerId, moduleId, module) {
|
||||
const target = {};
|
||||
return new Proxy(target, {
|
||||
get(_, p) {
|
||||
return (target[p] ||
|
||||
(target[p] = createModuleFunction(ownerId, moduleId, module, p)));
|
||||
},
|
||||
});
|
||||
}
|
||||
function createModuleFunction(ownerId, moduleId, module, name) {
|
||||
const target = () => { };
|
||||
const toJSON = () => WXS_PROTOCOL + JSON.stringify([ownerId, moduleId, module + '.' + name]);
|
||||
return new Proxy(target, {
|
||||
get(_, p) {
|
||||
if (p === 'toJSON') {
|
||||
return toJSON;
|
||||
}
|
||||
return (target[p] ||
|
||||
(target[p] = createModuleFunction(ownerId, moduleId, module + '.' + name, p)));
|
||||
},
|
||||
apply(_target, _thisArg, args) {
|
||||
return (WXS_PROTOCOL +
|
||||
JSON.stringify([ownerId, moduleId, module + '.' + name, [...args]]));
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function initWxs(options, instance) {
|
||||
initModules(instance, options.$wxs, options['$' + WXS_MODULES]);
|
||||
}
|
||||
|
||||
function applyOptions(options, instance, publicThis) {
|
||||
{
|
||||
initWxs(options, instance);
|
||||
initRenderjs(options, instance);
|
||||
}
|
||||
initHooks(options, instance, publicThis);
|
||||
}
|
||||
|
||||
function set(target, key, val) {
|
||||
return (target[key] = val);
|
||||
}
|
||||
function $callMethod(method, ...args) {
|
||||
const fn = this[method];
|
||||
if (fn) {
|
||||
return fn(...args);
|
||||
}
|
||||
console.error(`method ${method} not found`);
|
||||
return null;
|
||||
}
|
||||
|
||||
function createErrorHandler(app) {
|
||||
const userErrorHandler = app.config.errorHandler;
|
||||
return function errorHandler(err, instance, info) {
|
||||
if (userErrorHandler) {
|
||||
userErrorHandler(err, instance, info);
|
||||
}
|
||||
const appInstance = app._instance;
|
||||
if (!appInstance || !appInstance.proxy) {
|
||||
throw err;
|
||||
}
|
||||
if (appInstance[ON_ERROR]) {
|
||||
{
|
||||
invokeHook(appInstance.proxy, ON_ERROR, err);
|
||||
}
|
||||
}
|
||||
else {
|
||||
logError(err, info, instance ? instance.$.vnode : null, false);
|
||||
}
|
||||
};
|
||||
}
|
||||
function mergeAsArray(to, from) {
|
||||
return to ? [...new Set([].concat(to, from))] : from;
|
||||
}
|
||||
function initOptionMergeStrategies(optionMergeStrategies) {
|
||||
UniLifecycleHooks.forEach((name) => {
|
||||
optionMergeStrategies[name] = mergeAsArray;
|
||||
});
|
||||
}
|
||||
|
||||
let realAtob;
|
||||
const b64 = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
|
||||
const b64re = /^(?:[A-Za-z\d+/]{4})*?(?:[A-Za-z\d+/]{2}(?:==)?|[A-Za-z\d+/]{3}=?)?$/;
|
||||
if (typeof atob !== 'function') {
|
||||
realAtob = function (str) {
|
||||
str = String(str).replace(/[\t\n\f\r ]+/g, '');
|
||||
if (!b64re.test(str)) {
|
||||
throw new Error("Failed to execute 'atob' on 'Window': The string to be decoded is not correctly encoded.");
|
||||
}
|
||||
// Adding the padding if missing, for semplicity
|
||||
str += '=='.slice(2 - (str.length & 3));
|
||||
var bitmap;
|
||||
var result = '';
|
||||
var r1;
|
||||
var r2;
|
||||
var i = 0;
|
||||
for (; i < str.length;) {
|
||||
bitmap =
|
||||
(b64.indexOf(str.charAt(i++)) << 18) |
|
||||
(b64.indexOf(str.charAt(i++)) << 12) |
|
||||
((r1 = b64.indexOf(str.charAt(i++))) << 6) |
|
||||
(r2 = b64.indexOf(str.charAt(i++)));
|
||||
result +=
|
||||
r1 === 64
|
||||
? String.fromCharCode((bitmap >> 16) & 255)
|
||||
: r2 === 64
|
||||
? String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255)
|
||||
: String.fromCharCode((bitmap >> 16) & 255, (bitmap >> 8) & 255, bitmap & 255);
|
||||
}
|
||||
return result;
|
||||
};
|
||||
}
|
||||
else {
|
||||
// 注意atob只能在全局对象上调用,例如:`const Base64 = {atob};Base64.atob('xxxx')`是错误的用法
|
||||
realAtob = atob;
|
||||
}
|
||||
function b64DecodeUnicode(str) {
|
||||
return decodeURIComponent(realAtob(str)
|
||||
.split('')
|
||||
.map(function (c) {
|
||||
return '%' + ('00' + c.charCodeAt(0).toString(16)).slice(-2);
|
||||
})
|
||||
.join(''));
|
||||
}
|
||||
function getCurrentUserInfo() {
|
||||
const token = uni.getStorageSync('uni_id_token') || '';
|
||||
const tokenArr = token.split('.');
|
||||
if (!token || tokenArr.length !== 3) {
|
||||
return {
|
||||
uid: null,
|
||||
role: [],
|
||||
permission: [],
|
||||
tokenExpired: 0,
|
||||
};
|
||||
}
|
||||
let userInfo;
|
||||
try {
|
||||
userInfo = JSON.parse(b64DecodeUnicode(tokenArr[1]));
|
||||
}
|
||||
catch (error) {
|
||||
throw new Error('获取当前用户信息出错,详细错误信息为:' + error.message);
|
||||
}
|
||||
userInfo.tokenExpired = userInfo.exp * 1000;
|
||||
delete userInfo.exp;
|
||||
delete userInfo.iat;
|
||||
return userInfo;
|
||||
}
|
||||
function uniIdMixin(globalProperties) {
|
||||
globalProperties.uniIDHasRole = function (roleId) {
|
||||
const { role } = getCurrentUserInfo();
|
||||
return role.indexOf(roleId) > -1;
|
||||
};
|
||||
globalProperties.uniIDHasPermission = function (permissionId) {
|
||||
const { permission } = getCurrentUserInfo();
|
||||
return this.uniIDHasRole('admin') || permission.indexOf(permissionId) > -1;
|
||||
};
|
||||
globalProperties.uniIDTokenValid = function () {
|
||||
const { tokenExpired } = getCurrentUserInfo();
|
||||
return tokenExpired > Date.now();
|
||||
};
|
||||
}
|
||||
|
||||
function initApp(app) {
|
||||
const appConfig = app.config;
|
||||
// 该逻辑全平台会调用
|
||||
// - 需要兼容支持开发者自定义的 errorHandler
|
||||
// - nvue、vue 需要使用同一个(once) errorHandler
|
||||
// - 需要支持 uni.onError 注册监听
|
||||
// * 目前仅部分小程序平台支持,调用uni.onError时,如果app已存在,则添加到instance的hooks中,如果不存在,则临时存储,初始化instance时添加到hooks中
|
||||
// * 目前在 errorHandler 中,会调用 app.$callHook(ON_ERROR, err),所以上一步需要将 uni.onError 存储到 app 的 hooks 中
|
||||
// - 部分平台(目前主要是小程序)开发阶段 uni-console 会调用 uni.onError 注册监听
|
||||
appConfig.errorHandler = invokeCreateErrorHandler(app, createErrorHandler);
|
||||
initOptionMergeStrategies(appConfig.optionMergeStrategies);
|
||||
const globalProperties = appConfig.globalProperties;
|
||||
{
|
||||
uniIdMixin(globalProperties);
|
||||
}
|
||||
{
|
||||
globalProperties.$set = set;
|
||||
globalProperties.$applyOptions = applyOptions;
|
||||
globalProperties.$callMethod = $callMethod;
|
||||
}
|
||||
{
|
||||
invokeCreateVueAppHook(app);
|
||||
}
|
||||
}
|
||||
|
||||
export { initApp };
|
||||
+15
File diff suppressed because one or more lines are too long
+1
File diff suppressed because one or more lines are too long
+1
@@ -0,0 +1 @@
|
||||
[https://dcloud.io/license/uni-app.html](https://dcloud.io/license/uni-app.html)
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
{
|
||||
"name": "@dcloudio/uni-app-plus",
|
||||
"version": "3.0.0-4060620250520001",
|
||||
"description": "@dcloudio/uni-app-plus",
|
||||
"files": [
|
||||
"dist",
|
||||
"lib",
|
||||
"style"
|
||||
],
|
||||
"sideEffects": [
|
||||
"lib/automator.js"
|
||||
],
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/dcloudio/uni-app.git",
|
||||
"directory": "packages/uni-app-plus"
|
||||
},
|
||||
"license": "Apache-2.0",
|
||||
"bugs": {
|
||||
"url": "https://github.com/dcloudio/uni-app/issues"
|
||||
},
|
||||
"gitHead": "33e807d66e1fe47e2ee08ad9c59247e37b8884da",
|
||||
"uni-app": {
|
||||
"name": "uni-app-plus",
|
||||
"apply": [
|
||||
"app"
|
||||
],
|
||||
"uvue": true,
|
||||
"main": "dist/uni.compiler.js"
|
||||
},
|
||||
"dependencies": {
|
||||
"debug": "^4.3.3",
|
||||
"fs-extra": "^10.0.0",
|
||||
"licia": "^1.29.0",
|
||||
"postcss-selector-parser": "^6.0.6",
|
||||
"@dcloudio/uni-app-uts": "3.0.0-4060620250520001",
|
||||
"@dcloudio/uni-app-vite": "3.0.0-4060620250520001",
|
||||
"@dcloudio/uni-app-vue": "3.0.0-4060620250520001"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/pako": "1.0.2",
|
||||
"@types/google.maps": "^3.45.6",
|
||||
"@amap/amap-jsapi-types": "^0.0.8",
|
||||
"@vue/compiler-sfc": "3.4.21",
|
||||
"autoprefixer": "^10.4.19",
|
||||
"pako": "^1.0.11",
|
||||
"postcss": "^8.4.21",
|
||||
"vue": "3.4.21",
|
||||
"@dcloudio/uni-cli-shared": "3.0.0-4060620250520001",
|
||||
"@dcloudio/uni-components": "3.0.0-4060620250520001",
|
||||
"@dcloudio/uni-h5": "3.0.0-4060620250520001",
|
||||
"@dcloudio/uni-i18n": "3.0.0-4060620250520001",
|
||||
"@dcloudio/uni-shared": "3.0.0-4060620250520001"
|
||||
}
|
||||
}
|
||||
+220
@@ -0,0 +1,220 @@
|
||||
.uni-system-choose-location {
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f8f8f8;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .map {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 300px;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .map-location {
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
bottom: 50%;
|
||||
width: 32px;
|
||||
height: 52px;
|
||||
margin-left: -16px;
|
||||
cursor: pointer;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .map-move {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
right: 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
line-height: 40px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
box-shadow: 0px 0 5px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.uni-system-choose-location .map-move>svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .nav {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: calc(44px + var(--status-bar-height));
|
||||
background-color: transparent;
|
||||
background-image: linear-gradient( to bottom, rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0));
|
||||
}
|
||||
|
||||
.uni-system-choose-location .nav-btn {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: var(--status-bar-height);
|
||||
left: 0;
|
||||
width: 60px;
|
||||
height: 44px;
|
||||
padding: 6px;
|
||||
line-height: 32px;
|
||||
font-size: 26px;
|
||||
color: white;
|
||||
text-align: center;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .nav-btn.confirm {
|
||||
left: auto;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .nav-btn.disable {
|
||||
opacity: 0.4;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .nav-btn>svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
/* line-height: inherit; */
|
||||
border-radius: 2px;
|
||||
box-sizing: border-box;
|
||||
padding: 3px;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .nav-btn.confirm>svg {
|
||||
background-color: #007aff;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .menu {
|
||||
position: absolute;
|
||||
top: 300px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .search {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 50px;
|
||||
padding: 8px;
|
||||
line-height: 34px;
|
||||
box-sizing: border-box;
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .search-input {
|
||||
flex: 1;
|
||||
height: 100%;
|
||||
border-radius: 5px;
|
||||
padding: 0 5px;
|
||||
background: #ebebeb;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .search-btn {
|
||||
margin-left: 5px;
|
||||
color: #007aff;
|
||||
font-size: 17px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list {
|
||||
position: absolute;
|
||||
top: 50px;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
padding-bottom: 10px;
|
||||
/* background-color: #f6f6f6; */
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-loading {
|
||||
display: flex;
|
||||
height: 50px;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-item {
|
||||
position: relative;
|
||||
padding: 10px;
|
||||
padding-right: 40px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-item>svg {
|
||||
display: none;
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 10px;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
margin-top: -15px;
|
||||
box-sizing: border-box;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-item.selected>svg {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-item:not(:last-child)::after {
|
||||
position: absolute;
|
||||
content: "";
|
||||
height: 1px;
|
||||
left: 10px;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
background-color: #d3d3d3;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-item-title {
|
||||
font-size: 14px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.uni-system-choose-location .list-item-detail {
|
||||
font-size: 12px;
|
||||
color: #808080;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
@media screen and (min-width: 800px) {
|
||||
.uni-system-choose-location .map {
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.uni-system-choose-location .map-move {
|
||||
bottom: 10px;
|
||||
right: 320px;
|
||||
}
|
||||
.uni-system-choose-location .menu {
|
||||
top: calc(54px + var(--status-bar-height));
|
||||
left: auto;
|
||||
right: 10px;
|
||||
width: 300px;
|
||||
bottom: 10px;
|
||||
max-height: 600px;
|
||||
box-shadow: 0px 0 20px 5px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
}
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
.uni-system-open-location {
|
||||
display: block;
|
||||
position: fixed;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
background: #f8f8f8;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
.uni-system-open-location .map {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
bottom: 80px;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
.uni-system-open-location .info {
|
||||
position: absolute;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 80px;
|
||||
background-color: white;
|
||||
padding: 15px;
|
||||
box-sizing: border-box;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.uni-system-open-location .info>.name {
|
||||
font-size: 17px;
|
||||
color: #111111;
|
||||
}
|
||||
|
||||
.uni-system-open-location .info>.address {
|
||||
font-size: 14px;
|
||||
color: #666666;
|
||||
}
|
||||
|
||||
.uni-system-open-location .info>.nav {
|
||||
position: absolute;
|
||||
top: 50%;
|
||||
right: 15px;
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border-radius: 50%;
|
||||
margin-top: -25px;
|
||||
background-color: #007aff;
|
||||
}
|
||||
|
||||
.uni-system-open-location .info>.nav>svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
padding: 10px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-system-open-location .map-move {
|
||||
position: absolute;
|
||||
bottom: 50px;
|
||||
right: 10px;
|
||||
width: 40px;
|
||||
height: 40px;
|
||||
box-sizing: border-box;
|
||||
line-height: 40px;
|
||||
background-color: white;
|
||||
border-radius: 50%;
|
||||
pointer-events: auto;
|
||||
cursor: pointer;
|
||||
box-shadow: 0px 0 5px 1px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
.uni-system-open-location .map-move>svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
box-sizing: border-box;
|
||||
padding: 8px;
|
||||
}
|
||||
|
||||
.uni-system-open-location .nav-btn-back {
|
||||
position: absolute;
|
||||
box-sizing: border-box;
|
||||
top: var(--status-bar-height);
|
||||
left: 0;
|
||||
width: 44px;
|
||||
height: 44px;
|
||||
padding: 6px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.uni-system-open-location .nav-btn-back>svg {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 50%;
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
padding: 3px;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.uni-system-open-location .map-content {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0px;
|
||||
width: 100%;
|
||||
bottom: 0;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.uni-system-open-location .map-content.fix-position {
|
||||
top: -74px;
|
||||
bottom: -44px;
|
||||
}
|
||||
|
||||
.uni-system-open-location .map-content>iframe {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: none;
|
||||
}
|
||||
|
||||
.uni-system-open-location .actTonav {
|
||||
position: absolute;
|
||||
right: 16px;
|
||||
bottom: 56px;
|
||||
width: 60px;
|
||||
height: 60px;
|
||||
border-radius: 60px;
|
||||
}
|
||||
|
||||
.uni-system-open-location .nav-view {
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.uni-system-open-location .nav-view-top-placeholder {
|
||||
width: 100%;
|
||||
height: var(--status-bar-height);
|
||||
background-color: white;
|
||||
}
|
||||
|
||||
.uni-system-open-location .nav-view-frame {
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
uni-cover-image {
|
||||
display: block;
|
||||
line-height: 1.2;
|
||||
overflow: hidden;
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
uni-cover-image[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
uni-cover-image .uni-cover-image {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
}
|
||||
+29
@@ -0,0 +1,29 @@
|
||||
uni-cover-view {
|
||||
display: block;
|
||||
line-height: 1.2;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
pointer-events: auto;
|
||||
}
|
||||
|
||||
uni-cover-view[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
uni-cover-view .uni-cover-view {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
visibility: hidden;
|
||||
text-overflow: inherit;
|
||||
white-space: inherit;
|
||||
-webkit-align-items: inherit;
|
||||
align-items: inherit;
|
||||
-webkit-justify-content: inherit;
|
||||
justify-content: inherit;
|
||||
-webkit-flex-direction: inherit;
|
||||
flex-direction: inherit;
|
||||
-webkit-flex-wrap: inherit;
|
||||
flex-wrap: inherit;
|
||||
display: inherit;
|
||||
overflow: inherit;
|
||||
}
|
||||
+85
@@ -0,0 +1,85 @@
|
||||
* {
|
||||
margin: 0;
|
||||
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
|
||||
-webkit-tap-highlight-color: transparent;
|
||||
}
|
||||
|
||||
html,
|
||||
body {
|
||||
-webkit-user-select: none;
|
||||
user-select: none;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
html {
|
||||
height: 100%;
|
||||
height: 100vh;
|
||||
width: 100%;
|
||||
width: 100vw;
|
||||
}
|
||||
|
||||
body {
|
||||
overflow-x: hidden;
|
||||
background-color: white;
|
||||
height:100%;
|
||||
}
|
||||
|
||||
#app{
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
input[type='search']::-webkit-search-cancel-button {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.uni-loading,
|
||||
uni-button[loading]:before {
|
||||
background: transparent
|
||||
url('data:image/svg+xml;base64, PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxMjAiIGhlaWdodD0iMTIwIiB2aWV3Qm94PSIwIDAgMTAwIDEwMCI+PHBhdGggZmlsbD0ibm9uZSIgZD0iTTAgMGgxMDB2MTAwSDB6Ii8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTlFOUU5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDAgLTMwKSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iIzk4OTY5NyIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgzMCAxMDUuOTggNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjOUI5OTlBIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDYwIDc1Ljk4IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0EzQTFBMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSg5MCA2NSA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNBQkE5QUEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoMTIwIDU4LjY2IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0IyQjJCMiIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgxNTAgNTQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjQkFCOEI5IiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKDE4MCA1MCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDMkMwQzEiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTE1MCA0NS45OCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNDQkNCQ0IiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTEyMCA0MS4zNCA2NSkiLz48cmVjdCB3aWR0aD0iNyIgaGVpZ2h0PSIyMCIgeD0iNDYuNSIgeT0iNDAiIGZpbGw9IiNEMkQyRDIiIHJ4PSI1IiByeT0iNSIgdHJhbnNmb3JtPSJyb3RhdGUoLTkwIDM1IDY1KSIvPjxyZWN0IHdpZHRoPSI3IiBoZWlnaHQ9IjIwIiB4PSI0Ni41IiB5PSI0MCIgZmlsbD0iI0RBREFEQSIgcng9IjUiIHJ5PSI1IiB0cmFuc2Zvcm09InJvdGF0ZSgtNjAgMjQuMDIgNjUpIi8+PHJlY3Qgd2lkdGg9IjciIGhlaWdodD0iMjAiIHg9IjQ2LjUiIHk9IjQwIiBmaWxsPSIjRTJFMkUyIiByeD0iNSIgcnk9IjUiIHRyYW5zZm9ybT0icm90YXRlKC0zMCAtNS45OCA2NSkiLz48L3N2Zz4=')
|
||||
no-repeat;
|
||||
}
|
||||
|
||||
.uni-loading {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
animation: uni-loading 1s steps(12, end) infinite;
|
||||
background-size: 100%;
|
||||
}
|
||||
|
||||
@keyframes uni-loading {
|
||||
0% {
|
||||
transform: rotate3d(0, 0, 1, 0deg);
|
||||
}
|
||||
|
||||
100% {
|
||||
transform: rotate3d(0, 0, 1, 360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (prefers-color-scheme: dark) {
|
||||
html {
|
||||
--UI-BG-COLOR-ACTIVE: #373737;
|
||||
--UI-BORDER-COLOR-1: #373737;
|
||||
/* UI */
|
||||
--UI-BG: #000;
|
||||
--UI-BG-0: #191919;
|
||||
--UI-BG-1: #1f1f1f;
|
||||
--UI-BG-2: #232323;
|
||||
--UI-BG-3: #2f2f2f;
|
||||
--UI-BG-4: #606060;
|
||||
--UI-BG-5: #2c2c2c;
|
||||
--UI-FG: #fff;
|
||||
--UI-FG-0: hsla(0, 0%, 100%, 0.8);
|
||||
--UI-FG-HALF: hsla(0, 0%, 100%, 0.6);
|
||||
--UI-FG-1: hsla(0, 0%, 100%, 0.5);
|
||||
--UI-FG-2: hsla(0, 0%, 100%, 0.3);
|
||||
--UI-FG-3: hsla(0, 0%, 100%, 0.05);
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: var(--UI-BG-0);
|
||||
color: var(--UI-FG-0);
|
||||
}
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
uni-live-pusher {
|
||||
width: 320px;
|
||||
height: 240px;
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
uni-live-pusher[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.uni-live-pusher-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.uni-live-pusher-slot {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
uni-map {
|
||||
width: 300px;
|
||||
height: 225px;
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
uni-map[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.uni-map-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
.uni-map-slot {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
/* web */
|
||||
uni-map.web {
|
||||
position: relative;
|
||||
width: 300px;
|
||||
height: 150px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
uni-map.web[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
/* 处理高德地图 marker label 默认样式 */
|
||||
uni-map.web .amap-marker-label {
|
||||
padding: 0;
|
||||
border: none;
|
||||
background-color: transparent;
|
||||
}
|
||||
|
||||
/* 处理高德地图 open-location icon 被遮挡问题 */
|
||||
uni-map.web .amap-marker>.amap-icon>img {
|
||||
left: 0 !important;
|
||||
top: 0 !important;
|
||||
}
|
||||
|
||||
uni-map.web .uni-map-control {
|
||||
position: absolute;
|
||||
width: 0;
|
||||
height: 0;
|
||||
top: 0;
|
||||
left: 0;
|
||||
z-index: 999;
|
||||
}
|
||||
|
||||
uni-map.web .uni-map-control-icon {
|
||||
position: absolute;
|
||||
max-width: initial;
|
||||
}
|
||||
+31
@@ -0,0 +1,31 @@
|
||||
uni-video {
|
||||
width: 300px;
|
||||
height: 225px;
|
||||
display: inline-block;
|
||||
line-height: 0;
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
uni-video[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.uni-video-container {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
overflow: hidden;
|
||||
background-color: black;
|
||||
}
|
||||
|
||||
.uni-video-slot {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
overflow: hidden;
|
||||
pointer-events: none;
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
uni-web-view {
|
||||
display: inline-block;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
top: 0;
|
||||
bottom: 0;
|
||||
}
|
||||
Reference in New Issue
Block a user