Git Product home page Git Product logo

Comments (7)

github-actions avatar github-actions commented on June 1, 2024

👋 @guluuwater,感谢给 TDesign 提出了 issue。
请根据 issue 模版确保背景信息的完善,我们将调查并尽快回复你。

from tdesign-miniprogram.

LeeJim avatar LeeJim commented on June 1, 2024

我懂你的意思了。
你的 format 函数里会依赖异步的数据。
那你可以再获取数据之后,再重复设置一下 format

from tdesign-miniprogram.

guluuwater avatar guluuwater commented on June 1, 2024

我懂你的意思了。 你的 format 函数里会依赖异步的数据。 那你可以再获取数据之后,再重复设置一下 format

请问您说的重置一下是什么意思?可以给个实例代码吗?谢谢

from tdesign-miniprogram.

LeeJim avatar LeeJim commented on June 1, 2024

我懂你的意思了。 你的 format 函数里会依赖异步的数据。 那你可以再获取数据之后,再重复设置一下 format

请问您说的重置一下是什么意思?可以给个实例代码吗?谢谢

就是重新setData(format: () => {})

from tdesign-miniprogram.

icetofyt avatar icetofyt commented on June 1, 2024

请问这个问题最后是怎么解决的?

from tdesign-miniprogram.

guluuwater avatar guluuwater commented on June 1, 2024

请问这个问题最后是怎么解决的?
根据前面老哥的提示,我是这样整的,你可以参考下:
1、data中正常定义format,可以让他什么也不做,只返回day
data: {
format(day) { return day }
}
2、从服务端拿到数据后的处理方式:
fetchData() {
// 获取数据
...
this.setData({
format: function(day) {
// 对指定的day进行处理
...
// 处理后返回
return day;
}
})
}

from tdesign-miniprogram.

landhuang avatar landhuang commented on June 1, 2024

我试了,达不到预期的效果,照着样例的写法,把format的内容写到按钮里面,点击按钮,调用成功,没有提示错误,但是样式没有任何变化。

from tdesign-miniprogram.

Related Issues (20)

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.