Skip to content

Commit

Permalink
refactor(message): new message (#586)
Browse files Browse the repository at this point in the history
re #548
  • Loading branch information
yusuf-yz authored Apr 14, 2023
1 parent 1f419ce commit 251f58f
Show file tree
Hide file tree
Showing 14 changed files with 2,602 additions and 704 deletions.
2,676 changes: 2,217 additions & 459 deletions src/grid/__test__/__snapshots__/demo.test.jsx.snap

Large diffs are not rendered by default.

8 changes: 8 additions & 0 deletions src/grid/__test__/demo.test.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,22 @@
import { mount } from '@vue/test-utils';
import badgeVue from '@/grid/demos/badge.vue';
import baseVue from '@/grid/demos/base.vue';
import borderedVue from '@/grid/demos/bordered.vue';
import cardVue from '@/grid/demos/card.vue';
import descVue from '@/grid/demos/desc.vue';
import iconVue from '@/grid/demos/icon.vue';
import mobileVue from '@/grid/demos/mobile.vue';
import scrollVue from '@/grid/demos/scroll.vue';

const mapper = {
badgeVue,
baseVue,
borderedVue,
cardVue,
descVue,
iconVue,
mobileVue,
scrollVue,
};

describe('Grid', () => {
Expand Down
90 changes: 50 additions & 40 deletions src/message/__test__/__snapshots__/demo.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ exports[`Message > Message baseVue demo works fine 1`] = `
>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -21,13 +21,13 @@ exports[`Message > Message baseVue demo works fine 1`] = `
class="t-button__text"
>
纯文字通知
纯文字的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -36,13 +36,13 @@ exports[`Message > Message baseVue demo works fine 1`] = `
class="t-button__text"
>
带图标通知
带图标的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -51,13 +51,13 @@ exports[`Message > Message baseVue demo works fine 1`] = `
class="t-button__text"
>
带关闭通知
带关闭的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -66,13 +66,13 @@ exports[`Message > Message baseVue demo works fine 1`] = `
class="t-button__text"
>
滚动通知
可滚动的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -81,7 +81,7 @@ exports[`Message > Message baseVue demo works fine 1`] = `
class="t-button__text"
>
带按钮通知
带按钮的通知
</span>
</button>
Expand Down Expand Up @@ -151,8 +151,9 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
</h1>
<p
class="summary"
style="margin: 8px 16px 0px;"
>
用于页面消息通知提示,具有成功提示、提醒、警示等功能,通常在顶部出现,可以自动消失或点击关闭
用于轻量级反馈或提示,不会打断用户操作。
</p>
<div
class="tdesign-mobile-demo-block"
Expand All @@ -163,19 +164,18 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
<h2
class="tdesign-mobile-demo-block__title"
>
01 类型
01 组件类型
</h2>
<p
class="tdesign-mobile-demo-block__summary"
>
弹窗内容为存文本、标题和副标题、带输入框
消息通知内容为文本、带操作按钮
</p>
</div>
<div
class="tdesign-mobile-demo-block__slot"
>
<!-- &lt;functionDemo /&gt; -->
<div
class="button-demo"
Expand All @@ -184,7 +184,7 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -193,13 +193,13 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
class="t-button__text"
>
纯文字通知
纯文字的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -208,13 +208,13 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
class="t-button__text"
>
带图标通知
带图标的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -223,13 +223,13 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
class="t-button__text"
>
带关闭通知
带关闭的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -238,13 +238,13 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
class="t-button__text"
>
滚动通知
可滚动的通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-e60c559e=""
role="button"
>
Expand All @@ -253,7 +253,7 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
class="t-button__text"
>
带按钮通知
带按钮的通知
</span>
</button>
Expand Down Expand Up @@ -321,12 +321,12 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
<h2
class="tdesign-mobile-demo-block__title"
>
02 状态
02 组件风格
</h2>
<p
class="tdesign-mobile-demo-block__summary"
>
弹窗内容为存文本、标题和副标题、带输入框
消息组件风格
</p>
</div>
<div
Expand All @@ -335,11 +335,13 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
<div
class="button-demo"
data-v-fba28ece=""
style="margin: 0px 16px;"
>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
Expand All @@ -353,43 +355,46 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
<span
class="t-button__text"
>
警示提示通知
成功通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
<span
class="t-button__text"
>
成功提示通知
警示通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
<span
class="t-button__text"
>
错误提示通知
错误通知
</span>
</button>
Expand All @@ -403,11 +408,13 @@ exports[`Message > Message mobileVue demo works fine 1`] = `
exports[`Message > Message themeVue demo works fine 1`] = `
<div
class="button-demo"
data-v-fba28ece=""
style="margin: 0px 16px;"
>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
Expand All @@ -421,43 +428,46 @@ exports[`Message > Message themeVue demo works fine 1`] = `
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
<span
class="t-button__text"
>
警示提示通知
成功通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
<span
class="t-button__text"
>
成功提示通知
警示通知
</span>
</button>
<button
aria-disabled="false"
class="t-button t-size-l t-button--outline t-button--default t-button--shape-rectangle t-is-block"
class="t-button t-size-l t-button--outline t-button--primary t-button--shape-rectangle t-is-block"
data-v-fba28ece=""
role="button"
>
<!---->
<span
class="t-button__text"
>
错误提示通知
错误通知
</span>
</button>
Expand Down
Loading

0 comments on commit 251f58f

Please sign in to comment.