From ad3d998752ebe51e77427356ebbb1e29cb5f3591 Mon Sep 17 00:00:00 2001 From: Xc <124118265@qq.com> Date: Sat, 14 May 2022 12:20:02 +0800 Subject: [PATCH] feat(components): [button] add link api (#7652) * feat: button add link type * fix: code lint * feat: button add link api * docs: edit word Co-authored-by: xiaochenchen --- breakings/2.2.1/button.yml | 12 ++++++ docs/en-US/component/button.md | 1 + docs/examples/button/link.vue | 36 ++++++++++++++++++ docs/examples/button/text.vue | 1 + .../button/__tests__/button.test.tsx | 8 ++++ packages/components/button/src/button.ts | 1 + packages/components/button/src/button.vue | 1 + packages/theme-chalk/src/button.scss | 38 ++++++++++++++++++- packages/theme-chalk/src/mixins/_button.scss | 3 +- 9 files changed, 99 insertions(+), 2 deletions(-) create mode 100644 breakings/2.2.1/button.yml create mode 100644 docs/examples/button/link.vue diff --git a/breakings/2.2.1/button.yml b/breakings/2.2.1/button.yml new file mode 100644 index 0000000000..6d5b5c74c0 --- /dev/null +++ b/breakings/2.2.1/button.yml @@ -0,0 +1,12 @@ +- scope: 'component' + name: 'el-button' + type: 'props' + version: '2.2.1' + commit_hash: '4a364f9' + description: | + Per [Link Button Request](https://github.com/element-plus/element-plus/issues/7610), we need to + add a `link` like button back for those uses link button. + props: + - api: 'link' + before: '' + after: 'boolean' diff --git a/docs/en-US/component/button.md b/docs/en-US/component/button.md index d7acaae93b..722df42ea5 100644 --- a/docs/en-US/component/button.md +++ b/docs/en-US/component/button.md @@ -116,6 +116,7 @@ button/custom | plain | determine whether it's a plain button | boolean | — | false | | text | determine whether it's a text button | boolean | — | false | | bg | determine whether the text button background color is always on | boolean | — | false | +| link | determine whether it's a link button | boolean | — | false | | round | determine whether it's a round button | boolean | — | false | | circle | determine whether it's a circle button | boolean | — | false | | loading | determine whether it's loading | boolean | — | false | diff --git a/docs/examples/button/link.vue b/docs/examples/button/link.vue new file mode 100644 index 0000000000..03538c58ce --- /dev/null +++ b/docs/examples/button/link.vue @@ -0,0 +1,36 @@ + + + diff --git a/docs/examples/button/text.vue b/docs/examples/button/text.vue index cf35a5b31a..49a9430562 100644 --- a/docs/examples/button/text.vue +++ b/docs/examples/button/text.vue @@ -37,6 +37,7 @@