Skip to content

Commit

Permalink
fix: add default width
Browse files Browse the repository at this point in the history
  • Loading branch information
BeADre committed Jun 7, 2022
1 parent fc2fb08 commit 09fe1cc
Show file tree
Hide file tree
Showing 17 changed files with 37 additions and 22 deletions.
1 change: 1 addition & 0 deletions packages/varlet-ui/src/app-bar/appBar.less
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
.var-app-bar {
position: relative;
display: flex;
width: 100%;
justify-content: center;
align-items: center;
height: var(--app-bar-height);
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/card/card.less
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
.var-card {
border-radius: var(--card-border-radius);
overflow: hidden;
width: 100%;

&__floater {
display: flex;
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/cell/cell.less
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
display: flex;
min-height: var(--cell-min-height);
outline: none;
width: 100%;
padding: var(--cell-padding);
position: relative;
box-sizing: border-box;
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/collapse/Collapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,6 @@ export default defineComponent({
.var-collapse {
position: relative;
width: 100%;
}
</style>
1 change: 1 addition & 0 deletions packages/varlet-ui/src/date-picker/date-picker.less
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@
border-radius: var(--date-picker-border-radius);
contain: layout style;
display: flex;
width: 100%;
flex-direction: column;
font-size: var(--date-picker-font-size);
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -258,7 +258,7 @@ exports[`test form with radio 4`] = `
exports[`test form with rate 1`] = `
"<div class=\\"var-form\\">
<div class=\\"var-rate__warp\\">
<div class=\\"var-rate__wrap\\">
<div class=\\"var-rate\\">
<div style=\\"border-radius: 50%;\\" class=\\"var-rate__content var-rate--disabled\\"><i class=\\"var-icon var-icon--set var-icon-star-outline var-rate__content-icon\\" style=\\"transition: transform 0ms;\\" var-rate-cover=\\"\\"></i></div>
<div style=\\"border-radius: 50%;\\" class=\\"var-rate__content var-rate--disabled\\"><i class=\\"var-icon var-icon--set var-icon-star-outline var-rate__content-icon\\" style=\\"transition: transform 0ms;\\" var-rate-cover=\\"\\"></i></div>
Expand All @@ -275,7 +275,7 @@ exports[`test form with rate 1`] = `
exports[`test form with rate 2`] = `
"<div class=\\"var-form\\">
<div class=\\"var-rate__warp\\">
<div class=\\"var-rate__wrap\\">
<div class=\\"var-rate\\">
<div style=\\"border-radius: 50%;\\" class=\\"var-rate__content var-rate--error\\"><i class=\\"var-icon var-icon--set var-icon-star-outline var-rate__content-icon\\" style=\\"transition: transform 0ms;\\" var-rate-cover=\\"\\"></i></div>
<div style=\\"border-radius: 50%;\\" class=\\"var-rate__content var-rate--error\\"><i class=\\"var-icon var-icon--set var-icon-star-outline var-rate__content-icon\\" style=\\"transition: transform 0ms;\\" var-rate-cover=\\"\\"></i></div>
Expand All @@ -295,7 +295,7 @@ exports[`test form with rate 2`] = `
exports[`test form with rate 3`] = `
"<div class=\\"var-form\\">
<div class=\\"var-rate__warp\\">
<div class=\\"var-rate__wrap\\">
<div class=\\"var-rate\\">
<div style=\\"border-radius: 50%;\\" class=\\"var-rate__content\\"><i class=\\"var-icon var-icon--set var-icon-star-outline var-rate__content-icon\\" style=\\"transition: transform 0ms;\\" var-rate-cover=\\"\\"></i></div>
<div style=\\"border-radius: 50%;\\" class=\\"var-rate__content\\"><i class=\\"var-icon var-icon--set var-icon-star-outline var-rate__content-icon\\" style=\\"transition: transform 0ms;\\" var-rate-cover=\\"\\"></i></div>
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/pagination/pagination.less
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@
display: flex;
align-items: center;
list-style: none;
width: 100%;
margin: 0;
font-size: var(--pagination-font-size);
padding: 0;
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/pull-refresh/pullRefresh.less
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
overflow: hidden;
position: relative;
user-select: none;
width: 100%;

&__control {
display: flex;
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/rate/Rate.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<template>
<div :class="n('warp')">
<div :class="n('wrap')">
<div :class="n()">
<div
:key="val"
Expand Down
4 changes: 4 additions & 0 deletions packages/varlet-ui/src/rate/rate.less
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@
display: flex;
transform: translateX(calc(-1 * var(--rate-action-padding)));

&__wrap {
width: 100%;
}

&__content {
padding: var(--rate-action-padding);
box-sizing: unset;
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/slider/slider.less
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@

.var-slider {
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
width: 100%;

&__block {
display: flex;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,61 +3,61 @@
exports[`test snackbar example 1`] = `
"<div class=\\"app-type\\">组件调用</div>
<div class=\\"var-space var--box\\" style=\\"flex-direction: column; justify-content: start; flex-wrap: wrap;\\">
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">基本使用</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">垂直排列</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">底部显示</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">显示时长</div>
</button></div>
<div style=\\"margin: 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<div style=\\"margin: 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">禁止穿透点击</div>
</button></div>
</div>
<div class=\\"app-type\\">函数调用</div>
<div class=\\"var-space var--box\\" style=\\"flex-direction: column; justify-content: start; flex-wrap: wrap;\\">
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">基本使用</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">显示时长</div>
</button></div>
<div style=\\"margin: 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<div style=\\"margin: 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">底部显示</div>
</button></div>
</div>
<div class=\\"app-type\\">Snackbar 类型</div>
<div class=\\"var-space var--box\\" style=\\"flex-direction: column; justify-content: start; flex-wrap: wrap;\\">
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--success var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--success var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">成功</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--warning var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">警告</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--info var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--info var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">消息</div>
</button></div>
<div style=\\"margin: 0px 0px 30.72px 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--danger var-elevation--2\\">
<div style=\\"margin: 0px 0px 30.72px 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--danger var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">错误</div>
</button></div>
<div style=\\"margin: 0px;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<div style=\\"margin: 0px; width: 100%;\\"><button class=\\"var-button var--box var-button--normal var--flex var-button--block var-button--primary var-elevation--2\\">
<!--v-if-->
<div class=\\"var-button__content\\">加载</div>
</button></div>
Expand Down
2 changes: 1 addition & 1 deletion packages/varlet-ui/src/space/Space.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default defineComponent({
margin = `0 0 ${y}px 0`
}

return <div style={{ margin }}>{child}</div>
return <div style={{ margin, width: '100%' }}>{child}</div>
})

return (
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/steps/Steps.vue
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ export default defineComponent({
@import '../styles/common';
.var-steps {
width: 100%;
display: flex;
justify-content: space-between;
overflow: hidden;
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/swipe/swipe.less
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
position: relative;
overflow: hidden;
user-select: none;
width: 100%;

&__track {
width: 100%;
Expand Down
1 change: 1 addition & 0 deletions packages/varlet-ui/src/time-picker/timePicker.less
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@
border-radius: var(--time-picker-border-radius);
contain: layout style;
display: flex;
width: 100%;
flex-direction: column;
font-size: var(--time-picker-font-size);
position: relative;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,10 +275,10 @@ exports[`test uploader example 1`] = `
</div>
<div class=\\"app-type\\">自定义渲染文件列表</div>
<div class=\\"var-space var--box\\" style=\\"flex-direction: row; justify-content: start; flex-wrap: wrap; margin: -4px 0px;\\">
<div style=\\"margin: 4px 12px 4px 0px;\\"><img class=\\"custom-uploader-file\\" src=\\"https://varlet-varletjs.vercel.app/cat.jpg\\"></div>
<div style=\\"margin: 4px 12px 4px 0px;\\"><img class=\\"custom-uploader-file\\" src=\\"https://varlet-varletjs.vercel.app/cat.jpg\\"></div>
<div style=\\"margin: 4px 12px 4px 0px;\\"><img class=\\"custom-uploader-file\\" src=\\"https://varlet-varletjs.vercel.app/cat.jpg\\"></div>
<div style=\\"margin: 4px 0px;\\">
<div style=\\"margin: 4px 12px 4px 0px; width: 100%;\\"><img class=\\"custom-uploader-file\\" src=\\"https://varlet-varletjs.vercel.app/cat.jpg\\"></div>
<div style=\\"margin: 4px 12px 4px 0px; width: 100%;\\"><img class=\\"custom-uploader-file\\" src=\\"https://varlet-varletjs.vercel.app/cat.jpg\\"></div>
<div style=\\"margin: 4px 12px 4px 0px; width: 100%;\\"><img class=\\"custom-uploader-file\\" src=\\"https://varlet-varletjs.vercel.app/cat.jpg\\"></div>
<div style=\\"margin: 4px 0px; width: 100%;\\">
<div class=\\"var-uploader var--box\\">
<div class=\\"var-uploader__file-list\\">
<div class=\\"\\"><input class=\\"var-uploader__action-input\\" type=\\"file\\" accept=\\"image/*\\"><button class=\\"var-button var--box var-button--normal var--inline-flex var-button--primary var-elevation--2 var-button--round\\">
Expand Down

0 comments on commit 09fe1cc

Please sign in to comment.