diff --git a/packages/uni-shared/dist/uni-shared.cjs.js b/packages/uni-shared/dist/uni-shared.cjs.js index c35ee5a5a2698db7ab2f9c825d49a9089d50bfa5..12fe2095483e3ec4410ae00ea1c35e21ecb6b414 100644 --- a/packages/uni-shared/dist/uni-shared.cjs.js +++ b/packages/uni-shared/dist/uni-shared.cjs.js @@ -129,7 +129,34 @@ function isH5NativeTag(tag) { function isAppNativeTag(tag) { return shared.isHTMLTag(tag) || shared.isSVGTag(tag) || isBuiltInComponent(tag); } +const NVUE_CUSTOM_COMPONENTS = [ + 'ad', + 'ad-draw', + 'button', + 'checkbox-group', + 'checkbox', + 'form', + 'icon', + 'label', + 'movable-area', + 'movable-view', + 'navigator', + 'picker', + 'progress', + 'radio-group', + 'radio', + 'rich-text', + 'swiper-item', + 'swiper', + 'switch', + 'slider', + 'picker-view', + 'picker-view-column', +]; function isAppNVueNativeTag(tag) { + if (NVUE_CUSTOM_COMPONENTS.includes(tag)) { + return false; + } if (isBuiltInComponent(tag)) { return true; } diff --git a/packages/uni-shared/dist/uni-shared.es.js b/packages/uni-shared/dist/uni-shared.es.js index 8fb38bb9c4860929360c69687f30f37c674b8e72..e2eae50085900b1655bf6d4835f020e28adbb2ae 100644 --- a/packages/uni-shared/dist/uni-shared.es.js +++ b/packages/uni-shared/dist/uni-shared.es.js @@ -125,7 +125,34 @@ function isH5NativeTag(tag) { function isAppNativeTag(tag) { return isHTMLTag(tag) || isSVGTag(tag) || isBuiltInComponent(tag); } +const NVUE_CUSTOM_COMPONENTS = [ + 'ad', + 'ad-draw', + 'button', + 'checkbox-group', + 'checkbox', + 'form', + 'icon', + 'label', + 'movable-area', + 'movable-view', + 'navigator', + 'picker', + 'progress', + 'radio-group', + 'radio', + 'rich-text', + 'swiper-item', + 'swiper', + 'switch', + 'slider', + 'picker-view', + 'picker-view-column', +]; function isAppNVueNativeTag(tag) { + if (NVUE_CUSTOM_COMPONENTS.includes(tag)) { + return false; + } if (isBuiltInComponent(tag)) { return true; } diff --git a/packages/uni-shared/src/tags.ts b/packages/uni-shared/src/tags.ts index 45a4dc0413a7c506f9f914a4a52627d5b26eff72..3a540d449605913df722b48a18e88b9deeee45ad 100644 --- a/packages/uni-shared/src/tags.ts +++ b/packages/uni-shared/src/tags.ts @@ -136,7 +136,35 @@ export function isAppNativeTag(tag: string) { return isHTMLTag(tag) || isSVGTag(tag) || isBuiltInComponent(tag) } +const NVUE_CUSTOM_COMPONENTS = [ + 'ad', + 'ad-draw', + 'button', + 'checkbox-group', + 'checkbox', + 'form', + 'icon', + 'label', + 'movable-area', + 'movable-view', + 'navigator', + 'picker', + 'progress', + 'radio-group', + 'radio', + 'rich-text', + 'swiper-item', + 'swiper', + 'switch', + 'slider', + 'picker-view', + 'picker-view-column', +] + export function isAppNVueNativeTag(tag: string) { + if (NVUE_CUSTOM_COMPONENTS.includes(tag)) { + return false + } if (isBuiltInComponent(tag)) { return true }