This commit is contained in:
2024-10-22 09:09:41 +08:00
parent ef869c5ab1
commit 3a9b2d55c6
99 changed files with 4506 additions and 3465 deletions

View File

@@ -1,5 +1,5 @@
import { w as withInstall } from "../badge/index2.js";
import { openBlock, createElementBlock, createElementVNode, defineComponent, useSlots, ref, computed, watch, normalizeClass, unref, renderSlot, createCommentVNode, createBlock, createVNode, withModifiers } from "vue";
import { openBlock, createElementBlock, createElementVNode, defineComponent, useSlots, ref, computed, watch, normalizeClass, unref, renderSlot, createCommentVNode, createBlock, normalizeStyle, createVNode, withModifiers } from "vue";
import { _ as _sfc_main$2W } from "../_chunks/@layui/index.js";
import { _ as _export_sfc } from "../dropdownMenu/index2.js";
var index = /* @__PURE__ */ (() => ":root{--input-border-radius: var(--global-border-radius);--input-border-color: var(--global-neutral-color-3)}.layui-input{width:100%;height:38px;line-height:38px;border-width:1px;border-style:solid;border-color:var(--input-border-color);border-radius:var(--input-border-radius);display:inline-flex}.layui-input input{height:38px;line-height:38px;background-color:#fff;color:#000000d9;padding-left:10px;display:inline-block;border:none;height:100%;width:100%}.layui-input-append{background-color:#fafafa;border-left:1px solid var(--input-border-color);display:flex;padding:0 15px;flex:none;align-items:center}.layui-input-prepend{background-color:#fafafa;border-right:1px solid var(--input-border-color);display:flex;padding:0 15px;flex:none;align-items:center}.layui-input-wrapper{width:100%;display:inline-flex;border:none}.layui-input:hover,.layui-input:focus-within{border-color:#d2d2d2}.layui-input-clear,.layui-input-prefix,.layui-input-suffix,.layui-input-password{background-color:#fff}.layui-input-clear,.layui-input-password,.layui-input-prefix,.layui-input-suffix{display:flex;flex:none;align-items:center;padding:0 10px}.layui-input-has-prefix input{padding:0}.layui-input-clear,.layui-input-password{color:#00000073}.layui-input-clear:hover{opacity:.6}.layui-input input::-webkit-input-placeholder{line-height:1.3}.layui-input input::-ms-reveal{display:none}.layui-input-disabled{border-color:var(--input-border-color)!important}.layui-input-disabled{opacity:.6}.layui-input-disabled,.layui-input-disabled *{cursor:not-allowed!important}.layui-input[size=lg]{height:44px}.layui-input[size=lg] .layui-input{height:44px;line-height:44px}.layui-input[size=md]{height:38px}.layui-input[size=md] .layui-input{height:38px;line-height:38px}.layui-input[size=sm]{height:32px}.layui-input[size=sm] .layui-input{height:32px;line-height:32px}.layui-input[size=xs]{height:26px}.layui-input[size=xs] .layui-input{height:26px;line-height:26px}\n")();
@@ -88,14 +88,17 @@ const _sfc_main = defineComponent({
maxlength: null,
max: null,
min: null,
qfw: { type: Boolean, default: false }
qfw: { type: Boolean, default: false },
align: { default: "left" }
},
emits: ["blur", "input", "update:modelValue", "change", "focus", "clear"],
setup(__props, { emit }) {
const props = __props;
const slots = useSlots();
const type = ref(props.type);
const currentValue = ref(String(props.modelValue == null ? "" : props.modelValue));
const currentValue = ref(
String(props.modelValue == null ? "" : props.modelValue)
);
const hasContent = computed(() => {
var _a;
return ((_a = props.modelValue) == null ? void 0 : _a.length) > 0;
@@ -128,18 +131,26 @@ const _sfc_main = defineComponent({
return isNaN(parseInt(z)) ? 0 : z;
}
};
watch(() => props.type, () => {
type.value = props.type;
});
const input = ref();
watch(() => props.modelValue, () => {
console.log(input);
if (!(input.value == document.activeElement) && props.qfw) {
currentValue.value = formatMoney(props.modelValue.toString());
return;
watch(
() => props.type,
() => {
type.value = props.type;
}
currentValue.value = String(props.modelValue == null ? "" : props.modelValue);
});
);
const input = ref();
watch(
() => props.modelValue,
() => {
console.log(input);
if (!(input.value == document.activeElement) && props.qfw) {
currentValue.value = formatMoney(props.modelValue.toString());
return;
}
currentValue.value = String(
props.modelValue == null ? "" : props.modelValue
);
}
);
const onInput = function(event) {
const inputElement = event.target;
let value = inputElement.value;
@@ -234,6 +245,9 @@ const _sfc_main = defineComponent({
}, null, 8, ["type"]))
])) : createCommentVNode("", true),
createElementVNode("input", {
style: normalizeStyle({
textAlign: __props.align
}),
type: type.value,
name: __props.name,
disabled: __props.disabled,
@@ -253,7 +267,7 @@ const _sfc_main = defineComponent({
onCompositionend,
ref_key: "input",
ref: input
}, null, 40, _hoisted_5),
}, null, 44, _hoisted_5),
__props.password && unref(hasContent) ? (openBlock(), createElementBlock("span", {
key: 1,
class: "layui-input-password",