Coder Social home page Coder Social logo

Comments (12)

1977474741 avatar 1977474741 commented on May 17, 2024 1

原生小程序的component的this确实没有挂载 生命周期函数,也就是说这两种方式都无法再原生的component里触发是吗? image
是的,因为现在本身逻辑都是不支持的。昨天我试了下可以实现,预计下周能发布一个新版本支持所有小程序的组件。

from spa-custom-hooks.

1977474741 avatar 1977474741 commented on May 17, 2024

原生小程序一直都支持的

from spa-custom-hooks.

GOGOGOSIR avatar GOGOGOSIR commented on May 17, 2024

原生小程序下的组件还不支持自定义钩子,比如 onReadyUserInfo 没有触发

from spa-custom-hooks.

GOGOGOSIR avatar GOGOGOSIR commented on May 17, 2024

这个写法挺好的,希望作者兼容下原生小程序的组件,因为确实有写场景需要在组件内部依赖用户信息的

from spa-custom-hooks.

GOGOGOSIR avatar GOGOGOSIR commented on May 17, 2024

image
我在这里看到有声明但是不知道为啥不触发

from spa-custom-hooks.

1977474741 avatar 1977474741 commented on May 17, 2024

图像 我看到有声明但不知道是啥不在这里触发

这里的ready和attached是vue的钩子。原生小程序Component内部this上没有生命周期函数,我得研究下如何实现。

from spa-custom-hooks.

GOGOGOSIR avatar GOGOGOSIR commented on May 17, 2024

原生小程序的component的this确实没有挂载 生命周期函数,也就是说这两种方式都无法再原生的component里触发是吗?
image

from spa-custom-hooks.

FullOfVigour avatar FullOfVigour commented on May 17, 2024

原生小程序的component的this确实没有挂载 生命周期函数,也就是说这两种方式都无法再原生的component里触发是吗? image
是的,因为现在本身逻辑都是不支持的。昨天我试了下可以实现,预计下周能发布一个新版本支持所有小程序的组件。

您好,现在版本支持小程序组件了吗?支持的化能更新下小程序demom ,给里面加一个小程序的写法

from spa-custom-hooks.

1977474741 avatar 1977474741 commented on May 17, 2024

原生小程序的component的this确实没有挂载 生命周期函数,也就是说这两种方式都无法再原生的component里触发是吗? image
是的,因为现在本身逻辑都是不支持的。昨天我试了下可以实现,预计下周能发布一个新版本支持所有小程序的组件。

您好,现在版本支持小程序组件了吗?支持的化能更新下小程序demom ,给里面加一个小程序的写法

刚发布了新版本,支持所有原生小程序的组件,包括lifetimes和pageLifetimes,用法跟原生钩子的用法一样

from spa-custom-hooks.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.