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 }) </script> 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 } } }