Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(message): new message #586

Merged
merged 1 commit into from
Apr 14, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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