你能不能数据绑定数据 - * HTML属性? [英] Can you not data-win-bind a data-* HTML attribute?

查看:62
本文介绍了你能不能数据绑定数据 - * HTML属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

示例:

< img data-win-bind =" src:icon; data-typelink:typelink" style =" width:730px; height:295px;" />

Example:
<img data-win-bind="src: icon; data-typelink: typelink" style="width: 730px;height: 295px;" />

我希望这会生成一个属性为 data-typelink =" category,44" 且data-typelink为属性的图片键入,并绑定到值的typelink。

I would expect this to make an image with an attribute of data-typelink="category,44" with data-typelink as the attribute type, and bound to the typelink for the value.

但似乎输出此属性和值:

< img style =" width:730px;身高:295像素;" SRC ="" data-win-bind =" src:icon; data-typelink:typelink">< / img>

But is seems to output this as the attribute and value:
<img style="width: 730px; height: 295px;" src="" data-win-bind="src: icon; data-typelink: typelink"></img>

似乎是一个主要错误,而不是data-win-bind来创建data- *属性。

Seems to be a major bug, than you cannot data-win-bind to create a data-* attribute.

推荐答案

Hi Harlequin,

Hi Harlequin,

在顶部我的脑子里我觉得可能确实有一个正在进行的模式检查导致了这种行为(虽然我确信有更好的专家会回答这个问题。)

Off the top of my head I am thinking that there is likely indeed a schema check that is going on which is causing this behavior (though I am sure there are better experts that will answer this).

我'我确定你想过重载一个不同的,非必要的属性来存储这些数据,但是我听到了你的痛苦。

I'm sure you thought of overloading a different, non-essential attribute to store this data, but I hear your pain.

我会做一些与namspaces一起玩。

I'll do a little playing with namspaces.


这篇关于你能不能数据绑定数据 - * HTML属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆