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

chore(feedback): move to setup sugar #2548

Merged
merged 13 commits into from
Sep 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
chore: dialog
  • Loading branch information
eiinu committed Sep 7, 2023
commit 19bdd30e30f53d9952c06bca8f10793c3881460b
166 changes: 83 additions & 83 deletions src/packages/__VUE/dialog/doc.en-US.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,78 +36,78 @@ app.use(Dialog);
import { ref, createVNode } from 'vue';
import { showDialog } from '@nutui/nutui';
import '@nutui/nutui/dist/packages/dialog/style';
const onCancel = () => {
console.log('event cancel');
};
const onOk = () => {
console.log('event ok');
};
const baseClick = (): void => {
showDialog({
title: 'Basic spring frame',
content: createVNode('span', { style: { color: 'red' } }, 'I can be a custom component'),
onCancel,
onOk
});
};
const transparentClick = (): void => {
showDialog({
overlayStyle: { background: 'rgba(0,0,0,0)' },
title: 'Transparent Dialog',
content: 'Content',
onCancel,
onOk
});
};
const htmlClick = (): void => {
showDialog({
title: 'Use html',
content:
"<p style='color:red'>html</p><img src='https://m.360buyimg.com/babel/jfs/t1/164410/22/25162/93384/616eac6cE6c711350/0cac53c1b82e1b05.gif' />",
onCancel,
onOk
});
};
const beforeCloseClick = (): void => {
showDialog({
title: 'Before Close',
content: 'Click confirm to close it in 1 second',
onCancel,
onOk,
beforeClose: (action: string) => {
return new Promise((r) => {
setTimeout(() => {
r(action == 'ok');
}, 1000);
});
}
});
};
const noTitleClick = () => {
showDialog({
content: 'Content',
onCancel,
onOk
});
};
const tipsClick = () => {
showDialog({
title: 'Title',
content: 'Function call and component call are supported.',
noCancelBtn: true,
onCancel,
onOk
});
};
const verticalClick = () => {
showDialog({
title: 'Title',
content: 'Support vertical arrangement of bottom buttons.',
footerDirection: 'vertical',
onCancel,
onOk
const onCancel = () => {
console.log('event cancel');
};
const onOk = () => {
console.log('event ok');
};
const baseClick = (): void => {
showDialog({
title: 'Basic spring frame',
content: createVNode('span', { style: { color: 'red' } }, 'I can be a custom component'),
onCancel,
onOk
});
};
const transparentClick = (): void => {
showDialog({
overlayStyle: { background: 'rgba(0,0,0,0)' },
title: 'Transparent Dialog',
content: 'Content',
onCancel,
onOk
});
};
const htmlClick = (): void => {
showDialog({
title: 'Use html',
content:
"<p style='color:red'>html</p><img src='https://m.360buyimg.com/babel/jfs/t1/164410/22/25162/93384/616eac6cE6c711350/0cac53c1b82e1b05.gif' />",
onCancel,
onOk
});
};
const beforeCloseClick = (): void => {
showDialog({
title: 'Before Close',
content: 'Click confirm to close it in 1 second',
onCancel,
onOk,
beforeClose: (action: string) => {
return new Promise((r) => {
setTimeout(() => {
r(action == 'ok');
}, 1000);
});
};
}
});
};
const noTitleClick = () => {
showDialog({
content: 'Content',
onCancel,
onOk
});
};
const tipsClick = () => {
showDialog({
title: 'Title',
content: 'Function call and component call are supported.',
noCancelBtn: true,
onCancel,
onOk
});
};
const verticalClick = () => {
showDialog({
title: 'Title',
content: 'Support vertical arrangement of bottom buttons.',
footerDirection: 'vertical',
onCancel,
onOk
});
};
</script>
```

Expand Down Expand Up @@ -169,18 +169,18 @@ const componentvVrticalClick = () => {
<script setup>
import { showDialog } from '@nutui/nutui';
import '@nutui/nutui/dist/packages/dialog/style';
const onCancel = () => {
console.log('event cancel');
};
const teleportClick = (teleport: string) => {
showDialog({
teleport,
title: 'teleport to ' + teleport,
content: 'Open the developer tool and take a look at the Elements tab',
noCancelBtn: true,
onCancel
});
};
const onCancel = () => {
console.log('event cancel');
};
const teleportClick = (teleport: string) => {
showDialog({
teleport,
title: 'teleport to ' + teleport,
content: 'Open the developer tool and take a look at the Elements tab',
noCancelBtn: true,
onCancel
});
};
</script>
```

Expand Down
166 changes: 83 additions & 83 deletions src/packages/__VUE/dialog/doc.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,78 +36,78 @@ app.use(Dialog);
import { ref, createVNode } from 'vue';
import { showDialog } from '@nutui/nutui';
import '@nutui/nutui/dist/packages/dialog/style';
const onCancel = () => {
console.log('event cancel');
};
const onOk = () => {
console.log('event ok');
};
const baseClick = (): void => {
showDialog({
title: '基础弹框',
content: createVNode('span', { style: { color: 'red' } }, '我可以是一个自定义组件'),
onCancel,
onOk
});
};
const transparentClick = (): void => {
showDialog({
overlayStyle: { background: 'rgba(0,0,0,0)' },
title: '透明弹框',
content: 'Content',
onCancel,
onOk
});
};
const htmlClick = (): void => {
showDialog({
title: '支持富文本 html',
content:
"<p style='color:red'>html</p><img src='https://m.360buyimg.com/babel/jfs/t1/164410/22/25162/93384/616eac6cE6c711350/0cac53c1b82e1b05.gif' />",
onCancel,
onOk
});
};
const beforeCloseClick = (): void => {
showDialog({
title: '异步关闭',
content: '点击确认后,1秒后关闭',
onCancel,
onOk,
beforeClose: (action: string) => {
return new Promise((r) => {
setTimeout(() => {
r(action == 'ok');
}, 1000);
});
}
});
};
const noTitleClick = () => {
showDialog({
content: '无标题弹框',
onCancel,
onOk
});
};
const tipsClick = () => {
showDialog({
title: '温馨提示',
content: '支持函数调用和组件调用两种方式。',
noCancelBtn: true,
onCancel,
onOk
});
};
const verticalClick = () => {
showDialog({
title: '温馨提示',
content: '支持底部按钮纵向排列。',
footerDirection: 'vertical',
onCancel,
onOk
const onCancel = () => {
console.log('event cancel');
};
const onOk = () => {
console.log('event ok');
};
const baseClick = (): void => {
showDialog({
title: '基础弹框',
content: createVNode('span', { style: { color: 'red' } }, '我可以是一个自定义组件'),
onCancel,
onOk
});
};
const transparentClick = (): void => {
showDialog({
overlayStyle: { background: 'rgba(0,0,0,0)' },
title: '透明弹框',
content: 'Content',
onCancel,
onOk
});
};
const htmlClick = (): void => {
showDialog({
title: '支持富文本 html',
content:
"<p style='color:red'>html</p><img src='https://m.360buyimg.com/babel/jfs/t1/164410/22/25162/93384/616eac6cE6c711350/0cac53c1b82e1b05.gif' />",
onCancel,
onOk
});
};
const beforeCloseClick = (): void => {
showDialog({
title: '异步关闭',
content: '点击确认后,1秒后关闭',
onCancel,
onOk,
beforeClose: (action: string) => {
return new Promise((r) => {
setTimeout(() => {
r(action == 'ok');
}, 1000);
});
};
}
});
};
const noTitleClick = () => {
showDialog({
content: '无标题弹框',
onCancel,
onOk
});
};
const tipsClick = () => {
showDialog({
title: '温馨提示',
content: '支持函数调用和组件调用两种方式。',
noCancelBtn: true,
onCancel,
onOk
});
};
const verticalClick = () => {
showDialog({
title: '温馨提示',
content: '支持底部按钮纵向排列。',
footerDirection: 'vertical',
onCancel,
onOk
});
};
</script>
```

Expand Down Expand Up @@ -169,18 +169,18 @@ const componentvVrticalClick = () => {
<script setup>
import { showDialog } from '@nutui/nutui';
import '@nutui/nutui/dist/packages/dialog/style';
const onCancel = () => {
console.log('event cancel');
};
const teleportClick = (teleport: string) => {
showDialog({
teleport,
title: 'teleport to ' + teleport,
content: '打开开发者工具看一下 Elements Tab',
noCancelBtn: true,
onCancel
});
};
const onCancel = () => {
console.log('event cancel');
};
const teleportClick = (teleport: string) => {
showDialog({
teleport,
title: 'teleport to ' + teleport,
content: '打开开发者工具看一下 Elements Tab',
noCancelBtn: true,
onCancel
});
};
</script>
```

Expand Down
Loading