✨(component): update
This commit is contained in:
parent
4393b1c1d2
commit
30b46c141d
@ -8,9 +8,9 @@
|
|||||||
:trigger="trigger"
|
:trigger="trigger"
|
||||||
:autoFitMinWidth="false"
|
:autoFitMinWidth="false"
|
||||||
:updateAtScroll="true"
|
:updateAtScroll="true"
|
||||||
|
:disabled="disabled"
|
||||||
:contentClass="contentClass"
|
:contentClass="contentClass"
|
||||||
:contentStyle="contentStyle"
|
:contentStyle="contentStyle"
|
||||||
:disabled="dropDownDisabled"
|
|
||||||
@show="openState = true"
|
@show="openState = true"
|
||||||
@hide="openState = false"
|
@hide="openState = false"
|
||||||
>
|
>
|
||||||
@ -86,6 +86,7 @@ export interface CascaderProps {
|
|||||||
decollator?: string;
|
decollator?: string;
|
||||||
placeholder?: string;
|
placeholder?: string;
|
||||||
onlyLastLevel?: boolean;
|
onlyLastLevel?: boolean;
|
||||||
|
disabled?: boolean;
|
||||||
replaceFields?: { label: string; value: string; children: string };
|
replaceFields?: { label: string; value: string; children: string };
|
||||||
allowClear?: boolean;
|
allowClear?: boolean;
|
||||||
size?: CascaderSize;
|
size?: CascaderSize;
|
||||||
@ -101,6 +102,7 @@ const props = withDefaults(defineProps<CascaderProps>(), {
|
|||||||
placeholder: "",
|
placeholder: "",
|
||||||
onlyLastLevel: false,
|
onlyLastLevel: false,
|
||||||
allowClear: false,
|
allowClear: false,
|
||||||
|
disabled: false,
|
||||||
size: "md",
|
size: "md",
|
||||||
trigger: "click",
|
trigger: "click",
|
||||||
replaceFields: () => {
|
replaceFields: () => {
|
||||||
@ -283,12 +285,10 @@ const selectBar = (item: any, selectIndex: number, parentIndex: number) => {
|
|||||||
const displayValue = ref<string | number>("");
|
const displayValue = ref<string | number>("");
|
||||||
const slots = useSlots();
|
const slots = useSlots();
|
||||||
const dropdownRef = ref();
|
const dropdownRef = ref();
|
||||||
const dropDownDisabled = ref(false);
|
|
||||||
|
|
||||||
//清除事件
|
//清除事件
|
||||||
const onClear = () => {
|
const onClear = () => {
|
||||||
displayValue.value = "";
|
displayValue.value = "";
|
||||||
dropDownDisabled.value = true;
|
|
||||||
let arr = JSON.parse(JSON.stringify(treeData.value));
|
let arr = JSON.parse(JSON.stringify(treeData.value));
|
||||||
for (let index = 0; index < arr.length; index++) {
|
for (let index = 0; index < arr.length; index++) {
|
||||||
arr[index].selectIndex = null;
|
arr[index].selectIndex = null;
|
||||||
@ -299,9 +299,6 @@ const onClear = () => {
|
|||||||
}
|
}
|
||||||
treeData.value = arr;
|
treeData.value = arr;
|
||||||
emit("update:modelValue", null);
|
emit("update:modelValue", null);
|
||||||
setTimeout(() => {
|
|
||||||
dropDownDisabled.value = false;
|
|
||||||
}, 0);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const openState = ref(false);
|
const openState = ref(false);
|
||||||
|
@ -8,7 +8,6 @@ export default {
|
|||||||
import "./index.less";
|
import "./index.less";
|
||||||
import { LayIcon } from "@layui/icons-vue";
|
import { LayIcon } from "@layui/icons-vue";
|
||||||
import { computed, ref, useSlots, watch } from "vue";
|
import { computed, ref, useSlots, watch } from "vue";
|
||||||
import { useI18n } from "../../language";
|
|
||||||
import PasswordIcon from "./svg/Password.vue";
|
import PasswordIcon from "./svg/Password.vue";
|
||||||
import UnPasswordIcon from "./svg/unPassword.vue";
|
import UnPasswordIcon from "./svg/unPassword.vue";
|
||||||
import { InputSize } from "./interface";
|
import { InputSize } from "./interface";
|
||||||
@ -51,7 +50,6 @@ interface InputEmits {
|
|||||||
|
|
||||||
const emit = defineEmits<InputEmits>();
|
const emit = defineEmits<InputEmits>();
|
||||||
|
|
||||||
const { t } = useI18n();
|
|
||||||
const slots = useSlots();
|
const slots = useSlots();
|
||||||
const type = ref(props.type);
|
const type = ref(props.type);
|
||||||
const currentValue = ref<string>(
|
const currentValue = ref<string>(
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
export default {
|
export default {
|
||||||
input: {
|
input: {
|
||||||
hello: "hello world",
|
placeholder: "please input",
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
prev: "prev",
|
prev: "prev",
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
export default {
|
export default {
|
||||||
input: {
|
input: {
|
||||||
hello: "你好世界",
|
placeholder: "请输入",
|
||||||
},
|
},
|
||||||
page: {
|
page: {
|
||||||
prev: "上一页",
|
prev: "上一页",
|
||||||
next: "下一页",
|
next: "下一页",
|
||||||
},
|
}
|
||||||
};
|
};
|
||||||
|
@ -18,17 +18,19 @@
|
|||||||
<ul>
|
<ul>
|
||||||
<li>[新增] select 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
<li>[新增] select 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
||||||
<li>[新增] select 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
<li>[新增] select 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
||||||
<li>[新增] icon-picker 组件 disabled 属性, 禁用图标选择。</li>
|
<li>[新增] icon-picker 组件 disabled 属性, 禁用颜色选择。</li>
|
||||||
<li>[新增] icon-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
<li>[新增] icon-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
||||||
<li>[新增] icon-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
<li>[新增] icon-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
||||||
<li>[新增] color-picker 组件 disabled 属性, 禁用图标选择。</li>
|
<li>[新增] color-picker 组件 disabled 属性, 禁用图标选择。</li>
|
||||||
<li>[新增] color-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
<li>[新增] color-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
||||||
<li>[新增] color-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
<li>[新增] color-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
||||||
|
<li>[新增] cascader 组件 disabled 属性, 禁用数据选择。</li>
|
||||||
<li>[新增] cascader 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
<li>[新增] cascader 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
||||||
<li>[新增] cascader 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
<li>[新增] cascader 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
||||||
<li>[新增] date-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
<li>[新增] date-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。</li>
|
||||||
<li>[新增] date-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
<li>[新增] date-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。</li>
|
||||||
<li>[修复] date-picker 组件 type 属性为 date 值, range 属性为 true 时, 结束月份出现 13 月的问题。</li>
|
<li>[修复] date-picker 组件 type 属性为 date 值, range 属性为 true 时, 结束月份出现 13 月的问题。</li>
|
||||||
|
<li>[修复] space 组件 size 属性使用内置 string ['md','sm'] 不生效的问题。</li>
|
||||||
</ul>
|
</ul>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user