@dcloudio/uni-cli-shared 3.0.0-alpha-3021220211105003 → 3.0.0-alpha-3021220211105004

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.
@@ -1,9 +1,9 @@
1
- import { AttributeNode, ComponentNode, DirectiveNode, ElementNode, RootNode, TemplateChildNode, TransformContext } from '@vue/compiler-core';
1
+ import { AttributeNode, ComponentNode, DirectiveNode, ElementNode, RootNode, ExpressionNode, TemplateChildNode, TransformContext } from '@vue/compiler-core';
2
2
  export declare const VUE_REF = "r";
3
3
  export declare const VUE_REF_IN_FOR = "r-i-f";
4
4
  export declare function isUserComponent(node: RootNode | TemplateChildNode, context: TransformContext): node is ComponentNode;
5
5
  export declare function createAttributeNode(name: string, content: string): AttributeNode;
6
6
  export declare function addStaticClass(node: ElementNode, clazz: string): string | number | undefined;
7
- export declare function createDirectiveNode(name: string, arg: string, exp: string): DirectiveNode;
7
+ export declare function createDirectiveNode(name: string, arg: string, exp: string | ExpressionNode): DirectiveNode;
8
8
  export declare function createOnDirectiveNode(name: string, value: string): DirectiveNode;
9
- export declare function createBindDirectiveNode(name: string, value: string): DirectiveNode;
9
+ export declare function createBindDirectiveNode(name: string, value: string | ExpressionNode): DirectiveNode;
package/dist/vue/utils.js CHANGED
@@ -1,6 +1,7 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.createBindDirectiveNode = exports.createOnDirectiveNode = exports.createDirectiveNode = exports.addStaticClass = exports.createAttributeNode = exports.isUserComponent = exports.VUE_REF_IN_FOR = exports.VUE_REF = void 0;
4
+ const shared_1 = require("@vue/shared");
4
5
  const uni_shared_1 = require("@dcloudio/uni-shared");
5
6
  const compiler_core_1 = require("@vue/compiler-core");
6
7
  exports.VUE_REF = 'r';
@@ -51,7 +52,7 @@ function createDirectiveNode(name, arg, exp) {
51
52
  modifiers: [],
52
53
  loc: compiler_core_1.locStub,
53
54
  arg: (0, compiler_core_1.createSimpleExpression)(arg, true),
54
- exp: (0, compiler_core_1.createSimpleExpression)(exp, false),
55
+ exp: (0, shared_1.isString)(exp) ? (0, compiler_core_1.createSimpleExpression)(exp, false) : exp,
55
56
  };
56
57
  }
57
58
  exports.createDirectiveNode = createDirectiveNode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dcloudio/uni-cli-shared",
3
- "version": "3.0.0-alpha-3021220211105003",
3
+ "version": "3.0.0-alpha-3021220211105004",
4
4
  "description": "@dcloudio/uni-cli-shared",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -37,7 +37,7 @@
37
37
  "tapable": "^2.2.0",
38
38
  "xregexp": "3.1.0"
39
39
  },
40
- "gitHead": "e80ab2c07c1fe093fb69963be219d787251b8eac",
40
+ "gitHead": "42656641c7e53aab726888f124cd7da58c44e56a",
41
41
  "devDependencies": {
42
42
  "@types/hash-sum": "^1.0.0"
43
43
  }