From 61fd9be6bba19ebbbd0c540e995f44c305569e10 Mon Sep 17 00:00:00 2001 From: jzaaa <2509642078@qq.com> Date: Mon, 29 May 2023 15:19:48 +0800 Subject: [PATCH 1/2] =?UTF-8?q?checkbox=20=E6=96=B0=E5=A2=9Ename=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/views/checkbox/Checkbox.vue | 16 ++++++++-------- packages/checkbox/src/checkbox.js | 4 +++- types/checkbox.d.ts | 4 ++++ 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/examples/views/checkbox/Checkbox.vue b/examples/views/checkbox/Checkbox.vue index da8621845f..eba3e7f303 100644 --- a/examples/views/checkbox/Checkbox.vue +++ b/examples/views/checkbox/Checkbox.vue @@ -4,14 +4,14 @@
复选框、复选组
-
diff --git a/packages/checkbox/src/checkbox.js b/packages/checkbox/src/checkbox.js index a93a580bfc..213c0dc2ac 100644 --- a/packages/checkbox/src/checkbox.js +++ b/packages/checkbox/src/checkbox.js @@ -9,6 +9,7 @@ export default { props: { value: [String, Number, Boolean], label: [String, Number], + name: String, indeterminate: Boolean, title: [String, Number], content: [String, Number], @@ -68,7 +69,8 @@ export default { class: 'vxe-checkbox--input', attrs: { type: 'checkbox', - disabled: isDisabled + disabled: isDisabled, + name: this.name }, domProps: { checked: isChecked diff --git a/types/checkbox.d.ts b/types/checkbox.d.ts index 6d867be7c8..046911f18d 100644 --- a/types/checkbox.d.ts +++ b/types/checkbox.d.ts @@ -8,6 +8,10 @@ export declare class Checkbox extends VXETableComponent { * 绑定值 */ value?: boolean; + /** + * 原生 name 属性 + */ + name?: string; /** * 只对 checkbox-group 有效,值 */ From 395ade0979b66f13d4fb5ab3b966a44c0b003b27 Mon Sep 17 00:00:00 2001 From: jzaaa <2509642078@qq.com> Date: Mon, 29 May 2023 15:20:01 +0800 Subject: [PATCH 2/2] =?UTF-8?q?select=20=E6=96=B0=E5=A2=9Ename=E5=8E=9F?= =?UTF-8?q?=E7=94=9F=E5=B1=9E=E6=80=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/views/select/Select.vue | 8 ++++---- packages/select/src/select.js | 2 ++ types/select.d.ts | 4 ++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/examples/views/select/Select.vue b/examples/views/select/Select.vue index 10cd2e4288..c08e4d2c51 100644 --- a/examples/views/select/Select.vue +++ b/examples/views/select/Select.vue @@ -4,16 +4,16 @@
下拉框,查看
-