组件mounted 生命钩子中 console.log(this) 运行支付宝小程序开发者工具查看控制台

- 发布:2022-03-31 11:39
- 更新:2022-09-01 13:14
- 阅读:562
产品分类: uniapp/小程序/阿里
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: 10.0.19042.1415
HBuilderX类型: 正式
HBuilderX版本号: 3.3.13
第三方开发者工具版本号: 2.5.6
基础库版本号: 1.25.4
项目创建方式: HBuilderX
操作步骤:
预期结果:
$attrs: (...)
$children: []
$createElement: ƒ (a, b, c, d)
$el: undefined
$listeners: (...)
$mp: {data: {…}, component: Ze}
$options: {components: {…}, directives: {…}, filters: {…}, beforeCreate: Array(2), _base: ƒ, …}
$parent: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$refs: (...)
$root: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$scope: Ze {__wxExparserNodeId__: "41930232", _$vueId: "1da55560-5", $vm: VueComponent, __data__: {…}, triggerEvent: ƒ, …}
$scopedSlots: {default: true}
$slots: {default: true}
$store: Store {_committing: false, _actions: {…}, _actionSubscribers: Array(0), _mutations: {…}, _wrappedGetters: {…}, …}
$uGetRect: ƒ ()
$vnode: undefined
$attrs: (...)
$children: []
$createElement: ƒ (a, b, c, d)
$el: undefined
$listeners: (...)
$mp: {data: {…}, component: Ze}
$options: {components: {…}, directives: {…}, filters: {…}, beforeCreate: Array(2), _base: ƒ, …}
$parent: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$refs: (...)
$root: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$scope: Ze {__wxExparserNodeId__: "41930232", _$vueId: "1da55560-5", $vm: VueComponent, __data__: {…}, triggerEvent: ƒ, …}
$scopedSlots: {default: true}
$slots: {default: true}
$store: Store {_committing: false, _actions: {…}, _actionSubscribers: Array(0), _mutations: {…}, _wrappedGetters: {…}, …}
$uGetRect: ƒ ()
$vnode: undefined
实际结果:
$attrs: (...)
$children: []
$createElement: ƒ (a,b,c,d)
$el: undefined
$id: 2
$listeners: (...)
$mp: {data: {…}, component: {…}}
$options: {components: {…}, directives: {…}, filters: {…}, beforeCreate: Array(2), _base: ƒ, …}
$parent: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$refs: {}
$root: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$scope: {$page: {…}, $id: 2, is: "/uview-ui/components/u-popup/u-popup", $spliceData: ƒ, setData: ƒ, …}
$store: Store {_committing: false, _actions: {…}, _actionSubscribers: Array(0), _mutations: {…}, _wrappedGetters: {…}, …}
$uGetRect: ƒ ()
$vnode: undefined
没有出现$slots $scopedSlots 属性
$attrs: (...)
$children: []
$createElement: ƒ (a,b,c,d)
$el: undefined
$id: 2
$listeners: (...)
$mp: {data: {…}, component: {…}}
$options: {components: {…}, directives: {…}, filters: {…}, beforeCreate: Array(2), _base: ƒ, …}
$parent: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$refs: {}
$root: VueComponent {_uid: 4, _isVue: true, $options: {…}, _renderProxy: Proxy, _self: VueComponent, …}
$scope: {$page: {…}, $id: 2, is: "/uview-ui/components/u-popup/u-popup", $spliceData: ƒ, setData: ƒ, …}
$store: Store {_committing: false, _actions: {…}, _actionSubscribers: Array(0), _mutations: {…}, _wrappedGetters: {…}, …}
$uGetRect: ƒ ()
$vnode: undefined
没有出现$slots $scopedSlots 属性
bug描述:
微信开发者工具中console 打印this, 下面有$solts这个属性,支付宝小程序开发者工具中则没有该属性

