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
初始化 sourceSlot 的时候没有支持循环的情况:https://github.com/baidu/san/blob/master/src/view/component.js#L340
比如下面的代码:
var Folder = san.defineComponent({ template: '<div><div s-for="i in repeat" class="slot-wrapper repeat-{{i}}"><slot name="cc-{{i}}"/></div></div>', initData: function () { return {repeat: [1,2]} } }); var MyComponent = san.defineComponent({ components: { 'x-folder': Folder }, initData: function () { return {repeat: [1,2]} }, template: '' + '<div>' + '<x-folder hidden="{{folderHidden}}"><b s-for="i in repeat" slot="cc-{{i}}">{{name}}</b></x-folder>' + '</div>' });
这种写法的作用一般是为了给所有子节点的外层都套一层dom
The text was updated successfully, but these errors were encountered:
No branches or pull requests
初始化 sourceSlot 的时候没有支持循环的情况:https://github.com/baidu/san/blob/master/src/view/component.js#L340
比如下面的代码:
这种写法的作用一般是为了给所有子节点的外层都套一层dom
The text was updated successfully, but these errors were encountered: