提交 5a913d36 编写于 作者: fxy060608's avatar fxy060608

feat(mp): remove isCustomElement

上级 a1034d51
import {isFunction, extend, isPlainObject, isPromise, isArray, hasOwn} from "@vue/shared";
import {injectHook, openBlock, createBlock, createVNode, Fragment, renderList, toDisplayString, createCommentVNode, createTextVNode, Transition, withCtx, withModifiers, withDirectives, vShow, resolveComponent, KeepAlive, resolveDynamicComponent, mergeProps, renderSlot} from "vue";
import {isCustomElement, TABBAR_HEIGHT, COMPONENT_NAME_PREFIX, NAVBAR_HEIGHT} from "@dcloudio/uni-shared";
import {passiveOptions, Input} from "@dcloudio/uni-components";
export * from "@dcloudio/uni-components";
import {TABBAR_HEIGHT, COMPONENT_NAME_PREFIX, isCustomElement, NAVBAR_HEIGHT} from "@dcloudio/uni-shared";
import {createWebHistory, createWebHashHistory, createRouter} from "vue-router";
function applyOptions(options, instance2, publicThis) {
Object.keys(options).forEach((name) => {
......@@ -49,7 +49,6 @@ function initApp(app) {
if (isFunction(app._component.onError)) {
appConfig2.errorHandler = errorHandler;
}
appConfig2.isCustomElement = isCustomElement;
const globalProperties = appConfig2.globalProperties;
globalProperties.$hasHook = hasHook;
globalProperties.$callHook = callHook;
......@@ -1820,6 +1819,7 @@ function initSystemComponents(app2) {
}
var index = {
install(app) {
app._context.config.isCustomElement = isCustomElement;
initApp(app);
initView(app);
initService(app);
......
......@@ -2,12 +2,15 @@ import { App } from 'vue'
import { initApp } from '@dcloudio/uni-vue'
import { initView, initService } from '@dcloudio/uni-core'
import { isCustomElement } from '@dcloudio/uni-shared'
import { initRouter } from './router'
import { initSystemComponents } from './components'
export default {
install(app: App) {
app._context.config.isCustomElement = isCustomElement
initApp(app)
initView(app)
initService(app)
......
import { isSymbol, extend, isMap, isObject, toRawType, def, isArray, isString, isFunction, isPromise, capitalize, remove, EMPTY_OBJ, NOOP, isGloballyWhitelisted, isIntegerKey, hasOwn, hasChanged, NO, invokeArrayFns, isSet, makeMap, hyphenate, isReservedProp, camelize, EMPTY_ARR, toTypeString, isOn } from '@vue/shared';
export { camelize } from '@vue/shared';
import { isCustomElement } from '@dcloudio/uni-shared';
const targetMap = new WeakMap();
const effectStack = [];
......@@ -3537,7 +3536,6 @@ function initApp(app) {
if (isFunction(app._component.onError)) {
appConfig.errorHandler = errorHandler;
}
appConfig.isCustomElement = isCustomElement;
const globalProperties = appConfig.globalProperties;
globalProperties.$hasHook = hasHook;
globalProperties.$callHook = callHook;
......
......@@ -52,6 +52,7 @@ const TAGS = [
'uni-layout',
'uni-content',
'uni-main',
'uni-top-window',
'uni-left-window',
'uni-right-window',
'uni-tabbar',
......
......@@ -3,6 +3,7 @@ export const TAGS = [
'uni-layout',
'uni-content',
'uni-main',
'uni-top-window',
'uni-left-window',
'uni-right-window',
'uni-tabbar',
......
import { ComponentPublicInstance } from '@vue/runtime-core'
export { isCustomElement } from '@dcloudio/uni-shared'
export function errorHandler(
err: unknown,
instance: ComponentPublicInstance | null,
......
......@@ -4,14 +4,13 @@ import { isFunction } from '@vue/shared'
import { applyOptions } from './componentOptions'
import { set, hasHook, callHook } from './componentInstance'
import { errorHandler, isCustomElement } from './appConfig'
import { errorHandler } from './appConfig'
export function initApp(app: App) {
const appConfig = app._context.config
if (isFunction((app._component as any).onError)) {
appConfig.errorHandler = errorHandler
}
appConfig.isCustomElement = isCustomElement
const globalProperties = appConfig.globalProperties
globalProperties.$hasHook = hasHook
globalProperties.$callHook = callHook
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册