We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
官网示例配置:
const config = { plugins: [ ['@tarojs/plugin-inject', { components: { View: { 'data-index': "'dataIndex'" }, ScrollView: { 'data-observe': "'dataObserve'", } } }] ] }
编译后: <View data-index='dataIndex'></View>
<View data-index='dataIndex'></View>
这样设置后,每个View上的data-index都是预设的 ‘dataIndex’,但我希望这个dataIndex是代码中动态设置的,请问我该如何做?
The text was updated successfully, but these errors were encountered:
我的需求是在css中伪类的 content: attr(data-xxx) 使用在模板中动态 data-xxx 设置的值
Sorry, something went wrong.
官网示例配置: const config = { plugins: [ ['@tarojs/plugin-inject', { components: { View: { 'data-index': "'dataIndex'" }, ScrollView: { 'data-observe': "'dataObserve'", } } }] ] } 编译后: <View data-index='dataIndex'></View> 这样设置后,每个View上的data-index都是预设的 ‘dataIndex’,但我希望这个dataIndex是代码中动态设置的,请问我该如何做?
您好,请问解决了吗?有同样的问题
我是编译小程序,可以看一下编译出来的dist文件下base.qml里对应的template(直接搜新增的属性就可以找到),讲道理效果应该类似这样,但我一直编译出来是 data-content="{{i.p0)}}",所以没用,改成这样就可以了⬇️
Text: { 'data-content': 'i.dataContent' } <Text dataContent='test'>
No branches or pull requests
官网示例配置:
const config = { plugins: [ ['@tarojs/plugin-inject', { components: { View: { 'data-index': "'dataIndex'" }, ScrollView: { 'data-observe': "'dataObserve'", } } }] ] }
编译后:
<View data-index='dataIndex'></View>
这样设置后,每个View上的data-index都是预设的 ‘dataIndex’,但我希望这个dataIndex是代码中动态设置的,请问我该如何做?
The text was updated successfully, but these errors were encountered: