@airpower/web 1.5.7 → 1.5.9
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/main.js +17 -19
- package/package.json +1 -1
package/dist/main.js
CHANGED
|
@@ -14067,8 +14067,19 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14067
14067
|
}
|
|
14068
14068
|
return DateTimeFormatter.FULL_DATE_TIME;
|
|
14069
14069
|
});
|
|
14070
|
-
const dictionary = computed(() =>
|
|
14071
|
-
|
|
14070
|
+
const dictionary = computed(() => props.list ? props.list : formConfig.value && fieldConfig.value?.dictionary ? fieldConfig.value.dictionary.toArray() : void 0);
|
|
14071
|
+
const placeholderRef = computed(() => {
|
|
14072
|
+
if (props.placeholder) {
|
|
14073
|
+
return props.placeholder;
|
|
14074
|
+
}
|
|
14075
|
+
if (formConfig.value && formConfig.value.placeholder) {
|
|
14076
|
+
return formConfig.value.placeholder;
|
|
14077
|
+
}
|
|
14078
|
+
const fieldLabel = fieldConfig.value?.label || "";
|
|
14079
|
+
if (dictionary.value || fieldConfig.value?.dictionary || props.list || props.tree || formConfig.value?.dateType !== void 0) {
|
|
14080
|
+
return `${WebI18n.get().SelectPlease + fieldLabel}...`;
|
|
14081
|
+
}
|
|
14082
|
+
return `${WebI18n.get().InputPlease + fieldLabel}...`;
|
|
14072
14083
|
});
|
|
14073
14084
|
function getSwitchColor(status) {
|
|
14074
14085
|
return dictionary.value?.find((item) => !!item.key === status)?.color || "";
|
|
@@ -14091,6 +14102,9 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14091
14102
|
watch(props, (newProps) => {
|
|
14092
14103
|
isClearButtonShow.value = props.showClear;
|
|
14093
14104
|
onPropsValueUpdated(newProps);
|
|
14105
|
+
}, {
|
|
14106
|
+
immediate: true,
|
|
14107
|
+
deep: true
|
|
14094
14108
|
});
|
|
14095
14109
|
function checkNumberValue() {
|
|
14096
14110
|
if (formConfig.value?.number) {
|
|
@@ -14173,22 +14187,6 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14173
14187
|
}
|
|
14174
14188
|
onPropsValueUpdated(props);
|
|
14175
14189
|
}
|
|
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
|
-
});
|
|
14192
14190
|
const slots = useSlots();
|
|
14193
14191
|
init();
|
|
14194
14192
|
return (_ctx, _cache) => {
|
|
@@ -14239,7 +14237,7 @@ const _sfc_main$j = /* @__PURE__ */ defineComponent({
|
|
|
14239
14237
|
onFocus: emitFocus,
|
|
14240
14238
|
onKeydown: onKeyDown
|
|
14241
14239
|
}, null, 8, ["modelValue", "clearable", "disabled", "format", "placeholder", "prefix-icon", "readonly", "suffix-icon", "value-format"]))
|
|
14242
|
-
], 64)) : dictionary.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14240
|
+
], 64)) : __props.list || dictionary.value ? (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
|
14243
14241
|
formConfig.value?.switch ? (openBlock(), createBlock(_component_el_switch, {
|
|
14244
14242
|
key: 0,
|
|
14245
14243
|
modelValue: value.value,
|