From 30b46c141dc38fde9ea439c78654041f69c27c75 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B0=B1=E7=9C=A0=E5=84=80=E5=BC=8F?= <854085467@qq.com> Date: Fri, 21 Oct 2022 22:26:39 +0800 Subject: [PATCH] =?UTF-8?q?=E2=9C=A8(component):=20update?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package/component/src/component/cascader/index.vue | 9 +++------ package/component/src/component/input/index.vue | 2 -- package/component/src/language/locales/en_US.ts | 2 +- package/component/src/language/locales/zh_CN.ts | 4 ++-- .../src/document/zh-CN/guide/changelog.md | 4 +++- 5 files changed, 9 insertions(+), 12 deletions(-) diff --git a/package/component/src/component/cascader/index.vue b/package/component/src/component/cascader/index.vue index 83bf4350..935880d2 100644 --- a/package/component/src/component/cascader/index.vue +++ b/package/component/src/component/cascader/index.vue @@ -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(), { 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(""); 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); diff --git a/package/component/src/component/input/index.vue b/package/component/src/component/input/index.vue index 2e4e3da3..d847f626 100644 --- a/package/component/src/component/input/index.vue +++ b/package/component/src/component/input/index.vue @@ -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(); -const { t } = useI18n(); const slots = useSlots(); const type = ref(props.type); const currentValue = ref( diff --git a/package/component/src/language/locales/en_US.ts b/package/component/src/language/locales/en_US.ts index 4e564e09..6e01ab82 100644 --- a/package/component/src/language/locales/en_US.ts +++ b/package/component/src/language/locales/en_US.ts @@ -1,6 +1,6 @@ export default { input: { - hello: "hello world", + placeholder: "please input", }, page: { prev: "prev", diff --git a/package/component/src/language/locales/zh_CN.ts b/package/component/src/language/locales/zh_CN.ts index fc137e89..7b8a56a1 100644 --- a/package/component/src/language/locales/zh_CN.ts +++ b/package/component/src/language/locales/zh_CN.ts @@ -1,9 +1,9 @@ export default { input: { - hello: "你好世界", + placeholder: "请输入", }, page: { prev: "上一页", next: "下一页", - }, + } }; diff --git a/package/document-component/src/document/zh-CN/guide/changelog.md b/package/document-component/src/document/zh-CN/guide/changelog.md index b7bdd486..0e7c4db1 100644 --- a/package/document-component/src/document/zh-CN/guide/changelog.md +++ b/package/document-component/src/document/zh-CN/guide/changelog.md @@ -18,17 +18,19 @@
  • [新增] select 组件 contentClass 属性, 用于自定义内容区域 class 属性。
  • [新增] select 组件 contentStyle 属性, 用于自定义内容区域 style 属性。
  • -
  • [新增] icon-picker 组件 disabled 属性, 禁用图标选择。
  • +
  • [新增] icon-picker 组件 disabled 属性, 禁用颜色选择。
  • [新增] icon-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。
  • [新增] icon-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。
  • [新增] color-picker 组件 disabled 属性, 禁用图标选择。
  • [新增] color-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。
  • [新增] color-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。
  • +
  • [新增] cascader 组件 disabled 属性, 禁用数据选择。
  • [新增] cascader 组件 contentClass 属性, 用于自定义内容区域 class 属性。
  • [新增] cascader 组件 contentStyle 属性, 用于自定义内容区域 style 属性。
  • [新增] date-picker 组件 contentClass 属性, 用于自定义内容区域 class 属性。
  • [新增] date-picker 组件 contentStyle 属性, 用于自定义内容区域 style 属性。
  • [修复] date-picker 组件 type 属性为 date 值, range 属性为 true 时, 结束月份出现 13 月的问题。
  • +
  • [修复] space 组件 size 属性使用内置 string ['md','sm'] 不生效的问题。