@airpower/web 1.5.5 → 1.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.
Files changed (2) hide show
  1. package/dist/main.js +15 -14
  2. package/package.json +1 -1
package/dist/main.js CHANGED
@@ -14035,7 +14035,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14035
14035
  emits("clear");
14036
14036
  }
14037
14037
  const isClearButtonShow = ref(props.showClear);
14038
- const placeholderRef = ref(props.placeholder);
14039
14038
  const formConfig = ref(void 0);
14040
14039
  const fieldConfig = ref(void 0);
14041
14040
  const fieldName = ref("");
@@ -14166,26 +14165,28 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
14166
14165
  if (props.entity && fieldName.value) {
14167
14166
  formConfig.value = getFormConfig(props.entity, fieldName.value);
14168
14167
  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
14168
  }
14182
- dictionary.value = props.list ? props.list : formConfig.value && fieldConfig.value?.dictionary ? fieldConfig.value.dictionary.toArray() : void 0;
14183
14169
  if (props.modelValue === void 0 && formConfig.value?.defaultValue !== void 0) {
14184
14170
  value.value = formConfig.value.defaultValue;
14185
14171
  emitValue();
14186
14172
  }
14187
14173
  onPropsValueUpdated(props);
14188
14174
  }
14175
+ const placeholderRef = computed(() => {
14176
+ if (fieldConfig.value && props.entity) {
14177
+ if (formConfig.value) {
14178
+ if (dictionary.value || fieldConfig.value?.dictionary || props.list || props.tree || formConfig.value.dateType !== void 0) {
14179
+ return WebI18n.get().SelectPlease;
14180
+ }
14181
+ if (formConfig.value.placeholder) {
14182
+ return formConfig.value.placeholder;
14183
+ }
14184
+ }
14185
+ const field = fieldConfig.value.label || getFieldConfig(props.entity, fieldName.value).label || fieldName;
14186
+ return `请输入${field}...`;
14187
+ }
14188
+ return props.placeholder || "请输入...";
14189
+ });
14189
14190
  const slots = useSlots();
14190
14191
  init();
14191
14192
  return (_ctx, _cache) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@airpower/web",
3
3
  "type": "module",
4
- "version": "1.5.5",
4
+ "version": "1.5.6",
5
5
  "description": "AirPower-Web",
6
6
  "author": {
7
7
  "name": "Hamm",