✨(component): update
This commit is contained in:
@@ -8,9 +8,9 @@
|
||||
:trigger="trigger"
|
||||
:autoFitMinWidth="false"
|
||||
:updateAtScroll="true"
|
||||
:disabled="disabled"
|
||||
:contentClass="contentClass"
|
||||
:contentStyle="contentStyle"
|
||||
:disabled="dropDownDisabled"
|
||||
@show="openState = true"
|
||||
@hide="openState = false"
|
||||
>
|
||||
@@ -86,6 +86,7 @@ export interface CascaderProps {
|
||||
decollator?: string;
|
||||
placeholder?: string;
|
||||
onlyLastLevel?: boolean;
|
||||
disabled?: boolean;
|
||||
replaceFields?: { label: string; value: string; children: string };
|
||||
allowClear?: boolean;
|
||||
size?: CascaderSize;
|
||||
@@ -101,6 +102,7 @@ const props = withDefaults(defineProps<CascaderProps>(), {
|
||||
placeholder: "",
|
||||
onlyLastLevel: false,
|
||||
allowClear: false,
|
||||
disabled: false,
|
||||
size: "md",
|
||||
trigger: "click",
|
||||
replaceFields: () => {
|
||||
@@ -283,12 +285,10 @@ const selectBar = (item: any, selectIndex: number, parentIndex: number) => {
|
||||
const displayValue = ref<string | number>("");
|
||||
const slots = useSlots();
|
||||
const dropdownRef = ref();
|
||||
const dropDownDisabled = ref(false);
|
||||
|
||||
//清除事件
|
||||
const onClear = () => {
|
||||
displayValue.value = "";
|
||||
dropDownDisabled.value = true;
|
||||
let arr = JSON.parse(JSON.stringify(treeData.value));
|
||||
for (let index = 0; index < arr.length; index++) {
|
||||
arr[index].selectIndex = null;
|
||||
@@ -299,9 +299,6 @@ const onClear = () => {
|
||||
}
|
||||
treeData.value = arr;
|
||||
emit("update:modelValue", null);
|
||||
setTimeout(() => {
|
||||
dropDownDisabled.value = false;
|
||||
}, 0);
|
||||
};
|
||||
|
||||
const openState = ref(false);
|
||||
|
||||
@@ -8,7 +8,6 @@ export default {
|
||||
import "./index.less";
|
||||
import { LayIcon } from "@layui/icons-vue";
|
||||
import { computed, ref, useSlots, watch } from "vue";
|
||||
import { useI18n } from "../../language";
|
||||
import PasswordIcon from "./svg/Password.vue";
|
||||
import UnPasswordIcon from "./svg/unPassword.vue";
|
||||
import { InputSize } from "./interface";
|
||||
@@ -51,7 +50,6 @@ interface InputEmits {
|
||||
|
||||
const emit = defineEmits<InputEmits>();
|
||||
|
||||
const { t } = useI18n();
|
||||
const slots = useSlots();
|
||||
const type = ref(props.type);
|
||||
const currentValue = ref<string>(
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export default {
|
||||
input: {
|
||||
hello: "hello world",
|
||||
placeholder: "please input",
|
||||
},
|
||||
page: {
|
||||
prev: "prev",
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
export default {
|
||||
input: {
|
||||
hello: "你好世界",
|
||||
placeholder: "请输入",
|
||||
},
|
||||
page: {
|
||||
prev: "上一页",
|
||||
next: "下一页",
|
||||
},
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user