diff --git a/locales/en.yaml b/locales/en.yaml
index 3793277b1..755b99860 100644
--- a/locales/en.yaml
+++ b/locales/en.yaml
@@ -83,6 +83,7 @@ menus:
pureFive: "500"
pureComponents: Components
pureDialog: Dialog
+ pureDrawer: Drawer
pureMessage: Message Tips
pureVideo: Video
pureSegmented: Segmented
@@ -233,4 +234,4 @@ login:
purePassWordRuleReg: The password format should be any combination of 8-18 digits
purePassWordSureReg: Please enter confirm password
purePassWordDifferentReg: The two passwords do not match!
- purePassWordUpdateReg: Password has been updated
\ No newline at end of file
+ purePassWordUpdateReg: Password has been updated
diff --git a/locales/zh-CN.yaml b/locales/zh-CN.yaml
index 7be27a8ec..bf3bf5a33 100644
--- a/locales/zh-CN.yaml
+++ b/locales/zh-CN.yaml
@@ -83,6 +83,7 @@ menus:
pureFive: "500"
pureComponents: 组件
pureDialog: 函数式弹框
+ pureDrawer: 函数式抽屉
pureMessage: 消息提示
pureVideo: 视频
pureSegmented: 分段控制器
diff --git a/src/router/modules/components.ts b/src/router/modules/components.ts
index 830cea5d9..053840169 100644
--- a/src/router/modules/components.ts
+++ b/src/router/modules/components.ts
@@ -18,6 +18,14 @@ export default {
title: $t("menus.pureDialog")
}
},
+ {
+ path: "/components/drawer",
+ name: "DrawerPage",
+ component: () => import("@/views/components/drawer/index.vue"),
+ meta: {
+ title: $t("menus.pureDrawer")
+ }
+ },
{
path: "/components/message",
name: "Message",
diff --git a/src/views/components/drawer/form.vue b/src/views/components/drawer/form.vue
new file mode 100644
index 000000000..f5383d6a4
--- /dev/null
+++ b/src/views/components/drawer/form.vue
@@ -0,0 +1,47 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/components/drawer/formPrimitive.vue b/src/views/components/drawer/formPrimitive.vue
new file mode 100644
index 000000000..af4bc34c5
--- /dev/null
+++ b/src/views/components/drawer/formPrimitive.vue
@@ -0,0 +1,22 @@
+
+
+
+
+
diff --git a/src/views/components/drawer/index.vue b/src/views/components/drawer/index.vue
new file mode 100644
index 000000000..c40f62898
--- /dev/null
+++ b/src/views/components/drawer/index.vue
@@ -0,0 +1,502 @@
+
+
+
+
+
+
+
+ 代码位置 src/views/components/drawer
+
+
+
+ 基础用法
+ 无背景遮罩层
+ 延时2秒打开抽屉
+ 延时2秒关闭抽屉
+
+ 不显示右上角关闭按钮图标
+
+ 禁止通过键盘ESC关闭
+
+ 禁止通过点击modal关闭
+
+ 隐藏底部取消、确定按钮
+ 自定义头部
+ 自定义底部
+ 自定义底部按钮
+ 打开后的回调
+ 关闭后的回调
+ 嵌套的抽屉
+ 更改抽屉自身属性值
+ popConfirm确认框
+
+
+
+
+ 结合Form表单(第一种方式)
+
+
+ 结合Form表单(第二种方式)
+
+
+ 结合Form表单(第三种方式)
+
+
+ 结合Form表单(第四种方式)
+
+
+ 子组件 prop 为 primitive 类型
+
+
+
+
+
+ 点击底部取消按钮的回调(会暂停抽屉的关闭)
+
+
+ 点击底部确定按钮的回调(会暂停抽屉的关闭,经常用于新增、修改抽屉内容后调用接口)
+
+
+ 点击底部确定按钮可开启按钮动画
+
+
+
+