Skip to content

Commit

Permalink
fix: spelling
Browse files Browse the repository at this point in the history
  • Loading branch information
PengYYYYY committed May 5, 2022
1 parent fa3895f commit 690ff0c
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 34 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/pr-spelling.template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,9 @@ jobs:
steps:
- uses: actions/checkout@v2
- name: Check spelling
uses: crate-ci/typos@master
uses: crate-ci/typos@master
- name: Use custom config file
uses: crate-ci/typos@master
with:
files: ./file.txt
config: ./spelling-ignore.toml
7 changes: 7 additions & 0 deletions .github/workflows/spelling-ignore.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[default.extend-identifiers]
# *sigh* this just isn't worth the cost of fixing
AttributeIDSupressMenu = "AttributeIDSupressMenu"

[default.extend-words]
# Don't correct the surname "Teh"
teh = "teh"
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -464,7 +464,7 @@ docClass: timeline
* 修复 `change` 事件两次触发 ([0b65c7a](https://github.com/Tencent/tdesign-vue-next/commit/0b65c7a1852a3e03084a86226d82c7f8d5a70925))
* Popup:
* 修复 `mousedown` 事件无效 ([a1d3303](https://github.com/Tencent/tdesign-vue-next/commit/a1d330327b27288c362bfb5d6cb4953c764426a6))
* 修复 `destory on close` 事件无效 ([fde46e7](https://github.com/Tencent/tdesign-vue-next/commit/fde46e73c7c439101663c2c5591ed08ab9aca854))
* 修复 `destroy on close` 事件无效 ([fde46e7](https://github.com/Tencent/tdesign-vue-next/commit/fde46e73c7c439101663c2c5591ed08ab9aca854))
* Input:
* 修复 `size` 属性无效 ([db155b3](https://github.com/Tencent/tdesign-vue-next/commit/db155b30fb009374308b2376d4a7dd7bf64338e8)), ([#112](https://github.com/Tencent/tdesign-vue-next/issues/112))
* 修复点击清除 `icon` 后无法 `focus` ([2c34e05](https://github.com/Tencent/tdesign-vue-next/commit/2c34e05cf183985ffd734e8bf14d77cbd07a041e))
Expand Down
4 changes: 2 additions & 2 deletions examples/calendar/demos/card-cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const getDateStr = (cellData) => {
const getCellAppendCls = (cellData) => ({
belongCurrent: cellData.mode === 'year' || cellData.belongTo === 0,
actived: cellData.isCurrent,
activated: cellData.isCurrent,
});
const handleClick = () => {
Expand Down Expand Up @@ -73,7 +73,7 @@ const handleClick = () => {
padding: 2px 4px;
}
.cellAppend.actived {
.cellAppend.activated {
background-color: #0052d9;
color: #ebf2ff;
}
Expand Down
4 changes: 2 additions & 2 deletions examples/calendar/demos/cell.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ const dataList = [
label: '错误事件',
},
{
value: 'waring',
value: 'warning',
label: '警告事件',
},
{
Expand Down Expand Up @@ -85,7 +85,7 @@ const displayNum = (cellData) => {
.error {
background: #e34d59;
}
.waring {
.warning {
background: #ed7b2f;
}
.success {
Expand Down
8 changes: 4 additions & 4 deletions examples/calendar/demos/controller-config.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,13 +25,13 @@
<label>是否显示“年份选择”控件:</label>
<t-switch v-model="controllerConfig.year.visible" />
<label>是否禁用“年份选择”控件:</label>
<t-switch v-model="controllerConfig.year.selecteProps.disabled" />
<t-switch v-model="controllerConfig.year.selectProps.disabled" />
</p>
<p>
<label>是否显示“月份选择”控件:</label>
<t-switch v-model="controllerConfig.month.visible" />
<label>是否禁用“月份选择”控件:</label>
<t-switch v-model="controllerConfig.month.selecteProps.disabled" />
<t-switch v-model="controllerConfig.month.selectProps.disabled" />
</p>
<p>
<label>是否禁用“隐藏周末”控件:</label>
Expand Down Expand Up @@ -64,7 +64,7 @@ const controllerConfig = ref({
// 年份选择框组件相关设置
year: {
visible: true, // 是否显示
selecteProps: {
selectProps: {
// 用于透传props给该select组件
disabled: false,
size: 'small',
Expand All @@ -73,7 +73,7 @@ const controllerConfig = ref({
// 月份选择框组件相关设置
month: {
visible: true, // 是否显示(“year”模式下本身是不显示该组件的)
selecteProps: {
selectProps: {
// 用于透传props给该select组件
disabled: false,
size: 'small',
Expand Down
4 changes: 2 additions & 2 deletions examples/calendar/demos/slot-props-api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ const renderCell = (params) => {
label: '错误事件',
},
{
value: 'waring',
value: 'warning',
label: '警告事件',
},
{
Expand Down Expand Up @@ -90,7 +90,7 @@ const renderCell = (params) => {
.error {
background: #e34d59;
}
.waring {
.warning {
background: #ed7b2f;
}
.success {
Expand Down
2 changes: 1 addition & 1 deletion examples/dialog/demos/custom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<t-dialog
:visible="visible2"
header="提示"
body="自定义底部按钮,传入 ButttonProps"
body="自定义底部按钮,传入 ButtonProps"
:confirm-btn="{
content: '前往购物车',
variant: 'base',
Expand Down
2 changes: 1 addition & 1 deletion examples/dialog/demos/plugin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export default defineComponent({
theme: 'danger',
},
onConfirm: ({ e }) => {
console.log('confrim e: ', e);
console.log('confirm e: ', e);
alertDia.hide();
},
onClose: ({ e, trigger }) => {
Expand Down
2 changes: 1 addition & 1 deletion examples/drawer/demos/custom.vue
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const visible3 = ref(false);
const renderFooter = () => {
return (
<div>
<t-button>confrim</t-button>
<t-button>confirm</t-button>
<t-button variant="outline" onClick={() => (visible2.value = false)}>
cancel
</t-button>
Expand Down
5 changes: 5 additions & 0 deletions examples/table/demos/fixed-column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,11 @@ const columns = computed(() => {
title: '默认值',
width: 150,
},
{
colKey: 'detail.position',
title: '详情信息',
width: 250,
},
{
colKey: 'description',
title: '说明',
Expand Down
1 change: 0 additions & 1 deletion examples/table/demos/fixed-header-col.vue
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ for (let i = 0; i < 20; i++) {
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
position: `读取 ${i} 个数据的嵌套信息值`,
position1: `读取 ${i} 个数据的嵌套信息值`,
},
description: '数据源',
needed: i % 4 === 0 ? '' : '',
Expand Down
6 changes: 3 additions & 3 deletions examples/tabs/demos/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@
<div class="tdesign-demo-block-column-large">
<t-tabs v-model="value">
<t-tab-panel :value="1" label="选项卡1" :destroy-on-hide="false">
<p style="padding: 25px">选项卡1的内容,使用 t-tab-pannel 渲染</p>
<p style="padding: 25px">选项卡1的内容,使用 t-tab-panel 渲染</p>
</t-tab-panel>
<t-tab-panel :value="2" label="选项卡2" :destroy-on-hide="false">
<template #panel>
<p style="padding: 25px">选项卡2的内容,使用 t-tab-pannel 渲染</p>
<p style="padding: 25px">选项卡2的内容,使用 t-tab-panel 渲染</p>
</template>
</t-tab-panel>
<t-tab-panel :value="3" label="选项卡3" :panel="panelRender" />
Expand All @@ -29,7 +29,7 @@ const tabList = [
const value = ref(1);
const tab = ref(1);
const panelRender = () => {
return <p style="padding: 25px;">选项卡3的内容,使用 t-tab-pannel 渲染</p>;
return <p style="padding: 25px;">选项卡3的内容,使用 t-tab-panel 渲染</p>;
};
</script>

Expand Down
2 changes: 1 addition & 1 deletion examples/tree/demos/controlled.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<t-addon prepend="expanded:">
<t-input :value="allExpanded" />
</t-addon>
<t-addon prepend="actived:">
<t-addon prepend="activated:">
<t-input :value="allActived" />
</t-addon>
<t-tree
Expand Down
2 changes: 1 addition & 1 deletion examples/tree/demos/sync.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<t-addon prepend="expanded:">
<t-input :value="allExpanded" @change="onAllExpandedInput" />
</t-addon>
<t-addon prepend="actived:">
<t-addon prepend="activated:">
<t-input :value="allActived" @change="onAllActivedInput" />
</t-addon>
<t-tree
Expand Down
2 changes: 1 addition & 1 deletion examples/tree/demos/vmodel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<t-addon prepend="expanded:">
<t-input :value="allExpanded" />
</t-addon>
<t-addon prepend="actived:">
<t-addon prepend="activated:">
<t-input :value="allActived" />
</t-addon>
<t-tree
Expand Down
2 changes: 1 addition & 1 deletion script/generate-changelog.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ function updateVersion() {
rl.on('line', (input) => {
let newVersion = '';
if (!input) {
newVersion = pkg.version.replace(/(\d+\.\d+\.)(\d+)/, (verion, $1, $2) => $1 + (Number($2) + 1));
newVersion = pkg.version.replace(/(\d+\.\d+\.)(\d+)/, (version, $1, $2) => $1 + (Number($2) + 1));
} else if (!VERSION_REG.test(input)) {
console.log('\x1B[31m%s\x1B[0m', '\n⚡ 不要搞事年轻人,请输入正确版本号格式!\n');
rl.prompt();
Expand Down
10 changes: 6 additions & 4 deletions script/prerender.mjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/* eslint-disable */

import fs from 'fs';
import path from 'path';
import { chromium } from 'playwright';
Expand All @@ -16,15 +18,15 @@ function initPageList() {
});
});

console.log(pageList)
console.log(pageList);

return pageList;
}

async function initPreviewServer() {
const previewServer = await preview({
preview: { port: 9999, open: false },
build: { outDir: './_site' }
build: { outDir: './_site' },
});

previewServer.printUrls();
Expand All @@ -41,7 +43,7 @@ async function initPreviewServer() {
fs.mkdirSync(spiderPath);
} catch {}

for (let url of pageList) {
for (const url of pageList) {
const [, pathName] = url.split(prefix);
const filePath = `${spiderPath}${pathName || '/index'}.html`;

Expand All @@ -54,7 +56,7 @@ async function initPreviewServer() {
fs.mkdirSync(path.dirname(filePath));
} catch {}

console.log('\x1b[32m', `writting ${url}... \n`);
console.log('\x1b[32m', `writing ${url}... \n`);
fs.writeFileSync(filePath, html);
}

Expand Down
4 changes: 2 additions & 2 deletions site/plugin-doc/transforms.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ let demoCodesImports = {};

export default {
before({ source, file }) {
const resouceDir = path.dirname(file);
const resourceDir = path.dirname(file);
const reg = file.match(/examples\/(\w+-?\w+)\/\w+-?\w+\.md/);
const name = reg && reg[1];
demoImports = {};
Expand All @@ -27,7 +27,7 @@ export default {

// 替换成对应 demo 文件
source = source.replace(/\{\{\s+(.+)\s+\}\}/g, (demoStr, demoFileName) => {
const demoPath = path.resolve(resouceDir, `../../examples/${name}/demos/${demoFileName}.vue`);
const demoPath = path.resolve(resourceDir, `../../examples/${name}/demos/${demoFileName}.vue`);
if (!fs.existsSync(demoPath)) return '\n<h3>DEMO (🚧建设中)...</h3>';

return `\n::: demo demos/${demoFileName} ${name}\n:::\n`;
Expand Down
10 changes: 5 additions & 5 deletions test/unit/message/index.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ describe('Message', () => {
expect(wrapper.element).toMatchSnapshot();
});

it(':closeBtn is a tring, equal "关闭".', () => {
it(':closeBtn is a string, equal "关闭".', () => {
const wrapper = mount({
render() {
return <Message closeBtn="关闭"></Message>;
Expand Down Expand Up @@ -98,7 +98,7 @@ describe('Message', () => {
expect(wrapper.element).toMatchSnapshot();
});

it(':icon is a funtion, () => MoreIcon', () => {
it(':icon is a function, () => MoreIcon', () => {
const wrapper = mount({
render() {
return <Message icon={() => <MoreIcon></MoreIcon>}></Message>;
Expand All @@ -108,7 +108,7 @@ describe('Message', () => {
expect(wrapper.element).toMatchSnapshot();
});

it(':default is a funtion, () => <b>这是重要信息</b>', () => {
it(':default is a function, () => <b>这是重要信息</b>', () => {
const wrapper = mount({
render() {
return <Message content={() => <b>这是重要信息</b>}></Message>;
Expand Down Expand Up @@ -183,13 +183,13 @@ describe('Message', () => {
return (
<Message
v-slots={{
closeBtn: () => <div class="custome-close-btn">x</div>,
closeBtn: () => <div class="custom-close-btn">x</div>,
}}
></Message>
);
},
});
expect(wrapper.find('.custome-close-btn').exists()).toBe(true);
expect(wrapper.find('.custom-close-btn').exists()).toBe(true);
});
});
});

0 comments on commit 690ff0c

Please sign in to comment.