@dcloudio/uni-template-compiler 2.0.2-5000720260410001 → 2.0.2-5010420260703001

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -146,6 +146,7 @@ const tags = {
146
146
  'subscribe-message',
147
147
  'mpass-component',
148
148
  'ad-feeds',
149
+ 'open-avatar',
149
150
  ...nativeTags
150
151
  ],
151
152
  // 抖音小程序平台独有组件
@@ -97,7 +97,9 @@ module.exports = function processClass (paths, path, state) {
97
97
  classValuePath.isMemberExpression() || // 需要优化到下一个条件,:class="item.classObject"
98
98
  classValuePath.isConditionalExpression() ||
99
99
  classValuePath.isLogicalExpression() ||
100
- classValuePath.isBinaryExpression()
100
+ classValuePath.isBinaryExpression() ||
101
+ classValuePath.isCallExpression() || // 支持函数调用,如 tools.cls(...)
102
+ classValuePath.isTemplateLiteral() // 支持模板字符串
101
103
  ) {
102
104
  // 理论上 ConditionalExpression,LogicalExpression 可能存在 classObject,应该__get_class,还是先不考虑这种情况吧
103
105
  // ConditionalExpression :class="index === currentIndex ? activeStyle : itemStyle"
@@ -163,7 +163,9 @@ module.exports = function processStyle (paths, path, state) {
163
163
  styleValuePath.isMemberExpression() || // TODO 需要优化到下一个条件,:style="item.styleObject"
164
164
  styleValuePath.isConditionalExpression() ||
165
165
  styleValuePath.isLogicalExpression() ||
166
- styleValuePath.isBinaryExpression()
166
+ styleValuePath.isBinaryExpression() ||
167
+ styleValuePath.isCallExpression() || // 支持函数调用,如 tools._style([customStyle])
168
+ styleValuePath.isTemplateLiteral() // 支持模板字符串
167
169
  ) {
168
170
  // 理论上 ConditionalExpression,LogicalExpression 可能存在 styleObject,应该__get_style,还是先不考虑这种情况吧
169
171
  // ConditionalExpression :style="index === currentIndex ? activeStyle : itemStyle"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-template-compiler",
3
- "version": "2.0.2-5000720260410001",
3
+ "version": "2.0.2-5010420260703001",
4
4
  "description": "uni-template-compiler",
5
5
  "main": "lib/index.js",
6
6
  "repository": {
@@ -23,5 +23,5 @@
23
23
  "@babel/types": "^7.3.3",
24
24
  "vue-template-compiler": "^2.6.10"
25
25
  },
26
- "gitHead": "82deb22abba40f01d10a6a4deb83b418e0adc266"
26
+ "gitHead": "1c5133598ec498d2b70a910c263433697d8dcc0e"
27
27
  }