@vtj/designer 0.8.1 → 0.8.2

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.
package/dist/index.mjs CHANGED
@@ -12,16 +12,16 @@ import ps from "mockjs";
12
12
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
13
13
  * @name @vtj/designer
14
14
  * @author CHC chenhuachun1549@dingtalk.com
15
- * @version 0.8.1
15
+ * @version 0.8.2
16
16
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
17
17
  */
18
- const ms = "0.8.1", Rt = {
18
+ const ms = "0.8.2", Rt = {
19
19
  width: 390,
20
20
  height: 844
21
21
  }, Tt = {
22
22
  width: 1180,
23
23
  height: 820
24
- }, Ce = /^[A-Za-z_$][\w_-]*$/, vs = [
24
+ }, Ce = /^[A-Za-z_$][\:\w_-]*$/, vs = [
25
25
  "click",
26
26
  "dblclick",
27
27
  "mouseenter",
@@ -212,7 +212,7 @@ function Cs(c, e) {
212
212
  const d = i.inject.map((F) => `this.${F.name}`);
213
213
  d.length && m.push({ title: "注入", items: d });
214
214
  const _ = i.props.map(
215
- (F) => typeof F == "string" ? `this.$props.${F}` : `this.$props.${F.name}`
215
+ (F) => typeof F == "string" ? `this.props.${F}` : `this.props.${F.name}`
216
216
  );
217
217
  _.length && m.push({ title: "属性", items: _ });
218
218
  const w = Object.keys(i.state).map((F) => `this.state.${F}`);
@@ -8253,7 +8253,7 @@ class Li {
8253
8253
  if (!e)
8254
8254
  return;
8255
8255
  const { engine: n } = this, l = n.assets, a = l.componentMap, o = await l.getBlockMaterial(e.from) || a.get(e.name);
8256
- if (!o?.slots)
8256
+ if (console.log("targetDesc", o), !o?.slots)
8257
8257
  return;
8258
8258
  const r = (o?.slots || ["default"]).map(
8259
8259
  (i) => typeof i == "string" ? {
@@ -8264,13 +8264,7 @@ class Li {
8264
8264
  params: i.params || []
8265
8265
  }
8266
8266
  );
8267
- if (r.length === 0)
8268
- return;
8269
- if (r.length === 1)
8270
- return r[0];
8271
- const s = await Mi(r).catch(() => null);
8272
- if (!(s && s.name === "default" && (!s.params || s.params?.length === 0)))
8273
- return s;
8267
+ return r.length === 0 ? void 0 : r.length === 1 ? r[0] : await Mi(r).catch(() => null);
8274
8268
  }
8275
8269
  async onDrop(e) {
8276
8270
  e.preventDefault();
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vtj/designer",
3
3
  "private": false,
4
- "version": "0.8.1",
4
+ "version": "0.8.2",
5
5
  "type": "module",
6
6
  "scripts": {
7
7
  "build": "vue-tsc && vite build",
@@ -10,11 +10,11 @@
10
10
  "coverage": "vitest run --coverage"
11
11
  },
12
12
  "dependencies": {
13
- "@vtj/core": "^0.8.1",
14
- "@vtj/icons": "^0.8.1",
15
- "@vtj/renderer": "^0.8.1",
16
- "@vtj/ui": "^0.8.1",
17
- "@vtj/utils": "^0.8.1",
13
+ "@vtj/core": "^0.8.2",
14
+ "@vtj/icons": "^0.8.2",
15
+ "@vtj/renderer": "^0.8.2",
16
+ "@vtj/ui": "^0.8.2",
17
+ "@vtj/utils": "^0.8.2",
18
18
  "mockjs": "~1.1.0",
19
19
  "monaco-editor": "~0.47.0"
20
20
  },
@@ -42,5 +42,5 @@
42
42
  "publishConfig": {
43
43
  "access": "public"
44
44
  },
45
- "gitHead": "56000d79e6dc07c9d86fda6ee8b746dca7bdcd93"
45
+ "gitHead": "a96756cbeb0e3f54a1e080243716df22b9e923ab"
46
46
  }
@@ -2,7 +2,7 @@
2
2
  * Copyright (c) 2024, VTJ.PRO All rights reserved.
3
3
  * @name @vtj/designer
4
4
  * @author CHC chenhuachun1549@dingtalk.com
5
- * @version 0.8.0
5
+ * @version 0.8.1
6
6
  * @license <a href="https://vtj.pro/license.html">MIT License</a>
7
7
  */
8
- export declare const version = "0.8.0";
8
+ export declare const version = "0.8.1";