Skip to content

Commit

Permalink
docs(form): [form] demo fix to adapter x-design (#2113)
Browse files Browse the repository at this point in the history
  • Loading branch information
gimmyhehe authored Sep 18, 2024
1 parent d55c7fe commit a9015aa
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ function validateField() {

<style lang="less">
.custom-error {
padding: 4px 0;
display: flex;
.tiny-svg {
fill: var(--ti-tooltip-validate-icon-color);
Expand Down
1 change: 0 additions & 1 deletion examples/sites/demos/pc/app/form/error-slot.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@ export default {

<style lang="less">
.custom-error {
padding: 4px 0;
display: flex;
.tiny-svg {
fill: var(--ti-tooltip-validate-icon-color);
Expand Down
13 changes: 12 additions & 1 deletion examples/sites/demos/pc/app/form/slot-label-composition-api.vue
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
<tiny-date-picker v-model="createData.datepicker"></tiny-date-picker>
</tiny-form-item>
<tiny-form-item prop="url">
<template #label> URL </template>
<template #label>
<div class="custom-label">超过两行文字,省略显示</div>
</template>
<tiny-input v-model="createData.url"></tiny-input>
</tiny-form-item>
<tiny-form-item prop="radio">
Expand Down Expand Up @@ -79,4 +81,13 @@ function handleSubmit() {
.demo-form {
width: 380px;
}
.custom-label {
display: -webkit-box;
width: 100%;
-webkit-line-clamp: 2;
line-height: 1.2;
overflow: hidden;
-webkit-box-orient: vertical;
white-space: wrap;
}
</style>

0 comments on commit a9015aa

Please sign in to comment.