From da1dab3278f0965c344ebe39c117182722885afe Mon Sep 17 00:00:00 2001 From: fxy060608 Date: Fri, 29 Oct 2021 15:00:31 +0800 Subject: [PATCH] wip(mp): mp-alipay --- packages/uni-mp-alipay/dist/uni.compiler.js | 1168 +---------------- packages/uni-mp-alipay/dist/uni.mp.esm.js | 188 +-- packages/uni-mp-alipay/package.json | 4 +- .../src/runtime/createComponent.ts | 99 +- .../uni-mp-alipay/src/runtime/createPage.ts | 86 +- packages/uni-mp-alipay/src/runtime/index.ts | 9 +- packages/uni-mp-alipay/src/runtime/util.ts | 7 +- packages/uni-mp-vite/src/plugin/index.ts | 2 + packages/uni-mp-vue/dist/vue.runtime.esm.js | 16 +- packages/uni-mp-vue/src/plugin.ts | 15 +- 10 files changed, 300 insertions(+), 1294 deletions(-) diff --git a/packages/uni-mp-alipay/dist/uni.compiler.js b/packages/uni-mp-alipay/dist/uni.compiler.js index 5cc3b27e3..dac0cba6d 100644 --- a/packages/uni-mp-alipay/dist/uni.compiler.js +++ b/packages/uni-mp-alipay/dist/uni.compiler.js @@ -3,6 +3,8 @@ var initMiniProgramPlugin = require('@dcloudio/uni-mp-vite'); var path = require('path'); var uniCliShared = require('@dcloudio/uni-cli-shared'); +var compilerCore = require('@vue/compiler-core'); +var shared = require('@vue/shared'); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } @@ -16,1099 +18,6 @@ var source = { enableAppxNg: enableAppxNg }; -/** - * Make a map and return a function for checking if a key - * is in that map. - * IMPORTANT: all calls of this function must be prefixed with - * \/\*#\_\_PURE\_\_\*\/ - * So that rollup can tree-shake them if necessary. - */ - -/** - * dev only flag -> name mapping - */ -const PatchFlagNames = { - [1 /* TEXT */]: `TEXT`, - [2 /* CLASS */]: `CLASS`, - [4 /* STYLE */]: `STYLE`, - [8 /* PROPS */]: `PROPS`, - [16 /* FULL_PROPS */]: `FULL_PROPS`, - [32 /* HYDRATE_EVENTS */]: `HYDRATE_EVENTS`, - [64 /* STABLE_FRAGMENT */]: `STABLE_FRAGMENT`, - [128 /* KEYED_FRAGMENT */]: `KEYED_FRAGMENT`, - [256 /* UNKEYED_FRAGMENT */]: `UNKEYED_FRAGMENT`, - [512 /* NEED_PATCH */]: `NEED_PATCH`, - [1024 /* DYNAMIC_SLOTS */]: `DYNAMIC_SLOTS`, - [2048 /* DEV_ROOT_FRAGMENT */]: `DEV_ROOT_FRAGMENT`, - [-1 /* HOISTED */]: `HOISTED`, - [-2 /* BAIL */]: `BAIL` -}; - -(process.env.NODE_ENV !== 'production') - ? Object.freeze({}) - : {}; -(process.env.NODE_ENV !== 'production') ? Object.freeze([]) : []; -const NOOP = () => { }; -/** - * Always return false. - */ -const NO = () => false; -const extend = Object.assign; -const isArray = Array.isArray; -const isString = (val) => typeof val === 'string'; -const cacheStringFunction = (fn) => { - const cache = Object.create(null); - return ((str) => { - const hit = cache[str]; - return hit || (cache[str] = fn(str)); - }); -}; -const hyphenateRE = /\B([A-Z])/g; -/** - * @private - */ -const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, '-$1').toLowerCase()); - -function defaultOnError(error) { - throw error; -} -function defaultOnWarn(msg) { - (process.env.NODE_ENV !== 'production') && console.warn(`[Vue warn] ${msg.message}`); -} -function createCompilerError(code, loc, messages, additionalMessage) { - const msg = (process.env.NODE_ENV !== 'production') || !true - ? (messages || errorMessages)[code] + (additionalMessage || ``) - : code; - const error = new SyntaxError(String(msg)); - error.code = code; - error.loc = loc; - return error; -} -const errorMessages = { - // parse errors - [0 /* ABRUPT_CLOSING_OF_EMPTY_COMMENT */]: 'Illegal comment.', - [1 /* CDATA_IN_HTML_CONTENT */]: 'CDATA section is allowed only in XML context.', - [2 /* DUPLICATE_ATTRIBUTE */]: 'Duplicate attribute.', - [3 /* END_TAG_WITH_ATTRIBUTES */]: 'End tag cannot have attributes.', - [4 /* END_TAG_WITH_TRAILING_SOLIDUS */]: "Illegal '/' in tags.", - [5 /* EOF_BEFORE_TAG_NAME */]: 'Unexpected EOF in tag.', - [6 /* EOF_IN_CDATA */]: 'Unexpected EOF in CDATA section.', - [7 /* EOF_IN_COMMENT */]: 'Unexpected EOF in comment.', - [8 /* EOF_IN_SCRIPT_HTML_COMMENT_LIKE_TEXT */]: 'Unexpected EOF in script.', - [9 /* EOF_IN_TAG */]: 'Unexpected EOF in tag.', - [10 /* INCORRECTLY_CLOSED_COMMENT */]: 'Incorrectly closed comment.', - [11 /* INCORRECTLY_OPENED_COMMENT */]: 'Incorrectly opened comment.', - [12 /* INVALID_FIRST_CHARACTER_OF_TAG_NAME */]: "Illegal tag name. Use '<' to print '<'.", - [13 /* MISSING_ATTRIBUTE_VALUE */]: 'Attribute value was expected.', - [14 /* MISSING_END_TAG_NAME */]: 'End tag name was expected.', - [15 /* MISSING_WHITESPACE_BETWEEN_ATTRIBUTES */]: 'Whitespace was expected.', - [16 /* NESTED_COMMENT */]: "Unexpected '