diff --git a/main.uts b/main.uts index 229c38eff1b22356bbbb6bc69c1f7d5124a738fb..adf0abb833ce1f9cb7585f89639c570cfd29c310 100644 --- a/main.uts +++ b/main.uts @@ -267,13 +267,13 @@ export function createApp() { app.use(plugin2) app.use(plugin3) app.use(plugin4) - app.use(function (app: VueApp, componentName: string, componentInstance: CreateVueComponent) { - app.component(componentName, componentInstance) - }, 'CompForPlugin1', CompForPlugin) + app.use(function (app: VueApp, componentName: string) { + app.component(componentName, CompForPlugin) + }, 'CompForPlugin1') app.use({ install(app: VueApp, a: string | null, b: string | null) { - app.component('CompForPlugin2', CompForPlugin as CreateVueComponent) + app.component('CompForPlugin2', CompForPlugin) } }, null, null) diff --git a/pages/component-instance/attrs/child-composition.uvue b/pages/component-instance/attrs/child-composition.uvue index b47ea22ce85a38237701500c7a9505c4a4ef30a0..7d1e0e5630a6df1c0136107a5dd39c7f02fcc406 100644 --- a/pages/component-instance/attrs/child-composition.uvue +++ b/pages/component-instance/attrs/child-composition.uvue @@ -28,29 +28,14 @@ defineProps({ const attrs = useAttrs() const hasPropsAttr = computed(():boolean => { - // #ifdef APP-ANDROID - return attrs.has('val') - // #endif - // #ifndef APP-ANDROID - return !!attrs['val'] - // #endif + return attrs['val'] != null }) const hasEmitsAttr = computed(():boolean => { - // #ifdef APP-ANDROID - return attrs.has('childClick') - // #endif - // #ifndef APP-ANDROID - return !!attrs['childClick'] - // #endif + return attrs['childClick'] != null }) const hasClassAttr = computed(():boolean => { - // #ifdef APP-ANDROID - return attrs.has('class') - // #endif - // #ifndef APP-ANDROID - return !!attrs['class'] - // #endif + return attrs['class'] != null }) diff --git a/pages/component-instance/attrs/child-options.uvue b/pages/component-instance/attrs/child-options.uvue index 99f1947c6ae81ba779b4a02b5fbb3ac6c12fc850..8a49b7b08048c9d77673fdd8e45c1158d937940b 100644 --- a/pages/component-instance/attrs/child-options.uvue +++ b/pages/component-instance/attrs/child-options.uvue @@ -26,28 +26,13 @@ export default { }, computed: { hasPropsAttr(): boolean { - // #ifdef APP-ANDROID - return this.$attrs.has('val') - // #endif - // #ifndef APP-ANDROID - return !!this.$attrs['val'] - // #endif + return this.$attrs['val'] != null }, hasEmitsAttr(): boolean { - // #ifdef APP-ANDROID - return this.$attrs.has('childClick') - // #endif - // #ifndef APP-ANDROID - return !!this.$attrs['childClick'] - // #endif + return this.$attrs['childClick'] != null }, hasClassAttr(): boolean { - // #ifdef APP-ANDROID - return this.$attrs.has('class') - // #endif - // #ifndef APP-ANDROID - return !!this.$attrs['class'] - // #endif + return this.$attrs['class'] != null } } } diff --git a/pages/component-instance/parent/child-composition.uvue b/pages/component-instance/parent/child-composition.uvue index 9403545782369e33fa3649d646dbd0f80bdb00c7..4655079ae365ca01fb712a2e3a88a8a084b88035 100644 --- a/pages/component-instance/parent/child-composition.uvue +++ b/pages/component-instance/parent/child-composition.uvue @@ -30,11 +30,6 @@ }) const triggerParentFn = () => { - // #ifdef APP-ANDROID || WEB parentNum.value = instance.$parent!.$callMethod('callMethodByChild') as number - // #endif - // #ifndef APP-ANDROID || WEB - parentNum.value = instance.$parent!['callMethodByChild']() - // #endif } \ No newline at end of file diff --git a/pages/component-instance/parent/child-options.uvue b/pages/component-instance/parent/child-options.uvue index 7b7a405c9c55c35cc65b79f71b637ffe8a5b7c5c..5d4faafbbe1c36411e510df18c08e2f7f78fa637 100644 --- a/pages/component-instance/parent/child-options.uvue +++ b/pages/component-instance/parent/child-options.uvue @@ -27,12 +27,7 @@ }, methods: { triggerParentFn() { - // #ifdef APP-ANDROID || WEB this.parentNum = this.$parent!.$callMethod('callMethodByChild') as number - // #endif - // #ifndef APP-ANDROID || WEB - this.parentNum = this.$parent!['callMethodByChild']() - // #endif } } } diff --git a/pages/component-instance/parent/parent-composition.uvue b/pages/component-instance/parent/parent-composition.uvue index 72b331670fd6194bd149826a419305d287e8c7d2..52b70b002bffdb4d7a93a5f66efd28bbe02b759d 100644 --- a/pages/component-instance/parent/parent-composition.uvue +++ b/pages/component-instance/parent/parent-composition.uvue @@ -17,12 +17,7 @@ const callMethodByChild = () : number => { const childComponent = instance.$refs['childRef'] as ComponentPublicInstance - // #ifdef APP-ANDROID return childComponent.$parent!.$callMethod('getNum') as number - // #endif - // #ifndef APP-ANDROID - return childComponent.$parent!['getNum']() - // #endif } defineExpose({ diff --git a/pages/component-instance/parent/parent-options.uvue b/pages/component-instance/parent/parent-options.uvue index 66e881d368913a28a1128aae32015bce860da44f..ad2e50e099bc039773eb3d7eee587a1a4a95c141 100644 --- a/pages/component-instance/parent/parent-options.uvue +++ b/pages/component-instance/parent/parent-options.uvue @@ -23,12 +23,7 @@ export default { }, callMethodByChild(): number { const child = this.$refs['child'] as ComponentPublicInstance - // #ifdef APP-ANDROID return child.$parent!.$callMethod('getNum') as number - // #endif - // #ifndef APP-ANDROID - return child.$parent!['getNum']() - // #endif } } } diff --git a/pages/reactivity/core/readonly/readonly.uvue b/pages/reactivity/core/readonly/readonly.uvue index 63f49b91d55de6f41f2543ae8db57ea3915f2c0e..d18269d954f412438ac5e955f4e28f900f201f9c 100644 --- a/pages/reactivity/core/readonly/readonly.uvue +++ b/pages/reactivity/core/readonly/readonly.uvue @@ -56,10 +56,8 @@ const updateData = () => { } const updateReadonlyData = () => { - // #ifndef WEB readonlyData.str = 'new readonly str' readonlyData.num++ readonlyData.arr.push('e') - // #endif } diff --git a/pages/render-function/cloneVNode/cloneVNode-composition.uvue b/pages/render-function/cloneVNode/cloneVNode-composition.uvue index 697a12e8f122fdf46632d2c9e54d40626b0a98ef..bd286e77b08a6eb5fd3049faf1a2c261a6672069 100644 --- a/pages/render-function/cloneVNode/cloneVNode-composition.uvue +++ b/pages/render-function/cloneVNode/cloneVNode-composition.uvue @@ -4,12 +4,7 @@ const originalVNode = h('view', { class: 'original' }, [ h('text', {}, 'Hello World'), ]) - // #ifdef APP-ANDROID - const clonedVNode = cloneVNode(originalVNode, new Map([['class', 'cloned']])) - // #endif - // #ifdef WEB || APP-IOS - const clonedVNode = cloneVNode(originalVNode, { class: 'cloned'}) - // #endif + const clonedVNode = cloneVNode(originalVNode, { class: 'cloned' }) return h('view', { class: 'flex flex-col' }, [originalVNode, clonedVNode]) } diff --git a/pages/render-function/cloneVNode/cloneVNode-options.uvue b/pages/render-function/cloneVNode/cloneVNode-options.uvue index dfdb943067a7a2e65f49882d8b77b96f2b41d6f0..3fd74b73be5bfac6e06f02885de58205cd15772d 100644 --- a/pages/render-function/cloneVNode/cloneVNode-options.uvue +++ b/pages/render-function/cloneVNode/cloneVNode-options.uvue @@ -4,12 +4,7 @@ const originalVNode = h('view', { class: 'original' }, [ h('text', {}, 'Hello World'), ]) - // #ifdef APP-ANDROID - const clonedVNode = cloneVNode(originalVNode, new Map([['class', 'cloned']])) - // #endif - // #ifdef WEB || APP-IOS - const clonedVNode = cloneVNode(originalVNode, { class: 'cloned'}) - // #endif + const clonedVNode = cloneVNode(originalVNode, { class: 'cloned' }) return h('view', { class: 'flex flex-col' }, [originalVNode, clonedVNode]) } diff --git a/pages/render-function/isVNode/isVNode-composition.uvue b/pages/render-function/isVNode/isVNode-composition.uvue index 073a347865c140718748359266ce96896f8f9390..786dea51dd1169a52ca91830f4b1fa0a6f94247f 100644 --- a/pages/render-function/isVNode/isVNode-composition.uvue +++ b/pages/render-function/isVNode/isVNode-composition.uvue @@ -14,12 +14,7 @@ + \ No newline at end of file diff --git a/pages/render-function/isVNode/isVNode-options.uvue b/pages/render-function/isVNode/isVNode-options.uvue index 183012a6d2ad9f82efbaf52f76796b88d7b92312..2008d59467cac26d829f0a432ceeab46694de65b 100644 --- a/pages/render-function/isVNode/isVNode-options.uvue +++ b/pages/render-function/isVNode/isVNode-options.uvue @@ -12,23 +12,17 @@ + \ No newline at end of file diff --git a/pages/render-function/mergeProps/mergeProps-composition.uvue b/pages/render-function/mergeProps/mergeProps-composition.uvue index 575494c481dd85514002231aae9b118c52de7074..7ca88453b7cbac33ba05c426b4c359ed13b55e8f 100644 --- a/pages/render-function/mergeProps/mergeProps-composition.uvue +++ b/pages/render-function/mergeProps/mergeProps-composition.uvue @@ -15,13 +15,6 @@