@ibiz-template/vue3-components 0.7.0 → 0.7.1

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.
@@ -152,6 +152,9 @@ const ViewMessage = /* @__PURE__ */ defineComponent({
152
152
  });
153
153
  })]);
154
154
  };
155
+ if (!this.items.length) {
156
+ return;
157
+ }
155
158
  if (this.items.length > 1 && this.scroll) {
156
159
  return renderScrollMessages();
157
160
  }
@@ -42,12 +42,13 @@ const FormRawItem = /* @__PURE__ */ defineComponent({
42
42
  rawItemContent = rawItemModel.content;
43
43
  }
44
44
  if (rawItemContent && rawItemModel.templateMode) {
45
- content.value = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
45
+ rawItemContent = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
46
46
  data: {
47
47
  ...newVal
48
48
  }
49
49
  }));
50
50
  }
51
+ content.value = rawItemContent;
51
52
  }
52
53
  }, {
53
54
  immediate: true
@@ -16,6 +16,7 @@ export declare const IBizPanelIndexViewSearch: import("@ibiz-template/vue3-util"
16
16
  c: import("@ibiz-template/runtime").PanelItemController<import("@ibiz/model-core").IPanelItem>;
17
17
  query: import("vue").Ref<string>;
18
18
  menuAlign: import("vue").ComputedRef<string>;
19
+ onEnter: (event: KeyboardEvent) => void;
19
20
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
20
21
  modelData: {
21
22
  type: import("vue").PropType<import("@ibiz/model-core").IPanelRawItem>;
@@ -20,6 +20,7 @@ export declare const PanelIndexViewSearch: import("vue").DefineComponent<{
20
20
  c: PanelItemController<import("@ibiz/model-core").IPanelItem>;
21
21
  query: import("vue").Ref<string>;
22
22
  menuAlign: import("vue").ComputedRef<string>;
23
+ onEnter: (event: KeyboardEvent) => void;
23
24
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
24
25
  modelData: {
25
26
  type: PropType<IPanelRawItem>;
@@ -58,11 +58,16 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
58
58
  tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
59
59
  await ibiz.commands.execute(AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, {
60
60
  ...tempParam,
61
- query: query.value
61
+ srfquery: query.value
62
62
  }, {});
63
63
  }
64
64
  }
65
65
  };
66
+ const onEnter = (event) => {
67
+ if (event.key === "Enter") {
68
+ onSearch();
69
+ }
70
+ };
66
71
  return {
67
72
  ns,
68
73
  classArr,
@@ -71,7 +76,8 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
71
76
  onSearch,
72
77
  c,
73
78
  query,
74
- menuAlign
79
+ menuAlign,
80
+ onEnter
75
81
  };
76
82
  },
77
83
  render() {
@@ -85,7 +91,8 @@ const PanelIndexViewSearch = /* @__PURE__ */ defineComponent({
85
91
  "class": this.ns.b("search"),
86
92
  "placeholder": ibiz.i18n.t("component.indexSearch.placeholder"),
87
93
  "onInput": this.onInput,
88
- "onChange": this.onSearch
94
+ "onChange": this.onSearch,
95
+ "onKeyup": this.onEnter
89
96
  }, {
90
97
  prefix: () => {
91
98
  return createVNode("ion-icon", {
@@ -60,6 +60,11 @@ class TabSearchViewEngine extends TabExpViewEngine {
60
60
  this.calcViewParams();
61
61
  });
62
62
  }
63
+ if (this.tabExpPanel) {
64
+ this.tabExpPanel.evt.on("onTabChange", () => {
65
+ this.calcViewParams();
66
+ });
67
+ }
63
68
  }
64
69
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
65
70
  async call(key, args) {
@@ -154,6 +154,9 @@ const ViewMessage = /* @__PURE__ */ vue.defineComponent({
154
154
  });
155
155
  })]);
156
156
  };
157
+ if (!this.items.length) {
158
+ return;
159
+ }
157
160
  if (this.items.length > 1 && this.scroll) {
158
161
  return renderScrollMessages();
159
162
  }
@@ -46,12 +46,13 @@ const FormRawItem = /* @__PURE__ */ vue.defineComponent({
46
46
  rawItemContent = rawItemModel.content;
47
47
  }
48
48
  if (rawItemContent && rawItemModel.templateMode) {
49
- content.value = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
49
+ rawItemContent = await ibiz.util.hbs.render(rawItemContent.replaceAll("//n", "\n"), Object.assign(obj, {
50
50
  data: {
51
51
  ...newVal
52
52
  }
53
53
  }));
54
54
  }
55
+ content.value = rawItemContent;
55
56
  }
56
57
  }, {
57
58
  immediate: true
@@ -60,11 +60,16 @@ const PanelIndexViewSearch = /* @__PURE__ */ vue.defineComponent({
60
60
  tempContext.srfappid = targetMenu.appId || ibiz.env.appId;
61
61
  await ibiz.commands.execute(runtime.AppFuncCommand.TAG, targetMenu.appFuncId, tempContext, {
62
62
  ...tempParam,
63
- query: query.value
63
+ srfquery: query.value
64
64
  }, {});
65
65
  }
66
66
  }
67
67
  };
68
+ const onEnter = (event) => {
69
+ if (event.key === "Enter") {
70
+ onSearch();
71
+ }
72
+ };
68
73
  return {
69
74
  ns,
70
75
  classArr,
@@ -73,7 +78,8 @@ const PanelIndexViewSearch = /* @__PURE__ */ vue.defineComponent({
73
78
  onSearch,
74
79
  c,
75
80
  query,
76
- menuAlign
81
+ menuAlign,
82
+ onEnter
77
83
  };
78
84
  },
79
85
  render() {
@@ -87,7 +93,8 @@ const PanelIndexViewSearch = /* @__PURE__ */ vue.defineComponent({
87
93
  "class": this.ns.b("search"),
88
94
  "placeholder": ibiz.i18n.t("component.indexSearch.placeholder"),
89
95
  "onInput": this.onInput,
90
- "onChange": this.onSearch
96
+ "onChange": this.onSearch,
97
+ "onKeyup": this.onEnter
91
98
  }, {
92
99
  prefix: () => {
93
100
  return vue.createVNode("ion-icon", {
@@ -62,6 +62,11 @@ class TabSearchViewEngine extends tabExpView_engine.TabExpViewEngine {
62
62
  this.calcViewParams();
63
63
  });
64
64
  }
65
+ if (this.tabExpPanel) {
66
+ this.tabExpPanel.evt.on("onTabChange", () => {
67
+ this.calcViewParams();
68
+ });
69
+ }
65
70
  }
66
71
  // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/explicit-module-boundary-types
67
72
  async call(key, args) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -30,12 +30,12 @@
30
30
  "@floating-ui/dom": "^1.5.3",
31
31
  "@ibiz-template-plugin/ai-chat": "^0.0.1",
32
32
  "@ibiz-template-plugin/gantt": "0.1.3-alpha.46",
33
- "@ibiz-template/core": "0.7.0",
33
+ "@ibiz-template/core": "0.7.1",
34
34
  "@ibiz-template/devtool": "0.0.1-dev.6",
35
- "@ibiz-template/model-helper": "0.7.0",
36
- "@ibiz-template/runtime": "0.7.0",
35
+ "@ibiz-template/model-helper": "0.7.1",
36
+ "@ibiz-template/runtime": "0.7.1",
37
37
  "@ibiz-template/theme": "^0.7.0",
38
- "@ibiz-template/vue3-util": "0.7.0",
38
+ "@ibiz-template/vue3-util": "0.7.1",
39
39
  "@ibiz-template/web-theme": "^1.1.15",
40
40
  "@ibiz/model-core": "^0.1.20",
41
41
  "@imengyu/vue3-context-menu": "^1.3.5",