@ibiz-template/vue3-components 0.5.4 → 0.5.6

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.
@@ -115,7 +115,8 @@ const IBizActionToolbar = /* @__PURE__ */ defineComponent({
115
115
  }, {
116
116
  icon: () => createVNode("ion-icon", {
117
117
  "class": this.ns.e("icon"),
118
- "name": "ellipsis-vertical-outline"
118
+ "name": "ellipsis-vertical-outline",
119
+ "title": ibiz.i18n.t("component.actionToolbar.more")
119
120
  }, null)
120
121
  }), createVNode(resolveComponent("el-popover"), {
121
122
  "placement": "bottom-start",
@@ -19,6 +19,7 @@ const IBizAutoComplete = /* @__PURE__ */ defineComponent({
19
19
  const isShowAll = ref(true);
20
20
  const isEditable = ref(false);
21
21
  const editorRef = ref();
22
+ const isSearched = ref(false);
22
23
  const showFormDefaultContent = computed(() => {
23
24
  if (props.controlParams && props.controlParams.editmode === "hover") {
24
25
  return true;
@@ -42,8 +43,24 @@ const IBizAutoComplete = /* @__PURE__ */ defineComponent({
42
43
  }, 100);
43
44
  }
44
45
  };
45
- watch(() => props.value, (newVal) => {
46
+ const onSearch = async (query, cb) => {
47
+ if (c.model.appDataEntityId) {
48
+ const trimQuery = query.trim();
49
+ const res = await c.getServiceData(trimQuery, props.data);
50
+ if (res) {
51
+ items.value = res.data;
52
+ isSearched.value = true;
53
+ if (cb && cb instanceof Function) {
54
+ cb(items.value);
55
+ }
56
+ }
57
+ }
58
+ };
59
+ watch(() => props.value, async (newVal, oldVal) => {
46
60
  if (newVal || newVal === null) {
61
+ if (!isSearched.value && oldVal === void 0) {
62
+ await onSearch("");
63
+ }
47
64
  if (newVal === null) {
48
65
  curValue.value = "";
49
66
  }
@@ -71,19 +88,9 @@ const IBizAutoComplete = /* @__PURE__ */ defineComponent({
71
88
  isShowAll.value = true;
72
89
  setEditable(false);
73
90
  };
74
- const onSearch = async (query, cb) => {
75
- if (c.model.appDataEntityId) {
76
- const trimQuery = query.trim();
77
- const res = await c.getServiceData(trimQuery, props.data);
78
- if (res) {
79
- items.value = res.data;
80
- if (cb && cb instanceof Function) {
81
- cb(items.value);
82
- }
83
- }
84
- }
85
- };
86
- onSearch("");
91
+ if (props.value) {
92
+ onSearch("");
93
+ }
87
94
  const onClear = () => {
88
95
  const dataItems = c.dataItems;
89
96
  if (dataItems.length > 0) {
@@ -99,6 +99,9 @@ declare const _default: {
99
99
  gridSetting: {
100
100
  hideControl: string;
101
101
  };
102
+ actionToolbar: {
103
+ more: string;
104
+ };
102
105
  };
103
106
  editor: {};
104
107
  };
@@ -102,7 +102,10 @@ var index = {
102
102
  noSupportVideo: "Your browser does not support video tags"
103
103
  },
104
104
  gridSetting: {
105
- hideControl: "Table Column Hide Control"
105
+ hideControl: "Column selection"
106
+ },
107
+ actionToolbar: {
108
+ more: "More"
106
109
  }
107
110
  },
108
111
  // 编辑器
@@ -99,6 +99,9 @@ declare const _default: {
99
99
  gridSetting: {
100
100
  hideControl: string;
101
101
  };
102
+ actionToolbar: {
103
+ more: string;
104
+ };
102
105
  };
103
106
  editor: {};
104
107
  };
@@ -102,7 +102,10 @@ var index = {
102
102
  noSupportVideo: "\u4F60\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301video\u6807\u7B7E"
103
103
  },
104
104
  gridSetting: {
105
- hideControl: "\u8868\u683C\u5217\u9690\u85CF\u63A7\u5236"
105
+ hideControl: "\u5217\u9009\u62E9"
106
+ },
107
+ actionToolbar: {
108
+ more: "\u66F4\u591A"
106
109
  }
107
110
  },
108
111
  // 编辑器
@@ -117,7 +117,8 @@ const IBizActionToolbar = /* @__PURE__ */ vue.defineComponent({
117
117
  }, {
118
118
  icon: () => vue.createVNode("ion-icon", {
119
119
  "class": this.ns.e("icon"),
120
- "name": "ellipsis-vertical-outline"
120
+ "name": "ellipsis-vertical-outline",
121
+ "title": ibiz.i18n.t("component.actionToolbar.more")
121
122
  }, null)
122
123
  }), vue.createVNode(vue.resolveComponent("el-popover"), {
123
124
  "placement": "bottom-start",
@@ -21,6 +21,7 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
21
21
  const isShowAll = vue.ref(true);
22
22
  const isEditable = vue.ref(false);
23
23
  const editorRef = vue.ref();
24
+ const isSearched = vue.ref(false);
24
25
  const showFormDefaultContent = vue.computed(() => {
25
26
  if (props.controlParams && props.controlParams.editmode === "hover") {
26
27
  return true;
@@ -44,8 +45,24 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
44
45
  }, 100);
45
46
  }
46
47
  };
47
- vue.watch(() => props.value, (newVal) => {
48
+ const onSearch = async (query, cb) => {
49
+ if (c.model.appDataEntityId) {
50
+ const trimQuery = query.trim();
51
+ const res = await c.getServiceData(trimQuery, props.data);
52
+ if (res) {
53
+ items.value = res.data;
54
+ isSearched.value = true;
55
+ if (cb && cb instanceof Function) {
56
+ cb(items.value);
57
+ }
58
+ }
59
+ }
60
+ };
61
+ vue.watch(() => props.value, async (newVal, oldVal) => {
48
62
  if (newVal || newVal === null) {
63
+ if (!isSearched.value && oldVal === void 0) {
64
+ await onSearch("");
65
+ }
49
66
  if (newVal === null) {
50
67
  curValue.value = "";
51
68
  }
@@ -73,19 +90,9 @@ const IBizAutoComplete = /* @__PURE__ */ vue.defineComponent({
73
90
  isShowAll.value = true;
74
91
  setEditable(false);
75
92
  };
76
- const onSearch = async (query, cb) => {
77
- if (c.model.appDataEntityId) {
78
- const trimQuery = query.trim();
79
- const res = await c.getServiceData(trimQuery, props.data);
80
- if (res) {
81
- items.value = res.data;
82
- if (cb && cb instanceof Function) {
83
- cb(items.value);
84
- }
85
- }
86
- }
87
- };
88
- onSearch("");
93
+ if (props.value) {
94
+ onSearch("");
95
+ }
89
96
  const onClear = () => {
90
97
  const dataItems = c.dataItems;
91
98
  if (dataItems.length > 0) {
@@ -106,7 +106,10 @@ var index = {
106
106
  noSupportVideo: "Your browser does not support video tags"
107
107
  },
108
108
  gridSetting: {
109
- hideControl: "Table Column Hide Control"
109
+ hideControl: "Column selection"
110
+ },
111
+ actionToolbar: {
112
+ more: "More"
110
113
  }
111
114
  },
112
115
  // 编辑器
@@ -106,7 +106,10 @@ var index = {
106
106
  noSupportVideo: "\u4F60\u7684\u6D4F\u89C8\u5668\u4E0D\u652F\u6301video\u6807\u7B7E"
107
107
  },
108
108
  gridSetting: {
109
- hideControl: "\u8868\u683C\u5217\u9690\u85CF\u63A7\u5236"
109
+ hideControl: "\u5217\u9009\u62E9"
110
+ },
111
+ actionToolbar: {
112
+ more: "\u66F4\u591A"
110
113
  }
111
114
  },
112
115
  // 编辑器
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ibiz-template/vue3-components",
3
- "version": "0.5.4",
3
+ "version": "0.5.6",
4
4
  "description": "使用 rollup 编译 vue 组件或者 jsx",
5
5
  "main": "lib/index.cjs",
6
6
  "module": "es/index.mjs",
@@ -26,11 +26,11 @@
26
26
  "@floating-ui/dom": "^1.5.3",
27
27
  "@ibiz-template-plugin/ai-chat": "^0.0.1",
28
28
  "@ibiz-template-plugin/gantt": "0.1.1",
29
- "@ibiz-template/core": "^0.5.3",
30
- "@ibiz-template/model-helper": "^0.5.4",
31
- "@ibiz-template/runtime": "^0.5.4",
29
+ "@ibiz-template/core": "^0.5.6",
30
+ "@ibiz-template/model-helper": "^0.5.6",
31
+ "@ibiz-template/runtime": "^0.5.6",
32
32
  "@ibiz-template/theme": "^0.5.0",
33
- "@ibiz-template/vue3-util": "^0.5.4",
33
+ "@ibiz-template/vue3-util": "^0.5.6",
34
34
  "@ibiz/model-core": "^0.1.5",
35
35
  "@imengyu/vue3-context-menu": "^1.3.5",
36
36
  "@monaco-editor/loader": "^1.4.0",