能否将mixin参数绑定到vue实例?
我有一个用于渲染表格的mixin:
mixin table(header,data,type)
- var type = type || ""
table.table(class=type)
thead
tr
each head, i in header
th #{head}
tbody
each row,j in data
tr
each col,k in row
td #{col}
这可以像这样正常使用:
+table-striped(["#","First Name","Last Name","Username"],[["1","Mark","Otto","@mdo"],["2","Jacob","Thornton","@fat"],["3","Larry","the Bird","@twitter"]])
我的问题是是否可以从Vue实例中获取mixin的'header'和'data'参数。