stellar-ui-plus 1.20.15 → 1.20.17
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/components/ste-goods-info/ATTRIBUTES.md +4 -0
- package/components/ste-goods-info/props.ts +10 -0
- package/components/ste-goods-info/ste-goods-info.easycom.json +12 -0
- package/components/ste-goods-info/ste-goods-info.vue +2 -2
- package/components/ste-number-keyboard/ATTRIBUTES.md +1 -0
- package/components/ste-number-keyboard/KeyboardVue.vue +3 -2
- package/components/ste-number-keyboard/props.ts +1 -0
- package/components/ste-number-keyboard/ste-number-keyboard.easycom.json +6 -0
- package/components/ste-number-keyboard/ste-number-keyboard.vue +2 -0
- package/components/ste-stepper/ATTRIBUTES.md +1 -0
- package/components/ste-user-info/ATTRIBUTES.md +1 -0
- package/components/ste-user-info/README.md +141 -18
- package/components/ste-user-info/props.ts +1 -0
- package/components/ste-user-info/ste-user-info.easycom.json +6 -0
- package/components/ste-user-info/ste-user-info.vue +91 -8
- package/package.json +1 -1
- package/utils/System.ts +1 -1
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
| 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
|
|
3
3
|
| ----- | ----- | --- | ------- | ------ | -------- |
|
|
4
4
|
| `data` | 商品数据 | `{ image: string; title: string; tag?: string; barCode: string; code: string; price: string / number; originalPrice?: string / number }` | `{}` | - | - |
|
|
5
|
+
| `background` | 组件背景色 | `string` | `#fff` | - | - |
|
|
5
6
|
| `imageSize` | 图片大小 | `string / number` | `160` | - | - |
|
|
7
|
+
| `imageRadius` | 图片圆角 | `string / number` | `4` | - | - |
|
|
6
8
|
| `hidePrice` | 隐藏价格 | `boolean` | `false` | - | - |
|
|
7
9
|
| `priceSize` | 价格文本大小 | `string / number` | `28` | - | - |
|
|
8
10
|
| `priceColor` | 价格文本颜色 | `string` | `#ea4335` | - | - |
|
|
@@ -16,6 +18,7 @@
|
|
|
16
18
|
| `number` | 数量 | `number` | `1` | - | - |
|
|
17
19
|
| `stepper` | 是否显示步进器 | `boolean` | `false` | - | - |
|
|
18
20
|
| `readonlyStepper` | 步进器只读 | `boolean` | `false` | - | - |
|
|
21
|
+
| `readonlyStepperInput` | 步进器输入框只读 | `boolean` | `false` | - | - |
|
|
19
22
|
| `disabledStepper` | 禁用步进器 | `boolean` | `false` | - | - |
|
|
20
23
|
| `disableInput` | 禁用步进器输入框 | `boolean` | `false` | - | - |
|
|
21
24
|
| `disablePlus` | 禁用步进器加号 | `boolean` | `false` | - | - |
|
|
@@ -35,3 +38,4 @@
|
|
|
35
38
|
| `plus` | 点击加号前置钩子函数 | `value`:改变后的绑定值<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
36
39
|
| `minus` | 点击减号前置钩子函数 | `value`:改变后的绑定值<br/>`suspend`:等待<br/>`next`:继续<br/>`stop`:停止 | - |
|
|
37
40
|
| `click-suggest` | 点击建议模块触发 | `type`:点击的区域:'method' / 'back' / 'item' / 'right'<br/>`item`:type为item时,点击的item对象 | - |
|
|
41
|
+
| `click-stepper-input` | 点击步进器输入框触发 | - | - |
|
|
@@ -26,11 +26,21 @@ export default {
|
|
|
26
26
|
type: Object as PropType<GoodsInfoType>,
|
|
27
27
|
default: () => ({}),
|
|
28
28
|
},
|
|
29
|
+
/** 组件背景色 */
|
|
30
|
+
background: {
|
|
31
|
+
type: String,
|
|
32
|
+
default: () => '#fff',
|
|
33
|
+
},
|
|
29
34
|
/** image大小 */
|
|
30
35
|
imageSize: {
|
|
31
36
|
type: [Number, String],
|
|
32
37
|
default: () => 160,
|
|
33
38
|
},
|
|
39
|
+
/** 图片圆角 */
|
|
40
|
+
imageRadius: {
|
|
41
|
+
type: [String, Number],
|
|
42
|
+
default: () => 4,
|
|
43
|
+
},
|
|
34
44
|
/** 是否隐藏价格 */
|
|
35
45
|
hidePrice: {
|
|
36
46
|
type: Boolean,
|
|
@@ -10,12 +10,24 @@
|
|
|
10
10
|
"type": "{ image: string; title: string; tag?: string; barCode: string; code: string; price: string | number; originalPrice?: string | number }",
|
|
11
11
|
"default": "{}"
|
|
12
12
|
},
|
|
13
|
+
{
|
|
14
|
+
"name": "background",
|
|
15
|
+
"description": "组件背景色",
|
|
16
|
+
"type": "string",
|
|
17
|
+
"default": "#fff"
|
|
18
|
+
},
|
|
13
19
|
{
|
|
14
20
|
"name": "imageSize",
|
|
15
21
|
"description": "图片大小",
|
|
16
22
|
"type": "string | number",
|
|
17
23
|
"default": "160"
|
|
18
24
|
},
|
|
25
|
+
{
|
|
26
|
+
"name": "imageRadius",
|
|
27
|
+
"description": "图片圆角",
|
|
28
|
+
"type": "string | number",
|
|
29
|
+
"default": "4"
|
|
30
|
+
},
|
|
19
31
|
{
|
|
20
32
|
"name": "hidePrice",
|
|
21
33
|
"description": "隐藏价格",
|
|
@@ -58,6 +58,7 @@ watch(
|
|
|
58
58
|
|
|
59
59
|
const rootStyle = computed(() => {
|
|
60
60
|
let style: Record<string, string> = {
|
|
61
|
+
background: props.background,
|
|
61
62
|
// 图片大小,默认插槽存在的情况下160rpx,否则为110rpx
|
|
62
63
|
'--image-size': utils.formatPx(props.imageSize, 'str'),
|
|
63
64
|
};
|
|
@@ -161,7 +162,7 @@ const clickInput = () => emits('click-stepper-input');
|
|
|
161
162
|
</view>
|
|
162
163
|
<view class="ste-goods-info-view">
|
|
163
164
|
<view class="ste-goods-info-image">
|
|
164
|
-
<setImage :src="data.image" :width="imageSize" :height="imageSize" @click="onClick('image')" />
|
|
165
|
+
<setImage :radius="imageRadius" :src="data.image" :width="imageSize" :height="imageSize" @click="onClick('image')" />
|
|
165
166
|
</view>
|
|
166
167
|
<view class="ste-goods-info-content">
|
|
167
168
|
<view class="ste-goods-info-header">
|
|
@@ -264,7 +265,6 @@ const clickInput = () => emits('click-stepper-input');
|
|
|
264
265
|
.ste-goods-info-root {
|
|
265
266
|
width: 100%;
|
|
266
267
|
position: relative;
|
|
267
|
-
background-color: #fff;
|
|
268
268
|
border-radius: 12rpx;
|
|
269
269
|
.ste-goods-info-details {
|
|
270
270
|
width: 100%;
|
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
| `keyBg` | 按键背景颜色 | `string` | `#fff` | - | - |
|
|
16
16
|
| `background` | 背景颜色 | `string` | `#f9f9f9` | - | - |
|
|
17
17
|
| `textSize` | 按键文字大小 | `number / string` | `48` | - | - |
|
|
18
|
+
| `backspaceSize` | 回退按钮图标大小 | `number / string` | `48` | - | - |
|
|
18
19
|
| `confirmBg` | 确定按钮背景颜色 | `string` | `#0090FF` | - | - |
|
|
19
20
|
| `confirmColor` | 确定按钮文字颜色 | `string` | `#ffffff` | - | - |
|
|
20
21
|
| `undefined` | - | `undefined` | - | - | - |
|
|
@@ -17,6 +17,7 @@ const props = defineProps({
|
|
|
17
17
|
keyBg: { type: String },
|
|
18
18
|
background: { type: String },
|
|
19
19
|
textSize: { type: [Number, String] },
|
|
20
|
+
backspaceSize: { type: [Number, String] },
|
|
20
21
|
rightKeys: { type: Boolean },
|
|
21
22
|
});
|
|
22
23
|
|
|
@@ -105,7 +106,7 @@ console.log(rows.value);
|
|
|
105
106
|
@click="onChange(num)"
|
|
106
107
|
>
|
|
107
108
|
<view v-if="['backspace', 'clear'].indexOf(num) !== -1">
|
|
108
|
-
<ste-icon v-if="num === 'backspace'" code="" :color="textColor" :size="
|
|
109
|
+
<ste-icon v-if="num === 'backspace'" code="" :color="textColor" :size="backspaceSize" />
|
|
109
110
|
<text v-else-if="num === 'clear'">清除</text>
|
|
110
111
|
</view>
|
|
111
112
|
<view v-else>
|
|
@@ -117,7 +118,7 @@ console.log(rows.value);
|
|
|
117
118
|
</view>
|
|
118
119
|
<view class="number-keyboard-right" v-if="rightKeys">
|
|
119
120
|
<view class="number-keyboard-item" @click="onChange('backspace')">
|
|
120
|
-
<ste-icon code="" :color="textColor" :size="
|
|
121
|
+
<ste-icon code="" :color="textColor" :size="backspaceSize" />
|
|
121
122
|
</view>
|
|
122
123
|
<view class="number-keyboard-item clear" v-if="showClear" @click="onChange('clear')">清除</view>
|
|
123
124
|
<view class="number-keyboard-item confirm" :class="{ disabled }" @click="onChange('confirm')">
|
|
@@ -34,6 +34,7 @@ export default {
|
|
|
34
34
|
showClear: { type: Boolean, default: () => true },
|
|
35
35
|
textColor: { type: String, default: () => '#000' },
|
|
36
36
|
textSize: { type: [Number, String], default: () => 48 },
|
|
37
|
+
backspaceSize: { type: [Number, String], default: () => 48 },
|
|
37
38
|
confirmBg: { type: String, default: () => '' },
|
|
38
39
|
confirmColor: { type: String, default: () => '#fff' },
|
|
39
40
|
// 按键背景颜色
|
|
@@ -45,6 +45,7 @@ const { cmpNumbers, cmpRootStyle, dataShow, onClose, onChange, onOpen } = useDat
|
|
|
45
45
|
:showClear="showClear"
|
|
46
46
|
:textColor="textColor"
|
|
47
47
|
:textSize="textSize"
|
|
48
|
+
:backspaceSize="backspaceSize"
|
|
48
49
|
:rightKeys="rightKeys"
|
|
49
50
|
:keyBg="keyBg"
|
|
50
51
|
:background="background"
|
|
@@ -61,6 +62,7 @@ const { cmpNumbers, cmpRootStyle, dataShow, onClose, onChange, onOpen } = useDat
|
|
|
61
62
|
:showClear="showClear"
|
|
62
63
|
:textColor="textColor"
|
|
63
64
|
:textSize="textSize"
|
|
65
|
+
:backspaceSize="backspaceSize"
|
|
64
66
|
:rightKeys="rightKeys"
|
|
65
67
|
:keyBg="keyBg"
|
|
66
68
|
:background="background"
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
| `disablePlus` | 是否禁用增加按钮 | `boolean` | `false` | - | - |
|
|
15
15
|
| `disableMinus` | 是否禁用减少按钮 | `boolean` | `false` | - | - |
|
|
16
16
|
| `disableInput` | 是否禁用输入框 | `boolean` | `false` | - | - |
|
|
17
|
+
| `readonlyInput` | 输入框只读 | `boolean` | `false` | - | - |
|
|
17
18
|
| `background` | 徽标:背景 | `string` | `#ee0a24` | - | - |
|
|
18
19
|
| `showDot` | 徽标:是否展示为小红点 | `boolean` | `false` | - | - |
|
|
19
20
|
| `offsetX` | 徽标:根据徽标位置,设置x轴偏移量 | `number / string` | `auto` | - | - |
|
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
| `list` | 数据列表(最多三个) | `Array` | `[]` | - | - |
|
|
8
8
|
| `codeSrc` | 功能码图片 | `String` | `` | - | - |
|
|
9
9
|
| `codeTitle` | 功能码标题 | `String` | `` | - | - |
|
|
10
|
+
| `codeTitleColor` | 功能码标题颜色 | `String` | `主题色` | - | - |
|
|
10
11
|
| `showCode` | 是否展示功能码相关 | `Boolean` | `true` | - | - |
|
|
11
12
|
|
|
12
13
|
|
|
@@ -1,50 +1,173 @@
|
|
|
1
|
-
#
|
|
1
|
+
# UserInfo 用户信息
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
提供用户信息展示。
|
|
4
4
|
|
|
5
5
|
---$
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
## 代码演示
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
### 基本使用
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
- 通过 `avatar`设置头像,默认为``
|
|
12
|
+
- 通过 `nickname`设置昵称,默认为``
|
|
13
|
+
- 通过 `desc`插槽设置用户描述,默认为``
|
|
14
|
+
- 通过 `list`设置数据列表(最多三个),默认为`[]`
|
|
15
|
+
- 通过 `codeSrc`设置功能码图片,默认为``
|
|
16
|
+
- 通过 `codeTitle`设置功能码标题,默认为``
|
|
17
|
+
- 通过 `codeTitleColor`设置功能码标题颜色,默认为`主题色`
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
```html
|
|
20
|
+
<script lang="ts" setup>
|
|
21
|
+
import { ref } from 'vue';
|
|
22
|
+
let list1 = ref([
|
|
23
|
+
{ title: '余额', value: '100' },
|
|
24
|
+
{ title: '订餐数', value: '8' },
|
|
25
|
+
]);
|
|
26
|
+
|
|
27
|
+
let list2 = ref([
|
|
28
|
+
{ title: '数据1', value: '100' },
|
|
29
|
+
{ title: '数据2', value: '8' },
|
|
30
|
+
{ title: '数据3', value: '8' },
|
|
31
|
+
]);
|
|
32
|
+
let list3 = ref([{ title: '数据1', value: '100' }]);
|
|
33
|
+
</script>
|
|
34
|
+
<template>
|
|
35
|
+
<view class="item-block">
|
|
36
|
+
<view>
|
|
37
|
+
<ste-user-info
|
|
38
|
+
avatar="https://image.whzb.com/chain/StellarUI/图片.jpg"
|
|
39
|
+
nickname="张三"
|
|
40
|
+
:list="list1"
|
|
41
|
+
codeSrc="https://image.whzb.com/chain/StellarUI/image/code1.png"
|
|
42
|
+
codeTitle="核销码"
|
|
43
|
+
codeTitleColor="#EC3E1A"
|
|
44
|
+
>
|
|
45
|
+
<template v-slot:desc>
|
|
46
|
+
<view class="desc">
|
|
47
|
+
<ste-icon code="" color="#EC3E1A" size="26"></ste-icon>
|
|
48
|
+
<view class="title">中百食堂</view>
|
|
49
|
+
</view>
|
|
50
|
+
</template>
|
|
51
|
+
</ste-user-info>
|
|
52
|
+
</view>
|
|
53
|
+
</view>
|
|
54
|
+
<view class="item-block">
|
|
55
|
+
<view>
|
|
56
|
+
<ste-user-info
|
|
57
|
+
avatar="https://image.whzb.com/chain/StellarUI/图片.jpg"
|
|
58
|
+
nickname="张三"
|
|
59
|
+
:list="[]"
|
|
60
|
+
codeSrc="https://image.whzb.com/chain/StellarUI/image/code1.png"
|
|
61
|
+
codeTitle="核销码"
|
|
62
|
+
codeTitleColor="#EC3E1A"
|
|
63
|
+
>
|
|
64
|
+
<template v-slot:desc>
|
|
65
|
+
<view class="desc">
|
|
66
|
+
<ste-icon code="" color="#EC3E1A" size="26"></ste-icon>
|
|
67
|
+
<view class="title">中百食堂</view>
|
|
68
|
+
</view>
|
|
69
|
+
</template>
|
|
70
|
+
</ste-user-info>
|
|
71
|
+
</view>
|
|
72
|
+
</view>
|
|
73
|
+
<view class="item-block">
|
|
74
|
+
<view>
|
|
75
|
+
<ste-user-info
|
|
76
|
+
avatar="https://image.whzb.com/chain/StellarUI/图片.jpg"
|
|
77
|
+
nickname="张三"
|
|
78
|
+
:list="list3"
|
|
79
|
+
codeSrc="https://image.whzb.com/chain/StellarUI/image/code1.png"
|
|
80
|
+
codeTitle="核销码"
|
|
81
|
+
codeTitleColor="#EC3E1A"
|
|
82
|
+
>
|
|
83
|
+
<template v-slot:desc>
|
|
84
|
+
<view class="desc">
|
|
85
|
+
<ste-icon code="" color="#EC3E1A" size="26"></ste-icon>
|
|
86
|
+
<view class="title">中百食堂</view>
|
|
87
|
+
</view>
|
|
88
|
+
</template>
|
|
89
|
+
</ste-user-info>
|
|
90
|
+
</view>
|
|
91
|
+
</view>
|
|
92
|
+
<view class="item-block">
|
|
93
|
+
<view>
|
|
94
|
+
<ste-user-info
|
|
95
|
+
avatar="https://image.whzb.com/chain/StellarUI/图片.jpg"
|
|
96
|
+
nickname="张三"
|
|
97
|
+
:list="list2"
|
|
98
|
+
codeSrc="https://image.whzb.com/chain/StellarUI/image/code1.png"
|
|
99
|
+
codeTitle="核销码"
|
|
100
|
+
codeTitleColor="#EC3E1A"
|
|
101
|
+
>
|
|
102
|
+
<template v-slot:desc>
|
|
103
|
+
<view class="desc">
|
|
104
|
+
<ste-icon code="" color="#EC3E1A" size="26"></ste-icon>
|
|
105
|
+
<view class="title">中百食堂</view>
|
|
106
|
+
</view>
|
|
107
|
+
</template>
|
|
108
|
+
</ste-user-info>
|
|
109
|
+
</view>
|
|
110
|
+
</view>
|
|
111
|
+
</template>
|
|
112
|
+
<style>
|
|
113
|
+
.item-block {
|
|
114
|
+
> view {
|
|
115
|
+
margin: 0 36rpx 36rpx 0;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
.desc {
|
|
119
|
+
display: flex;
|
|
120
|
+
align-items: center;
|
|
121
|
+
.title {
|
|
122
|
+
font-size: 24rpx;
|
|
123
|
+
color: #ec3e1a;
|
|
124
|
+
margin: 4rpx;
|
|
125
|
+
margin-right: 14rpx;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
</style>
|
|
129
|
+
```
|
|
14
130
|
|
|
15
|
-
|
|
131
|
+
### 用户信息隐藏
|
|
132
|
+
|
|
133
|
+
- 通过 `showUserInfo`设置是否展示用户相关,默认为`true`
|
|
16
134
|
|
|
17
135
|
```html
|
|
18
136
|
<template>
|
|
19
|
-
<ste-
|
|
137
|
+
<ste-user-info :showUserInfo="false" :list="list1" codeSrc="https://image.whzb.com/chain/StellarUI/image/code1.png" codeTitle="核销码" codeTitleColor="#EC3E1A"></ste-user-info>
|
|
20
138
|
</template>
|
|
21
139
|
```
|
|
22
140
|
|
|
23
|
-
###
|
|
141
|
+
### 核销码隐藏
|
|
24
142
|
|
|
25
|
-
- 通过 `
|
|
26
|
-
- 通过 `avatar` 属性来设置头像,默认``
|
|
27
|
-
- 通过 `desc` 插槽来设置用户描述,默认``
|
|
143
|
+
- 通过 `showCode`设置核销码隐藏,默认为`true`
|
|
28
144
|
|
|
29
145
|
```html
|
|
146
|
+
<script lang="ts" setup>
|
|
147
|
+
import { ref } from 'vue';
|
|
148
|
+
let list2 = ref([
|
|
149
|
+
{ title: '数据1', value: '100' },
|
|
150
|
+
{ title: '数据2', value: '8' },
|
|
151
|
+
{ title: '数据3', value: '8' },
|
|
152
|
+
]);
|
|
153
|
+
</script>
|
|
30
154
|
<template>
|
|
31
|
-
<ste-
|
|
155
|
+
<ste-user-info avatar="https://image.whzb.com/chain/StellarUI/图片.jpg" nickname="张三" :list="list2" :showCode="false">
|
|
32
156
|
<template v-slot:desc>
|
|
33
157
|
<view class="desc">
|
|
34
|
-
<
|
|
35
|
-
<
|
|
158
|
+
<ste-icon code="" color="#EC3E1A" size="26"></ste-icon>
|
|
159
|
+
<view class="title">中百食堂</view>
|
|
36
160
|
</view>
|
|
37
161
|
</template>
|
|
38
|
-
</ste-
|
|
162
|
+
</ste-user-info>
|
|
39
163
|
</template>
|
|
40
|
-
|
|
41
164
|
<style>
|
|
42
165
|
.desc {
|
|
43
166
|
display: flex;
|
|
44
167
|
align-items: center;
|
|
45
168
|
.title {
|
|
46
169
|
font-size: 24rpx;
|
|
47
|
-
color: #
|
|
170
|
+
color: #ec3e1a;
|
|
48
171
|
margin: 4rpx;
|
|
49
172
|
margin-right: 14rpx;
|
|
50
173
|
}
|
|
@@ -1,18 +1,66 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { ref, defineComponent,
|
|
3
|
-
|
|
2
|
+
import { ref, defineComponent, computed, type CSSProperties } from 'vue';
|
|
3
|
+
import { useColorStore } from '../../store/color';
|
|
4
|
+
let { getColor } = useColorStore();
|
|
4
5
|
import propsData from './props';
|
|
5
6
|
defineComponent({
|
|
6
7
|
name: 'ste-user-info',
|
|
7
8
|
});
|
|
8
9
|
|
|
9
10
|
const props = defineProps(propsData);
|
|
11
|
+
|
|
12
|
+
const cmpRootStyle = computed(() => {
|
|
13
|
+
let style: CSSProperties = {};
|
|
14
|
+
// 用户信息区域
|
|
15
|
+
if (props.showUserInfo && props.showCode) {
|
|
16
|
+
style.padding = '0 24rpx 0 18rpx';
|
|
17
|
+
}
|
|
18
|
+
return style;
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
const cmpDataStyle = computed(() => {
|
|
22
|
+
let style: CSSProperties = {};
|
|
23
|
+
if (props.showUserInfo && props.showCode) {
|
|
24
|
+
if (props.list.length == 1) {
|
|
25
|
+
style['justify-content'] = 'center';
|
|
26
|
+
style.margin = '0 0 0 54rpx';
|
|
27
|
+
}
|
|
28
|
+
if (props.list.length == 2) {
|
|
29
|
+
style['justify-content'] = 'space-between';
|
|
30
|
+
style.margin = '0 0 0 54rpx';
|
|
31
|
+
}
|
|
32
|
+
if (props.list.length == 3) {
|
|
33
|
+
style['justify-content'] = 'space-between';
|
|
34
|
+
style.margin = '0 0 0 24rpx';
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
return style;
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
const cmpLineStyle = computed(() => {
|
|
41
|
+
let style: CSSProperties = {};
|
|
42
|
+
if (props.showUserInfo && props.showCode) {
|
|
43
|
+
if (props.list.length == 0 || props.list.length == 1 || props.list.length == 2) {
|
|
44
|
+
style.margin = '0 40rpx 0 44rpx';
|
|
45
|
+
}
|
|
46
|
+
if (props.list.length == 3) {
|
|
47
|
+
style.margin = '0 22rpx 0 28rpx';
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return style;
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
const cmpCodeStyle = computed(() => {
|
|
54
|
+
let style: CSSProperties = {};
|
|
55
|
+
style.color = props.codeTitleColor ? props.codeTitleColor : getColor().steThemeColor;
|
|
56
|
+
return style;
|
|
57
|
+
});
|
|
10
58
|
</script>
|
|
11
59
|
|
|
12
60
|
<template>
|
|
13
61
|
<view class="ste-user-info-root">
|
|
14
|
-
<view class="box">
|
|
15
|
-
<view class="user-box">
|
|
62
|
+
<view class="box" :style="[cmpRootStyle]">
|
|
63
|
+
<view class="user-box" v-if="showUserInfo">
|
|
16
64
|
<view class="left">
|
|
17
65
|
<ste-image :width="80" :height="80" :src="avatar"></ste-image>
|
|
18
66
|
</view>
|
|
@@ -23,14 +71,21 @@ const props = defineProps(propsData);
|
|
|
23
71
|
</view>
|
|
24
72
|
</view>
|
|
25
73
|
</view>
|
|
26
|
-
<view class="data-box">
|
|
74
|
+
<view class="data-box" :style="[cmpDataStyle]">
|
|
27
75
|
<view class="item" v-for="(item, index) in list" :key="index">
|
|
28
76
|
<view class="value">{{ item.value }}</view>
|
|
29
77
|
<view class="title">{{ item.title }}</view>
|
|
30
78
|
</view>
|
|
31
79
|
</view>
|
|
32
|
-
<view class="line"></view>
|
|
33
|
-
<view class="code-box"
|
|
80
|
+
<view class="line" v-if="showUserInfo && showCode" :style="[cmpLineStyle]"></view>
|
|
81
|
+
<view class="code-box" v-if="showCode">
|
|
82
|
+
<view class="top">
|
|
83
|
+
<ste-image :src="codeSrc" :height="60" :width="60"></ste-image>
|
|
84
|
+
</view>
|
|
85
|
+
<view class="bottom" :style="[cmpCodeStyle]">
|
|
86
|
+
{{ codeTitle }}
|
|
87
|
+
</view>
|
|
88
|
+
</view>
|
|
34
89
|
</view>
|
|
35
90
|
</view>
|
|
36
91
|
</template>
|
|
@@ -44,6 +99,7 @@ const props = defineProps(propsData);
|
|
|
44
99
|
border-radius: 12rpx;
|
|
45
100
|
display: flex;
|
|
46
101
|
align-items: center;
|
|
102
|
+
justify-content: space-around;
|
|
47
103
|
|
|
48
104
|
.user-box {
|
|
49
105
|
display: flex;
|
|
@@ -75,7 +131,6 @@ const props = defineProps(propsData);
|
|
|
75
131
|
|
|
76
132
|
.data-box {
|
|
77
133
|
display: flex;
|
|
78
|
-
justify-content: space-evenly;
|
|
79
134
|
flex: 1;
|
|
80
135
|
.item {
|
|
81
136
|
.title {
|
|
@@ -96,6 +151,34 @@ const props = defineProps(propsData);
|
|
|
96
151
|
}
|
|
97
152
|
}
|
|
98
153
|
}
|
|
154
|
+
.line {
|
|
155
|
+
width: 0rpx;
|
|
156
|
+
height: 50rpx;
|
|
157
|
+
border-left: 4rpx solid #f1f1f1;
|
|
158
|
+
}
|
|
159
|
+
|
|
160
|
+
.code-box {
|
|
161
|
+
display: flex;
|
|
162
|
+
flex-direction: column;
|
|
163
|
+
align-items: center;
|
|
164
|
+
|
|
165
|
+
.top {
|
|
166
|
+
text-align: center;
|
|
167
|
+
width: 60rpx;
|
|
168
|
+
height: 60rpx;
|
|
169
|
+
background: #dddddd;
|
|
170
|
+
border-radius: 12rpx;
|
|
171
|
+
}
|
|
172
|
+
|
|
173
|
+
.bottom {
|
|
174
|
+
margin-top: 8rpx;
|
|
175
|
+
height: 34rpx;
|
|
176
|
+
line-height: 34rpx;
|
|
177
|
+
font-size: 24rpx;
|
|
178
|
+
color: #ec3e1a;
|
|
179
|
+
text-align: center;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
99
182
|
}
|
|
100
183
|
}
|
|
101
184
|
</style>
|
package/package.json
CHANGED
package/utils/System.ts
CHANGED
|
@@ -71,7 +71,7 @@ export default class System {
|
|
|
71
71
|
// #ifdef MP-WEIXIN
|
|
72
72
|
let windowInfo = wx.getWindowInfo();
|
|
73
73
|
windowInfo.safeAreaInsets = {
|
|
74
|
-
bottom: windowInfo
|
|
74
|
+
bottom: (windowInfo?.screenHeight ?? 812) - (windowInfo?.safeArea?.bottom ?? 778),
|
|
75
75
|
};
|
|
76
76
|
return windowInfo;
|
|
77
77
|
// #endif
|