papayaui 0.2.3 → 0.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.DS_Store +0 -0
- package/components/cell/cell.scss +7 -0
- package/components/cell/cell.vue +4 -1
- package/components/cell/props.ts +4 -0
- package/components/checkbox-btns/checkbox-btns.scss +5 -3
- package/components/checkbox-btns/checkbox-btns.vue +7 -5
- package/components/checkbox-btns/props.ts +1 -4
- package/components/field/props.ts +1 -1
- package/components/form-item/form-item.vue +9 -1
- package/components/form-item/props.ts +5 -1
- package/components/menu/menu.scss +8 -8
- package/components/menu-item/menu-item.vue +1 -0
- package/components/menu-item/props.ts +2 -0
- package/components/search/props.ts +1 -0
- package/components/search/search.scss +13 -8
- package/components/search/search.vue +3 -1
- package/fonts/.DS_Store +0 -0
- package/images/.DS_Store +0 -0
- package/package.json +1 -1
package/.DS_Store
ADDED
|
Binary file
|
|
@@ -24,6 +24,13 @@
|
|
|
24
24
|
margin-right: _var(cell-icon-left-margin-left, 4px);
|
|
25
25
|
}
|
|
26
26
|
|
|
27
|
+
&__label {
|
|
28
|
+
margin-top: 4px;
|
|
29
|
+
color: _var(cell-label-color, _var(color-black-3));
|
|
30
|
+
font-size: _var(cell-label-font-size, 12px);
|
|
31
|
+
line-height: _var(cell-label-line-height, 18px);
|
|
32
|
+
}
|
|
33
|
+
|
|
27
34
|
&__value {
|
|
28
35
|
position: relative;
|
|
29
36
|
overflow: hidden;
|
package/components/cell/cell.vue
CHANGED
|
@@ -17,7 +17,10 @@
|
|
|
17
17
|
:style="{ flex: titleWidth ? `0 ${getUnitValue(titleWidth)}` : '1' }"
|
|
18
18
|
>
|
|
19
19
|
<slot v-if="$slots.title" name="title" />
|
|
20
|
-
<
|
|
20
|
+
<template v-else>
|
|
21
|
+
<text>{{ title }}</text>
|
|
22
|
+
<view v-if="label" :class="ns.e('label')">{{ label }}</view>
|
|
23
|
+
</template>
|
|
21
24
|
</view>
|
|
22
25
|
<view :class="[ns.e('value'), valueClass]">
|
|
23
26
|
<slot v-if="$slots.default" />
|
package/components/cell/props.ts
CHANGED
|
@@ -3,14 +3,16 @@
|
|
|
3
3
|
&-button {
|
|
4
4
|
font-size: _var(checkbox-btns-font-size, 14px);
|
|
5
5
|
color: _var(checkbox-btns-color, _var(color-black));
|
|
6
|
+
background-color: _var(checkbox-btns-background, _var(color-gray));
|
|
7
|
+
border-color: _var(checkbox-btns-border-color, _var(color-gray));
|
|
6
8
|
padding: _var(checkbox-btns-padding, 7px 4px);
|
|
7
9
|
border-width: _var(checkbox-btns-border-width, 2rpx);
|
|
8
10
|
border-style: solid;
|
|
9
11
|
text-align: center;
|
|
10
12
|
&.active {
|
|
11
|
-
color: _var(color-primary);
|
|
12
|
-
background-color: rgba(0, 156, 93, 0.1) !important;
|
|
13
|
-
border-color: _var(color-primary) !important;
|
|
13
|
+
color: _var(checkbox-btns-active-color, _var(color-primary));
|
|
14
|
+
background-color: _var(checkbox-btns-active-background, rgba(0, 156, 93, 0.1)) !important;
|
|
15
|
+
border-color: _var(checkbox-btns-active-border-color, _var(color-primary)) !important;
|
|
14
16
|
}
|
|
15
17
|
}
|
|
16
18
|
}
|
|
@@ -13,11 +13,13 @@
|
|
|
13
13
|
active: typeof modelValue !== 'undefined' ? isSelected(item[valueKey]) : false,
|
|
14
14
|
},
|
|
15
15
|
]"
|
|
16
|
-
:style="
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
16
|
+
:style="
|
|
17
|
+
ns.style({
|
|
18
|
+
backgroundColor: bgColor,
|
|
19
|
+
borderColor: bgColor,
|
|
20
|
+
borderRadius: getUnitValue(typeof round === 'boolean' ? (round ? '100' : '0') : round),
|
|
21
|
+
})
|
|
22
|
+
"
|
|
21
23
|
@tap="onSelect(item, index)"
|
|
22
24
|
>
|
|
23
25
|
<slot v-if="$slots.default" :item="item" :index="index" />
|
|
@@ -112,7 +112,7 @@ export const fieldProps = {
|
|
|
112
112
|
export const fieldEmits = {
|
|
113
113
|
'update:modelValue': (value: string) => isString(value),
|
|
114
114
|
input: (value: string) => isString(value),
|
|
115
|
-
blur: (value:
|
|
115
|
+
blur: (value: unknown) => isObject(value),
|
|
116
116
|
confirm: (value: EventDetail<{ value: string }>) => isObject(value),
|
|
117
117
|
clear: () => true,
|
|
118
118
|
'click-input': (value: Event) => isObject(value),
|
|
@@ -4,9 +4,17 @@
|
|
|
4
4
|
:title="label"
|
|
5
5
|
:error-message="errorMessage"
|
|
6
6
|
v-bind="$props"
|
|
7
|
+
:label="desc"
|
|
7
8
|
@click="emit('click')"
|
|
8
9
|
/>
|
|
9
|
-
<Cell
|
|
10
|
+
<Cell
|
|
11
|
+
v-else
|
|
12
|
+
:title="label"
|
|
13
|
+
:error-message="errorMessage"
|
|
14
|
+
v-bind="$props"
|
|
15
|
+
:label="desc"
|
|
16
|
+
@click="emit('click')"
|
|
17
|
+
>
|
|
10
18
|
<slot />
|
|
11
19
|
</Cell>
|
|
12
20
|
</template>
|
|
@@ -4,7 +4,7 @@ import { pick } from '../../utils'
|
|
|
4
4
|
import { cellProps } from '../cell'
|
|
5
5
|
|
|
6
6
|
export const formItemProps = {
|
|
7
|
-
...pick(cellProps, ['suffix']),
|
|
7
|
+
...pick(cellProps, ['titleWidth', 'suffix']),
|
|
8
8
|
/**
|
|
9
9
|
* 校验对应的字段名
|
|
10
10
|
*/
|
|
@@ -13,6 +13,10 @@ export const formItemProps = {
|
|
|
13
13
|
* 标签名
|
|
14
14
|
*/
|
|
15
15
|
label: String,
|
|
16
|
+
/**
|
|
17
|
+
* 描述信息
|
|
18
|
+
*/
|
|
19
|
+
desc: String,
|
|
16
20
|
/**
|
|
17
21
|
* 校验规则
|
|
18
22
|
*/
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
@import '../../styles/vars.scss';
|
|
2
2
|
|
|
3
3
|
.#{$prefix}-menu {
|
|
4
|
-
$barHeight: 48px;
|
|
4
|
+
$barHeight: _var(menu-height, 48px);
|
|
5
5
|
|
|
6
6
|
position: relative;
|
|
7
7
|
&__bar {
|
|
8
8
|
position: relative;
|
|
9
9
|
display: flex;
|
|
10
10
|
height: $barHeight;
|
|
11
|
-
background-color: #fff;
|
|
12
|
-
box-shadow: 0 2px 12px rgb(100 101 102 / 12%);
|
|
11
|
+
background-color: _var(menu-background, #fff);
|
|
12
|
+
box-shadow: _var(menu-shadow, 0 2px 12px rgb(100 101 102 / 12%));
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
&__item {
|
|
@@ -25,10 +25,10 @@
|
|
|
25
25
|
position: relative;
|
|
26
26
|
box-sizing: border-box;
|
|
27
27
|
max-width: 100%;
|
|
28
|
-
padding: 0 8px;
|
|
29
|
-
color: _var(color-black);
|
|
30
|
-
font-size: 15px;
|
|
31
|
-
line-height: 22px;
|
|
28
|
+
padding: _var(menu-title-padding, 0 8px);
|
|
29
|
+
color: _var(menu-title-color, _var(color-black));
|
|
30
|
+
font-size: _var(menu-title-font-size, 15px);
|
|
31
|
+
line-height: _var(menu-title-line-height, 22px);
|
|
32
32
|
|
|
33
33
|
&::after {
|
|
34
34
|
position: absolute;
|
|
@@ -60,4 +60,4 @@
|
|
|
60
60
|
border-color: transparent transparent currentColor currentColor;
|
|
61
61
|
}
|
|
62
62
|
}
|
|
63
|
-
}
|
|
63
|
+
}
|
|
@@ -51,6 +51,7 @@ export const searchEmits = {
|
|
|
51
51
|
'update:modelValue': (value: string) => isString(value),
|
|
52
52
|
change: (value: string) => isString(value),
|
|
53
53
|
confirm: (value: EventDetail<{ value: string }>) => isObject(value),
|
|
54
|
+
blur: (value: unknown) => isObject(value),
|
|
54
55
|
clear: () => true,
|
|
55
56
|
'click-input': () => true,
|
|
56
57
|
}
|
|
@@ -1,18 +1,23 @@
|
|
|
1
1
|
@import '../../styles/vars.scss';
|
|
2
2
|
.#{$prefix}-search {
|
|
3
|
-
@include _setVar(field-input-color, _var(color-black));
|
|
4
|
-
@include _setVar(cell-bg-color, transparent);
|
|
5
|
-
@include _setVar(cell-title-color, _var(color-black-3));
|
|
6
|
-
@include _setVar(cell-padding-x, 8px);
|
|
7
|
-
@include _setVar(cell-padding-y, 8px);
|
|
8
3
|
padding: _var(search-padding, 10px 12px);
|
|
9
4
|
background-color: _var(search-bg-color, #fff);
|
|
10
|
-
|
|
5
|
+
|
|
6
|
+
&__content {
|
|
11
7
|
flex: 1;
|
|
12
8
|
background-color: _var(search-input-bg-color, _var(color-gray));
|
|
13
|
-
border-radius: 3px;
|
|
9
|
+
border-radius: _var(search-input-radius, 3px);
|
|
14
10
|
}
|
|
15
|
-
|
|
11
|
+
|
|
12
|
+
&__input {
|
|
13
|
+
@include _setVar(field-input-color, _var(search-input-color, _var(color-black)));
|
|
14
|
+
@include _setVar(cell-bg-color, transparent);
|
|
15
|
+
@include _setVar(cell-title-color, _var(search-icon-color, _var(color-black-3)));
|
|
16
|
+
@include _setVar(cell-padding-x, _var(search-input-padding-x, 8px));
|
|
17
|
+
@include _setVar(cell-padding-y, _var(search-input-padding-y, 5px));
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
&--round &__content {
|
|
16
21
|
border-radius: 100px;
|
|
17
22
|
}
|
|
18
23
|
}
|
|
@@ -6,12 +6,13 @@
|
|
|
6
6
|
>
|
|
7
7
|
<slot name="before" />
|
|
8
8
|
<view
|
|
9
|
-
:class="ns.
|
|
9
|
+
:class="ns.e('content')"
|
|
10
10
|
class="flex items-center"
|
|
11
11
|
:style="ns.style({ backgroundColor: inputBackground })"
|
|
12
12
|
>
|
|
13
13
|
<slot name="prefix" />
|
|
14
14
|
<Field
|
|
15
|
+
:class="ns.e('input')"
|
|
15
16
|
class="flex-1"
|
|
16
17
|
:model-value="modelValue"
|
|
17
18
|
icon="search"
|
|
@@ -23,6 +24,7 @@
|
|
|
23
24
|
:clearable="clearable"
|
|
24
25
|
@update:model-value="onUpdate"
|
|
25
26
|
@confirm="emit('confirm', $event)"
|
|
27
|
+
@blur="emit('blur', $event)"
|
|
26
28
|
@clear="emit('clear')"
|
|
27
29
|
@click-input="emit('click-input')"
|
|
28
30
|
/>
|
package/fonts/.DS_Store
ADDED
|
Binary file
|
package/images/.DS_Store
ADDED
|
Binary file
|