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

Hotfix/keyword fix #488

Merged
merged 9 commits into from
May 5, 2022
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
13 changes: 13 additions & 0 deletions .github/workflows/pr-spelling.template.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: pr-spell-check
on: [pull_request]

jobs:
run:
name: Spell Check with Typos
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Check spelling
uses: crate-ci/typos@master
with:
config: .github/workflows/typos-config.toml
6 changes: 6 additions & 0 deletions .github/workflows/typos-config.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[default.extend-words]
actived = "actived"
formated = "formated"
formate = "formate"
Colum = "Colum"
ba = "ba"
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
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 site/src/components/base-usage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
justifyContent: 'center',
}"
>
<slot :name="item.value" :configProps="{ ...defaultProps, ...changedProps }"></slot>
<slot :name="item.value" :config-props="{ ...defaultProps, ...changedProps }"></slot>
</div>
</td-doc-usage>
</template>
Expand Down Expand Up @@ -73,12 +73,12 @@ const defaultProps = ref(
);

const usageCode = computed(() => {
const propsStrs = Object.keys(changedProps.value)
const propsStr = Object.keys(changedProps.value)
.map((name) => `${stringifyProp(name, changedProps.value[name])}`)
.filter(Boolean);
const tureCode = props.code.replace(/\s*v-bind="configProps"/g, () =>
propsStrs.length ? `\n ${propsStrs.join('\n ')}` : '',
const trueCode = props.code.replace(/\s*v-bind="configProps"/g, () =>
propsStr.length ? `\n ${propsStr.join('\n ')}` : '',
);
return tureCode;
return trueCode;
});
</script>
2 changes: 1 addition & 1 deletion src/dialog/dialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ export default defineComponent({
Transition,
},

// 注册v-draggable指令,传入ture时候初始化拖拽事件
// 注册v-draggable指令,传入true时候初始化拖拽事件
directives: {
TransferDom,
draggable(el, binding) {
Expand Down
2 changes: 1 addition & 1 deletion src/grid/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export function parseFlex(flex: TdColProps['flex']): string {
if (typeof flex === 'number') {
return `${flex} ${flex} 0`;
}
// 判断fle是否
// 判断是否是flex
if (/^\d+(\.\d+)?(px|r?em|%)$/.test(flex)) {
return `0 0 ${flex}`;
}
Expand Down
8 changes: 4 additions & 4 deletions src/swiper/swiper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,23 +43,23 @@ export default defineComponent({

methods: {
renderContent(): VNode {
let wraperStyles = {};
let wrapperStyles = {};
if (this.direction === 'vertical') {
wraperStyles = {
wrapperStyles = {
height: `${this.items.length * 100}%`,
transform: `translate3d(0,${(-this.index * 100) / this.items.length}%,0)`,
transition: `transform ${this.duration / 1000}s`,
};
} else {
wraperStyles = {
wrapperStyles = {
width: `${this.items.length * 100}%`,
transform: `translate3d(${(-this.index * 100) / this.items.length}%,0,0)`,
transition: `transform ${this.duration / 1000}s`,
};
}
return (
<div class={`${this.COMPONENT_NAME}__content`}>
<div class={`${this.COMPONENT_NAME}__swiper-wrap--${this.direction}`} style={wraperStyles}>
<div class={`${this.COMPONENT_NAME}__swiper-wrap--${this.direction}`} style={wrapperStyles}>
{this.items}
</div>
</div>
Expand Down
Loading