@airpower/web 1.5.5 → 1.5.7
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/i18n/WebI18n.d.ts +1 -0
- package/dist/main.js +17 -14
- package/package.json +1 -1
package/dist/i18n/WebI18n.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -2165,6 +2165,7 @@ class WebI18n extends I18n {
|
|
|
2165
2165
|
AddSuccess = "添加成功";
|
|
2166
2166
|
DeleteSuccess = "删除成功";
|
|
2167
2167
|
SelectPlease = "请选择";
|
|
2168
|
+
InputPlease = "请输入";
|
|
2168
2169
|
DisableSuccess = "禁用成功";
|
|
2169
2170
|
EnableSuccess = "启用成功";
|
|
2170
2171
|
Confirm = "确定";
|
|
@@ -14035,7 +14036,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14035
14036
|
emits("clear");
|
|
14036
14037
|
}
|
|
14037
14038
|
const isClearButtonShow = ref(props.showClear);
|
|
14038
|
-
const placeholderRef = ref(props.placeholder);
|
|
14039
14039
|
const formConfig = ref(void 0);
|
|
14040
14040
|
const fieldConfig = ref(void 0);
|
|
14041
14041
|
const fieldName = ref("");
|
|
@@ -14166,26 +14166,29 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14166
14166
|
if (props.entity && fieldName.value) {
|
|
14167
14167
|
formConfig.value = getFormConfig(props.entity, fieldName.value);
|
|
14168
14168
|
fieldConfig.value = getFieldConfig(props.entity, fieldName.value);
|
|
14169
|
-
if (!placeholderRef.value) {
|
|
14170
|
-
const field = fieldConfig.value.label || getFieldConfig(props.entity, fieldName.value).label || fieldName;
|
|
14171
|
-
placeholderRef.value = `请输入${field}...`;
|
|
14172
|
-
if (formConfig.value) {
|
|
14173
|
-
if (dictionary.value || fieldConfig.value.dictionary || props.list || props.tree || formConfig.value.dateType !== void 0) {
|
|
14174
|
-
placeholderRef.value = WebI18n.get().SelectPlease;
|
|
14175
|
-
}
|
|
14176
|
-
if (formConfig.value.placeholder) {
|
|
14177
|
-
placeholderRef.value = formConfig.value.placeholder;
|
|
14178
|
-
}
|
|
14179
|
-
}
|
|
14180
|
-
}
|
|
14181
14169
|
}
|
|
14182
|
-
dictionary.value = props.list ? props.list : formConfig.value && fieldConfig.value?.dictionary ? fieldConfig.value.dictionary.toArray() : void 0;
|
|
14183
14170
|
if (props.modelValue === void 0 && formConfig.value?.defaultValue !== void 0) {
|
|
14184
14171
|
value.value = formConfig.value.defaultValue;
|
|
14185
14172
|
emitValue();
|
|
14186
14173
|
}
|
|
14187
14174
|
onPropsValueUpdated(props);
|
|
14188
14175
|
}
|
|
14176
|
+
const placeholderRef = computed(() => {
|
|
14177
|
+
if (formConfig.value && formConfig.value.placeholder) {
|
|
14178
|
+
return formConfig.value.placeholder;
|
|
14179
|
+
}
|
|
14180
|
+
if (props.placeholder) {
|
|
14181
|
+
return props.placeholder;
|
|
14182
|
+
}
|
|
14183
|
+
if (fieldConfig.value && props.entity) {
|
|
14184
|
+
const field = fieldConfig.value.label || getFieldConfig(props.entity, fieldName.value).label;
|
|
14185
|
+
if (dictionary.value || fieldConfig.value?.dictionary || props.list || props.tree || formConfig.value?.dateType !== void 0) {
|
|
14186
|
+
return `${WebI18n.get().SelectPlease + field}...`;
|
|
14187
|
+
}
|
|
14188
|
+
return `${WebI18n.get().InputPlease + field}...`;
|
|
14189
|
+
}
|
|
14190
|
+
return "请输入...";
|
|
14191
|
+
});
|
|
14189
14192
|
const slots = useSlots();
|
|
14190
14193
|
init();
|
|
14191
14194
|
return (_ctx, _cache) => {
|