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 d366658 commit effb4ea
Show file tree
Hide file tree
Showing 27 changed files with 67 additions and 53 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 @@ -287,7 +287,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
4 changes: 2 additions & 2 deletions examples/config-provider/demos/calendar.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@ const globalConfig = {
controllerConfig: {
year: {
visible: true,
selecteProps: {
selectProps: {
size: 'small',
},
},
month: {
visible: true,
selecteProps: {
selectProps: {
size: 'small',
},
},
Expand Down
2 changes: 1 addition & 1 deletion examples/config-provider/demos/others.vue
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@
<br /><br />
<br />
<t-steps :current="2" layout="vertical" style="width: 100%">
<t-step-item title="Fisrt Step" content="You need to click the blue button"></t-step-item>
<t-step-item title="First Step" content="You need to click the blue button"></t-step-item>
<t-step-item title="Second Step" content="Fill your base information into the form"></t-step-item>
<t-step-item title="Error Step" status="error" content="Something Wrong! Custom Error Icon!"></t-step-item>
<t-step-item title="Last Step" content="You haven't finish this step."></t-step-item>
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
4 changes: 2 additions & 2 deletions examples/table/demos/base.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ for (let i = 0; i < 5; i++) {
type: ['String', 'Number', 'Array', 'Object'][i % 4],
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
postion: `读取 ${i} 个数据的嵌套信息值`,
position: `读取 ${i} 个数据的嵌套信息值`,
},
needed: i % 4 === 0 ? '' : '',
description: '数据源',
Expand Down Expand Up @@ -61,7 +61,7 @@ const columns = [
title: '是否必传',
},
{
colKey: 'detail.postion',
colKey: 'detail.position',
title: '详情信息',
ellipsis: true,
fixed: 'right',
Expand Down
4 changes: 2 additions & 2 deletions examples/table/demos/fixed-column.vue
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for (let i = 0; i < 5; i++) {
type: ['String', 'Number', 'Array', 'Object'][i % 4],
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
postion: `读取 ${i} 个数据的嵌套信息值`,
position: `读取 ${i} 个数据的嵌套信息值`,
},
needed: i % 4 === 0 ? '' : '',
description: '数据源',
Expand Down Expand Up @@ -67,7 +67,7 @@ const columns = computed(() => {
width: 150,
},
{
colKey: 'detail.postion',
colKey: 'detail.position',
title: '详情信息',
width: 250,
},
Expand Down
4 changes: 2 additions & 2 deletions examples/table/demos/fixed-header-col.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ for (let i = 0; i < 20; i++) {
type: ['String', 'Number', 'Array', 'Object'][i % 4],
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
postion: `读取 ${i} 个数据的嵌套信息值`,
position: `读取 ${i} 个数据的嵌套信息值`,
},
needed: i % 4 === 0 ? '' : '',
operation: '删除',
Expand Down Expand Up @@ -46,7 +46,7 @@ const columns = [
width: 150,
},
{
colKey: 'detail.postion',
colKey: 'detail.position',
title: '详情信息',
width: 250,
},
Expand Down
4 changes: 2 additions & 2 deletions examples/table/demos/fixed-header.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ for (let i = 0; i < 20; i++) {
type: ['String', 'Number', 'Array', 'Object'][i % 4],
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
postion: `读取 ${i} 个数据的嵌套信息值`,
position: `读取 ${i} 个数据的嵌套信息值`,
},
needed: i % 4 === 0 ? '' : '',
description: '数据源',
Expand Down Expand Up @@ -42,7 +42,7 @@ const columns = [
title: '是否必传',
},
{
colKey: 'detail.postion',
colKey: 'detail.position',
title: '详情信息',
width: 200,
ellipsis: true,
Expand Down
4 changes: 2 additions & 2 deletions examples/table/demos/pagination.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ for (let i = 0; i < TOTAL; i++) {
type: ['String', 'Number', 'Array', 'Object'][i % 4],
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
postion: `读取 ${i} 个数据的嵌套信息值`,
position: `读取 ${i} 个数据的嵌套信息值`,
},
needed: i % 4 === 0 ? '' : '',
description: '数据源',
Expand Down Expand Up @@ -48,7 +48,7 @@ const columns = [
title: '是否必传',
},
{
colKey: 'detail.postion',
colKey: 'detail.position',
title: '详情信息',
width: 200,
ellipsis: true,
Expand Down
2 changes: 1 addition & 1 deletion examples/table/demos/tree.vue
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ for (let i = 0; i < 5; i++) {
type: ['String', 'Number', 'Array', 'Object'][i % 4],
default: ['-', '0', '[]', '{}'][i % 4],
detail: {
postion: `读取 ${i} 个数据的嵌套信息值`,
position: `读取 ${i} 个数据的嵌套信息值`,
},
needed: i % 4 === 0 ? '是' : '否',
description: '数据源',
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">
<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">
<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
Loading

0 comments on commit effb4ea

Please sign in to comment.