feat: 标签组件封装
This commit is contained in:
26
unpackage/dist/dev/mp-weixin/common/assets.js
vendored
26
unpackage/dist/dev/mp-weixin/common/assets.js
vendored
@@ -1,22 +1,20 @@
|
||||
"use strict";
|
||||
const _imports_0$6 = "/static/quick/quick_icon_bg.png";
|
||||
const _imports_0$5 = "/static/logo.png";
|
||||
const _imports_0$5 = "/static/quick/quick_icon_bg.png";
|
||||
const _imports_0$4 = "/static/logo.png";
|
||||
const _imports_1$2 = "/static/input_voice_icon.png";
|
||||
const _imports_2 = "/static/input_send_icon.png";
|
||||
const _imports_0$4 = "/static/hello_xiaomu_icon@2x.png";
|
||||
const _imports_0$3 = "/static/hello_xiaomu_icon@2x.png";
|
||||
const _imports_1$1 = "/static/hello_logo_icon@2x.png";
|
||||
const _imports_0$3 = "/static/top_bg_icon.png";
|
||||
const _imports_0$2 = "/static/drawer_icon.png";
|
||||
const _imports_0$1 = "/static/wave_icon.png";
|
||||
const _imports_0$2 = "/static/top_bg_icon.png";
|
||||
const _imports_0$1 = "/static/drawer_icon.png";
|
||||
const _imports_0 = "/static/wave_icon.png";
|
||||
const _imports_1 = "/static/test/mk_img_1.png";
|
||||
const _imports_0 = "/assets/icon_order.911ae60f.png";
|
||||
exports._imports_0 = _imports_0$5;
|
||||
exports._imports_0$1 = _imports_0$4;
|
||||
exports._imports_0$2 = _imports_0$3;
|
||||
exports._imports_0$3 = _imports_0$2;
|
||||
exports._imports_0$4 = _imports_0$6;
|
||||
exports._imports_0$5 = _imports_0$1;
|
||||
exports._imports_0$6 = _imports_0;
|
||||
exports._imports_0 = _imports_0$4;
|
||||
exports._imports_0$1 = _imports_0$3;
|
||||
exports._imports_0$2 = _imports_0$2;
|
||||
exports._imports_0$3 = _imports_0$1;
|
||||
exports._imports_0$4 = _imports_0$5;
|
||||
exports._imports_0$5 = _imports_0;
|
||||
exports._imports_1 = _imports_1$2;
|
||||
exports._imports_1$1 = _imports_1$1;
|
||||
exports._imports_1$2 = _imports_1;
|
||||
|
||||
99
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
99
unpackage/dist/dev/mp-weixin/common/vendor.js
vendored
@@ -2582,21 +2582,21 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
||||
);
|
||||
}
|
||||
}
|
||||
const createHook$1 = (lifecycle) => (hook, target = currentInstance) => (
|
||||
const createHook = (lifecycle) => (hook, target = currentInstance) => (
|
||||
// post-create lifecycle registrations are noops during SSR (except for serverPrefetch)
|
||||
(!isInSSRComponentSetup || lifecycle === "sp") && injectHook(lifecycle, (...args) => hook(...args), target)
|
||||
);
|
||||
const onBeforeMount = createHook$1("bm");
|
||||
const onMounted = createHook$1("m");
|
||||
const onBeforeUpdate = createHook$1("bu");
|
||||
const onUpdated = createHook$1("u");
|
||||
const onBeforeUnmount = createHook$1("bum");
|
||||
const onUnmounted = createHook$1("um");
|
||||
const onServerPrefetch = createHook$1("sp");
|
||||
const onRenderTriggered = createHook$1(
|
||||
const onBeforeMount = createHook("bm");
|
||||
const onMounted = createHook("m");
|
||||
const onBeforeUpdate = createHook("bu");
|
||||
const onUpdated = createHook("u");
|
||||
const onBeforeUnmount = createHook("bum");
|
||||
const onUnmounted = createHook("um");
|
||||
const onServerPrefetch = createHook("sp");
|
||||
const onRenderTriggered = createHook(
|
||||
"rtg"
|
||||
);
|
||||
const onRenderTracked = createHook$1(
|
||||
const onRenderTracked = createHook(
|
||||
"rtc"
|
||||
);
|
||||
function onErrorCaptured(hook, target = currentInstance) {
|
||||
@@ -2609,11 +2609,15 @@ const getPublicInstance = (i) => {
|
||||
return getExposeProxy(i) || i.proxy;
|
||||
return getPublicInstance(i.parent);
|
||||
};
|
||||
function getComponentInternalInstance(i) {
|
||||
return i;
|
||||
}
|
||||
const publicPropertiesMap = (
|
||||
// Move PURE marker to new line to workaround compiler discarding it
|
||||
// due to type annotation
|
||||
/* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
|
||||
$: (i) => i,
|
||||
// fixed by xxxxxx
|
||||
$: getComponentInternalInstance,
|
||||
// fixed by xxxxxx vue-i18n 在 dev 模式,访问了 $el,故模拟一个假的
|
||||
// $el: i => i.vnode.el,
|
||||
$el: (i) => i.__$el || (i.__$el = {}),
|
||||
@@ -4484,6 +4488,7 @@ function warnRef(ref2) {
|
||||
const queuePostRenderEffect = queuePostFlushCb;
|
||||
function mountComponent(initialVNode, options) {
|
||||
const instance = initialVNode.component = createComponentInstance(initialVNode, options.parentComponent, null);
|
||||
instance.renderer = options.mpType ? options.mpType : "component";
|
||||
{
|
||||
instance.ctx.$onApplyOptions = onApplyOptions;
|
||||
instance.ctx.$children = [];
|
||||
@@ -4822,7 +4827,8 @@ function injectLifecycleHook(name, hook, publicThis, instance) {
|
||||
}
|
||||
function initHooks$1(options, instance, publicThis) {
|
||||
const mpType = options.mpType || publicThis.$mpType;
|
||||
if (!mpType || mpType === "component") {
|
||||
if (!mpType || mpType === "component" || // instance.renderer 标识页面是否作为组件渲染
|
||||
mpType === "page" && instance.renderer === "component") {
|
||||
return;
|
||||
}
|
||||
Object.keys(options).forEach((name) => {
|
||||
@@ -5461,10 +5467,10 @@ function handlePromise(promise) {
|
||||
function promisify$1(name, fn) {
|
||||
return (args = {}, ...rest) => {
|
||||
if (hasCallback(args)) {
|
||||
return wrapperReturnValue(name, invokeApi(name, fn, args, rest));
|
||||
return wrapperReturnValue(name, invokeApi(name, fn, extend({}, args), rest));
|
||||
}
|
||||
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
|
||||
invokeApi(name, fn, extend(args, { success: resolve, fail: reject }), rest);
|
||||
invokeApi(name, fn, extend({}, args, { success: resolve, fail: reject }), rest);
|
||||
})));
|
||||
};
|
||||
}
|
||||
@@ -5861,7 +5867,7 @@ function promisify(name, api) {
|
||||
}
|
||||
return function promiseApi(options = {}, ...rest) {
|
||||
if (isFunction(options.success) || isFunction(options.fail) || isFunction(options.complete)) {
|
||||
return wrapperReturnValue(name, invokeApi(name, api, options, rest));
|
||||
return wrapperReturnValue(name, invokeApi(name, api, extend({}, options), rest));
|
||||
}
|
||||
return wrapperReturnValue(name, handlePromise(new Promise((resolve, reject) => {
|
||||
invokeApi(name, api, extend({}, options, {
|
||||
@@ -6028,7 +6034,7 @@ function getOSInfo(system, platform) {
|
||||
osName = system.split(" ")[0] || platform;
|
||||
osVersion = system.split(" ")[1] || "";
|
||||
}
|
||||
osName = osName.toLocaleLowerCase();
|
||||
osName = osName.toLowerCase();
|
||||
switch (osName) {
|
||||
case "harmony":
|
||||
case "ohos":
|
||||
@@ -6068,9 +6074,9 @@ function populateParameters(fromRes, toRes) {
|
||||
appVersion: "1.0.0",
|
||||
appVersionCode: "100",
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
uniCompileVersion: "4.66",
|
||||
uniCompilerVersion: "4.66",
|
||||
uniRuntimeVersion: "4.66",
|
||||
uniCompileVersion: "4.75",
|
||||
uniCompilerVersion: "4.75",
|
||||
uniRuntimeVersion: "4.75",
|
||||
uniPlatform: "mp-weixin",
|
||||
deviceBrand,
|
||||
deviceModel: model,
|
||||
@@ -6107,7 +6113,7 @@ function getGetDeviceType(fromRes, model) {
|
||||
mac: "pc"
|
||||
};
|
||||
const deviceTypeMapsKeys = Object.keys(deviceTypeMaps);
|
||||
const _model = model.toLocaleLowerCase();
|
||||
const _model = model.toLowerCase();
|
||||
for (let index2 = 0; index2 < deviceTypeMapsKeys.length; index2++) {
|
||||
const _m = deviceTypeMapsKeys[index2];
|
||||
if (_model.indexOf(_m) !== -1) {
|
||||
@@ -6121,7 +6127,7 @@ function getGetDeviceType(fromRes, model) {
|
||||
function getDeviceBrand(brand) {
|
||||
let deviceBrand = brand;
|
||||
if (deviceBrand) {
|
||||
deviceBrand = deviceBrand.toLocaleLowerCase();
|
||||
deviceBrand = deviceBrand.toLowerCase();
|
||||
}
|
||||
return deviceBrand;
|
||||
}
|
||||
@@ -6219,9 +6225,9 @@ const getAppBaseInfo = {
|
||||
appLanguage: getAppLanguage(hostLanguage),
|
||||
isUniAppX: false,
|
||||
uniPlatform: "mp-weixin",
|
||||
uniCompileVersion: "4.66",
|
||||
uniCompilerVersion: "4.66",
|
||||
uniRuntimeVersion: "4.66"
|
||||
uniCompileVersion: "4.75",
|
||||
uniCompilerVersion: "4.75",
|
||||
uniRuntimeVersion: "4.75"
|
||||
};
|
||||
extend(toRes, parameters);
|
||||
}
|
||||
@@ -6894,14 +6900,14 @@ const atFileRegex = /^\s*at\s+[\w/./-]+:\d+$/;
|
||||
function rewriteConsole() {
|
||||
function wrapConsole(type) {
|
||||
return function(...args) {
|
||||
const originalArgs = [...args];
|
||||
if (originalArgs.length) {
|
||||
const maybeAtFile = originalArgs[originalArgs.length - 1];
|
||||
if (typeof maybeAtFile === "string" && atFileRegex.test(maybeAtFile)) {
|
||||
originalArgs.pop();
|
||||
}
|
||||
}
|
||||
{
|
||||
const originalArgs = [...args];
|
||||
if (originalArgs.length) {
|
||||
const maybeAtFile = originalArgs[originalArgs.length - 1];
|
||||
if (typeof maybeAtFile === "string" && atFileRegex.test(maybeAtFile)) {
|
||||
originalArgs.pop();
|
||||
}
|
||||
}
|
||||
originalConsole[type](...originalArgs);
|
||||
}
|
||||
if (type === "error" && args.length === 1) {
|
||||
@@ -6961,9 +6967,9 @@ function isConsoleWritable() {
|
||||
return isWritable;
|
||||
}
|
||||
function initRuntimeSocketService() {
|
||||
const hosts = "10.10.3.1,192.168.56.1,127.0.0.1";
|
||||
const hosts = "192.168.1.23,127.0.0.1";
|
||||
const port = "8090";
|
||||
const id = "mp-weixin_25DYPD";
|
||||
const id = "mp-weixin_FpXcBt";
|
||||
const lazy = typeof swan !== "undefined";
|
||||
let restoreError = lazy ? () => {
|
||||
} : initOnError();
|
||||
@@ -7909,15 +7915,30 @@ const createSubpackageApp = initCreateSubpackageApp();
|
||||
wx.createPluginApp = global.createPluginApp = createPluginApp;
|
||||
wx.createSubpackageApp = global.createSubpackageApp = createSubpackageApp;
|
||||
}
|
||||
const createHook = (lifecycle) => (hook, target = getCurrentInstance()) => {
|
||||
const createLifeCycleHook = (lifecycle, flag = 0) => (hook, target = getCurrentInstance()) => {
|
||||
!isInSSRComponentSetup && injectHook(lifecycle, hook, target);
|
||||
};
|
||||
const onShow = /* @__PURE__ */ createHook(ON_SHOW);
|
||||
const onHide = /* @__PURE__ */ createHook(ON_HIDE);
|
||||
const onLaunch = /* @__PURE__ */ createHook(ON_LAUNCH);
|
||||
const onLoad = /* @__PURE__ */ createHook(ON_LOAD);
|
||||
const onShow = /* @__PURE__ */ createLifeCycleHook(
|
||||
ON_SHOW,
|
||||
1 | 2
|
||||
/* HookFlags.PAGE */
|
||||
);
|
||||
const onHide = /* @__PURE__ */ createLifeCycleHook(
|
||||
ON_HIDE,
|
||||
1 | 2
|
||||
/* HookFlags.PAGE */
|
||||
);
|
||||
const onLaunch = /* @__PURE__ */ createLifeCycleHook(
|
||||
ON_LAUNCH,
|
||||
1
|
||||
/* HookFlags.APP */
|
||||
);
|
||||
const onLoad = /* @__PURE__ */ createLifeCycleHook(
|
||||
ON_LOAD,
|
||||
2
|
||||
/* HookFlags.PAGE */
|
||||
);
|
||||
exports._export_sfc = _export_sfc;
|
||||
exports.computed = computed;
|
||||
exports.createSSRApp = createSSRApp;
|
||||
exports.defineComponent = defineComponent;
|
||||
exports.e = e;
|
||||
|
||||
Reference in New Issue
Block a user