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: remove unsupported demo and update common #3333

Merged
merged 1 commit into from
Jan 16, 2025
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 changes: 1 addition & 1 deletion src/_common
11 changes: 0 additions & 11 deletions src/form/_example/customized-form-controls.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ export default function BaseForm() {
MessagePlugin.info('提交成功');
}
};
const setData = () => {
form.setFieldsValue?.({
course: {
type: 'math',
name: '线性代数',
},
});
};

return (
<Form form={form} onSubmit={onSubmit} colon labelWidth={100}>
Expand All @@ -78,9 +70,6 @@ export default function BaseForm() {
<Button type="submit" theme="primary">
提交
</Button>
<Button theme="primary" onClick={setData} style={{ marginLeft: 12 }}>
设置信息
</Button>
</FormItem>
</Form>
);
Expand Down
13 changes: 1 addition & 12 deletions test/snap/__snapshots__/csr.test.jsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -42826,17 +42826,6 @@ exports[`csr snapshot test > csr test src/form/_example/customized-form-controls
提交
</span>
</button>
<button
class="t-button t-button--theme-primary t-button--variant-base"
style="margin-left: 12px;"
type="button"
>
<span
class="t-button__text"
>
设置信息
</span>
</button>
</div>
</div>
</div>
Expand Down Expand Up @@ -134710,7 +134699,7 @@ exports[`ssr snapshot test > ssr test src/form/_example/clear-validate.tsx 1`] =

exports[`ssr snapshot test > ssr test src/form/_example/custom-validator.tsx 1`] = `"<form class="t-form"><div class="t-form__item t-form-item__account"><div class="t-form__label t-form__label--right" style="width:100px"><label>用户名</label></div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-input__wrap" spellcheck="false"><div class="t-input t-align-left"><input placeholder="please enter" type="text" class="t-input__inner" value=""/></div></div></div></div></div><div class="t-form__item t-form-item__password"><div class="t-form__label t-form__label--right" style="width:100px"><label>密码</label></div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-input__wrap" value="" spellcheck="false"><div class="t-input t-align-left"><input placeholder="please enter" type="text" class="t-input__inner" value=""/></div></div></div></div></div><div class="t-form__item t-form-item__rePassword"><div class="t-form__label t-form__label--right" style="width:100px"><label>确认密码</label></div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-input__wrap" value="" spellcheck="false"><div class="t-input t-align-left"><input placeholder="please enter" type="text" class="t-input__inner" value=""/></div></div></div></div></div><div class="t-form__item" style="margin-left:100px"><div class="t-form__controls"><div class="t-form__controls-content"><button type="submit" class="t-button t-button--theme-primary t-button--variant-base"><span class="t-button__text">提交</span></button><button style="margin:0 12px" type="reset" class="t-button t-button--theme-default t-button--variant-base"><span class="t-button__text">重置</span></button><button type="button" class="t-button t-button--theme-default t-button--variant-base"><span class="t-button__text">清除校验状态</span></button></div></div></div></form>"`;

exports[`ssr snapshot test > ssr test src/form/_example/customized-form-controls.tsx 1`] = `"<form class="t-form"><div class="t-form__item t-form-item__course"><div class="t-form__label t-form__label--right" style="width:100px"><label>课程</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div style="gap:16px" class="t-space t-space-horizontal"><div class="t-space-item"><div class="t-select__wrap"><div class="t-select t-select-input t-select-input--empty"><div class="t-input__wrap" spellcheck="false"><div class="t-input t-is-readonly t-align-left t-input--suffix"><input placeholder="请选择课程类型" type="text" class="t-input__inner" readonly="" value=""/><span class="t-input__suffix t-input__suffix-icon"><svg class="t-fake-arrow t-select__right-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921" stroke="black" stroke-opacity="0.9" stroke-width="1.3"></path></svg></span></div></div></div></div></div><div class="t-space-item"><div class="t-input__wrap" spellcheck="false"><div class="t-input t-align-left"><input placeholder="请输入课程名称" type="text" class="t-input__inner" value=""/></div></div></div></div></div></div></div><div class="t-form__item" style="margin-left:100px"><div class="t-form__controls"><div class="t-form__controls-content"><button type="submit" class="t-button t-button--theme-primary t-button--variant-base"><span class="t-button__text">提交</span></button><button style="margin-left:12px" type="button" class="t-button t-button--theme-primary t-button--variant-base"><span class="t-button__text">设置信息</span></button></div></div></div></form>"`;
exports[`ssr snapshot test > ssr test src/form/_example/customized-form-controls.tsx 1`] = `"<form class="t-form"><div class="t-form__item t-form-item__course"><div class="t-form__label t-form__label--right" style="width:100px"><label>课程</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div style="gap:16px" class="t-space t-space-horizontal"><div class="t-space-item"><div class="t-select__wrap"><div class="t-select t-select-input t-select-input--empty"><div class="t-input__wrap" spellcheck="false"><div class="t-input t-is-readonly t-align-left t-input--suffix"><input placeholder="请选择课程类型" type="text" class="t-input__inner" readonly="" value=""/><span class="t-input__suffix t-input__suffix-icon"><svg class="t-fake-arrow t-select__right-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921" stroke="black" stroke-opacity="0.9" stroke-width="1.3"></path></svg></span></div></div></div></div></div><div class="t-space-item"><div class="t-input__wrap" spellcheck="false"><div class="t-input t-align-left"><input placeholder="请输入课程名称" type="text" class="t-input__inner" value=""/></div></div></div></div></div></div></div><div class="t-form__item" style="margin-left:100px"><div class="t-form__controls"><div class="t-form__controls-content"><button type="submit" class="t-button t-button--theme-primary t-button--variant-base"><span class="t-button__text">提交</span></button></div></div></div></form>"`;

exports[`ssr snapshot test > ssr test src/form/_example/disabled.tsx 1`] = `"<div style="gap:16px" class="t-space t-space-vertical"><div class="t-space-item"><div style="margin-left:36px"><div class="t-radio-group t-size-m t-radio-group--filled"><label tabindex="0" class="t-radio-button"><input type="radio" class="t-radio-button__former" tabindex="-1" data-value="false" value="0"/><span class="t-radio-button__input"></span><span class="t-radio-button__label">启用</span></label><label tabindex="0" class="t-radio-button t-is-checked" checked=""><input type="radio" class="t-radio-button__former" tabindex="-1" data-value="true" checked="" value="1"/><span class="t-radio-button__input"></span><span class="t-radio-button__label">禁用</span></label><div class="t-radio-group__bg-block"></div></div></div></div><div class="t-space-item"><form class="t-form"><div class="t-form__item t-form-item__name"><div class="t-form__label t-form__label--right" style="width:100px"><label>姓名</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-input__wrap" value="" spellcheck="false"><div class="t-input t-is-disabled t-align-left"><input placeholder="please enter" type="text" class="t-input__inner" disabled="" value=""/></div></div></div></div></div><div class="t-form__item t-form-item__college"><div class="t-form__label t-form__label--right" style="width:100px"><label>学院</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-select__wrap"><div class="t-select t-select-input t-select-input--empty"><div class="t-input__wrap" spellcheck="false"><div class="t-input t-is-readonly t-is-disabled t-align-left t-input--suffix"><input placeholder="please select" type="text" class="t-input__inner" readonly="" disabled="" value=""/><span class="t-input__suffix t-input__suffix-icon"><svg class="t-fake-arrow t-select__right-icon" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921" stroke="black" stroke-opacity="0.9" stroke-width="1.3"></path></svg></span></div></div></div></div></div></div></div><div class="t-form__item t-form-item__address1"><div class="t-form__label t-form__label--right" style="width:100px"><label>寄件地址</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-tree-select t-select-input"><div class="t-input__wrap" value="江苏" spellcheck="false"><div class="t-input t-is-readonly t-is-disabled t-align-left t-input--suffix"><input placeholder="please select" type="text" class="t-input__inner" readonly="" disabled="" value="江苏"/><span class="t-input__suffix t-input__suffix-icon"><svg class="t-fake-arrow t-fake-arrow--disable" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921" stroke="black" stroke-opacity="0.9" stroke-width="1.3"></path></svg></span></div></div></div></div></div></div><div class="t-form__item t-form-item__address2"><div class="t-form__label t-form__label--right" style="width:100px"><label>收件地址</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-cascader t-select-input t-select-input--empty"><div class="t-input__wrap" value="" spellcheck="false"><div class="t-input t-is-readonly t-is-disabled t-align-left t-input--suffix"><input placeholder="select cascader data" type="text" class="t-input__inner" readonly="" disabled="" value=""/><span class="t-input__suffix t-input__suffix-icon"><svg class="t-fake-arrow t-cascader__icon t-is-disabled" width="16" height="16" viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg"><path d="M3.75 5.7998L7.99274 10.0425L12.2361 5.79921" stroke="black" stroke-opacity="0.9" stroke-width="1.3"></path></svg></span></div></div></div></div></div></div><div class="t-form__item t-form-item__date"><div class="t-form__label t-form__label--right" style="width:100px"><label>日期</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-date-picker"><div class="t-select-input t-select-input--empty"><div class="t-input__wrap" value="" spellcheck="false"><div class="t-input t-is-readonly t-is-disabled t-align-left t-input--suffix"><input placeholder="select date" type="text" class="t-input__inner" readonly="" disabled="" value=""/><span class="t-input__suffix t-input__suffix-icon"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-calendar"><path fill="currentColor" d="M6 4V1.5h2V4h8V1.5h2V4h4v18H2V4h4zM4 6v3h16V6H4zm16 5H4v9h16v-9z"></path></svg></span></div></div></div></div></div></div></div><div class="t-form__item t-form-item__personalProfile"><div class="t-form__label t-form__label--right" style="width:100px"><label>个人简介</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-textarea"><textarea placeholder="简单描述自己的经历" class="t-textarea__inner t-is-disabled" disabled=""></textarea></div></div></div></div><div class="t-form__item t-form-item__message"><div class="t-form__label t-form__label--right" style="width:100px"><label>短信</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><button type="button" role="switch" disabled="" class="t-switch t-is-checked t-is-disabled t-size-m"><span class="t-switch__handle"></span><div class="t-switch__content">接受</div></button></div></div></div><div class="t-form__item t-form-item__gender"><div class="t-form__label t-form__label--right" style="width:100px"><label>性别</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-radio-group t-size-m t-radio-group__outline"><label class="t-radio t-is-disabled"><input type="radio" class="t-radio__former" disabled="" tabindex="-1" data-value="&#x27;1&#x27;" value="1"/><span class="t-radio__input"></span><span class="t-radio__label">男</span></label><label class="t-radio t-is-disabled"><input type="radio" class="t-radio__former" disabled="" tabindex="-1" data-value="&#x27;2&#x27;" value="2"/><span class="t-radio__input"></span><span class="t-radio__label">女</span></label></div></div></div></div><div class="t-form__item t-form-item__course"><div class="t-form__label t-form__label--right" style="width:100px"><label>课程</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-checkbox-group"><label class="t-checkbox t-is-disabled"><input type="checkbox" class="t-checkbox__former" disabled="" tabindex="-1" data-value="&#x27;1&#x27;" value="1"/><span class="t-checkbox__input"></span><span class="t-checkbox__label">语文</span></label><label class="t-checkbox t-is-disabled"><input type="checkbox" class="t-checkbox__former" disabled="" tabindex="-1" data-value="&#x27;2&#x27;" value="2"/><span class="t-checkbox__input"></span><span class="t-checkbox__label">数学</span></label><label class="t-checkbox t-is-disabled"><input type="checkbox" class="t-checkbox__former" disabled="" tabindex="-1" data-value="&#x27;3&#x27;" value="3"/><span class="t-checkbox__input"></span><span class="t-checkbox__label">英语</span></label></div></div></div></div><div class="t-form__item t-form-item__gradePoint"><div class="t-form__label t-form__label--right" style="width:100px"><label>绩点</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-input-number t-size-m t-is-disabled t-input-number--normal"><div class="t-input__wrap" value="" spellcheck="false"><div class="t-input t-is-disabled t-align-left"><input placeholder="数字" type="text" class="t-input__inner" disabled="" autoComplete="off" value=""/></div></div></div></div></div></div><div class="t-form__item t-form-item__avatar"><div class="t-form__label t-form__label--right" style="width:100px"><label>头像</label>:</div><div class="t-form__controls" style="margin-left:100px"><div class="t-form__controls-content"><div class="t-upload"><input type="file" disabled="" accept="image/*" hidden=""/><div><ul class="t-upload__card"><li class="t-upload__card-item t-is-background"><div class="t-upload__card-content t-upload__card-box"><div class="t-image__wrapper t-image__wrapper--shape-square t-upload__card-image"><img src="https://tdesign.gtimg.com/site/avatar.jpg" class="t-image t-image--fit-contain t-image--position-center"/><div class="t-image__loading"><div style="gap:8px" class="t-space t-space-align-center t-space-vertical"><div class="t-space-item"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-image" style="font-size:24px"><path fill="currentColor" d="M2 2h20v20H2V2zm2 18h13.59L9 11.41l-5 5V20zm16-.41V4H4v9.59l5-5 11 11zM15.55 7a1 1 0 100 2 1 1 0 000-2zm-3 1a3 3 0 116 0 3 3 0 01-6 0z"></path></svg></div><div class="t-space-item">loading</div></div></div></div><div class="t-upload__card-mask"><span class="t-upload__card-mask-item"><svg fill="none" viewBox="0 0 24 24" width="1em" height="1em" class="t-icon t-icon-browse"><g clip-path="url(#clip0_8726_7319)"><path fill="currentColor" d="M2.1 12a10.5 10.5 0 0019.8 0 10.5 10.5 0 00-19.8 0zm-2.01-.3a12.5 12.5 0 0123.82 0l.1.3-.1.3a12.5 12.5 0 01-23.82 0l-.1-.3.1-.3zM12 9a3 3 0 100 6 3 3 0 000-6zm-5 3a5 5 0 1110 0 5 5 0 01-10 0z"></path></g></svg></span></div></div><a target="_blank" href="https://tdesign.gtimg.com/site/avatar.jpg" class="t-upload__card-name t-link t-link--theme-default t-size-s t-link--hover-color">avatar.jpg</a></li></ul></div><small class="t-upload__tips t-size-s">请选择单张图片文件上传</small></div></div></div></div><div class="t-form__item" style="margin-left:100px"><div class="t-form__controls"><div class="t-form__controls-content"><div style="margin-right:10px" type="submit" disabled="" class="t-button t-button--theme-primary t-button--variant-base t-is-disabled"><span class="t-button__text">提交</span></div><div type="reset" disabled="" class="t-button t-button--theme-default t-button--variant-base t-is-disabled"><span class="t-button__text">重置</span></div></div></div></div></form></div></div>"`;

Expand Down
Loading
Loading