Skip to content

Commit 964240e

Browse files
feat: ✨ 为所有组件补充customStyle属性
Closes: #212
1 parent e431294 commit 964240e

File tree

45 files changed

+76
-59
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

45 files changed

+76
-59
lines changed

src/uni_modules/wot-design-uni/components/wd-card/wd-card.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="['wd-card', type == 'rectangle' ? 'is-rectangle' : '', customClass]">
2+
<view :class="['wd-card', type == 'rectangle' ? 'is-rectangle' : '', customClass]" :style="customStyle">
33
<view :class="['wd-card__title-content', customTitleClass]">
44
<view class="wd-card__title">
55
<text v-if="title">{{ title }}</text>

src/uni_modules/wot-design-uni/components/wd-cell-group/wd-cell-group.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="['wd-cell-group', border ? 'is-border' : '', customClass]">
2+
<view :class="['wd-cell-group', border ? 'is-border' : '', customClass]" :style="customStyle">
33
<view v-if="title || value || useSlot" class="wd-cell-group__title">
44
<!--左侧标题-->
55
<view class="wd-cell-group__left">

src/uni_modules/wot-design-uni/components/wd-cell/wd-cell.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<template>
22
<view
33
:class="['wd-cell', isBorder ? 'is-border' : '', size ? 'is-' + size : '', center ? 'is-center' : '', customClass]"
4+
:style="customStyle"
45
:hover-class="isLink || clickable ? 'is-hover' : 'none'"
56
hover-stay-time="70"
67
@click="onClick"

src/uni_modules/wot-design-uni/components/wd-checkbox-group/wd-checkbox-group.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="`wd-checkbox-group ${shape === 'button' && cell ? 'is-button' : ''} ${customClass}`">
2+
<view :class="`wd-checkbox-group ${shape === 'button' && cell ? 'is-button' : ''} ${customClass}`" :style="customStyle">
33
<slot />
44
</view>
55
</template>

src/uni_modules/wot-design-uni/components/wd-checkbox/wd-checkbox.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
} ${isLast ? 'is-last-child' : ''} ${innerInline ? 'is-inline' : ''} ${innerShape === 'button' ? 'is-button' : ''} ${
66
innerDisabled ? 'is-disabled' : ''
77
} ${innerSize ? 'is-' + innerSize : ''} ${customClass}`"
8+
:style="customStyle"
89
@click="toggle"
910
>
1011
<!--shape为button时,移除wd-checkbox__shape,只保留wd-checkbox__label-->

src/uni_modules/wot-design-uni/components/wd-circle/wd-circle.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="`wd-circle ${customClass}`">
2+
<view :class="`wd-circle ${customClass}`" :style="customStyle">
33
<canvas :width="canvasSize" :height="canvasSize" :style="style" :id="canvasId" :canvas-id="canvasId"></canvas>
44
<view v-if="!text" class="wd-circle__text">
55
<!-- 自定义提示内容 -->

src/uni_modules/wot-design-uni/components/wd-col-picker/wd-col-picker.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="`wd-col-picker ${cell.border.value ? 'is-border' : ''} ${customClass}`">
2+
<view :class="`wd-col-picker ${cell.border.value ? 'is-border' : ''} ${customClass}`" :style="customStyle">
33
<view class="wd-col-picker__field" @click="showPicker">
44
<slot v-if="useDefaultSlot"></slot>
55
<view

src/uni_modules/wot-design-uni/components/wd-collapse-item/wd-collapse-item.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="`wd-collapse-item ${disabled ? 'is-disabled' : ''} is-border ${customClass}`">
2+
<view :class="`wd-collapse-item ${disabled ? 'is-disabled' : ''} is-border ${customClass}`" :style="customStyle">
33
<view :class="`wd-collapse-item__header ${isFirst ? 'wd-collapse-item__header-first' : ''}`" @click="handleClick">
44
<text class="wd-collapse-item__title">{{ title }}</text>
55
<wd-icon name="arrow-down" :custom-class="`wd-collapse-item__arrow ${expanded ? 'is-retract' : ''}`" />

src/uni_modules/wot-design-uni/components/wd-collapse/wd-collapse.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<template>
2-
<view :class="`wd-collapse ${viewmore ? 'is-viewmore' : ''} ${customClass}`">
2+
<view :class="`wd-collapse ${viewmore ? 'is-viewmore' : ''} ${customClass}`" :style="customStyle">
33
<!-- 普通或手风琴 -->
44
<block v-if="!viewmore">
55
<slot></slot>

src/uni_modules/wot-design-uni/components/wd-curtain/wd-curtain.vue

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
@close="close"
1616
@click-modal="clickModal"
1717
:custom-class="`wd-curtain ${customClass}`"
18+
:custom-style="customStyle"
1819
>
1920
<view class="wd-curtain__content">
2021
<image :src="src" class="wd-curtain__content-img" :style="imgStyle" @click="clickImage" @error="imgErr" @load="imgLoad"></image>

0 commit comments

Comments
 (0)