stellar-ui-plus 1.20.21 → 1.20.23

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.
@@ -172,7 +172,7 @@ export function stringToCode128(text: string) {
172
172
 
173
173
  codes = codes.concat(codesForChar(b1, b2, barc.currcs))
174
174
  // code C takes 2 chars each time
175
- if (barc.currcs === CODESET.C)
175
+ if (barc.currcs === CODESET.C)
176
176
  i++
177
177
  }
178
178
 
@@ -203,7 +203,7 @@ export function stringToCode128(text: string) {
203
203
  function perhapsCodeC(bytes: number[], codeset: number) {
204
204
  for (let i = 0; i < bytes.length; i++) {
205
205
  const b = bytes[i]
206
- if ((b < 48 || b > 57) && b !== CHAR_TILDE)
206
+ if ((b < 48 || b > 57) && b !== CHAR_TILDE)
207
207
  return codeset
208
208
  }
209
209
  return CODESET.C
@@ -221,13 +221,13 @@ export function stringToCode128(text: string) {
221
221
  if (chr2 === -1) {
222
222
  shifter === SET_CODEB
223
223
  currcs = CODESET.B
224
- }
224
+ }
225
225
  else if (chr2 !== -1 && !charCompatible(chr2, currcs)) {
226
226
  // need to check ahead as well
227
227
  if (charCompatible(chr2, CODESET.A)) {
228
228
  shifter = SET_CODEA
229
229
  currcs = CODESET.A
230
- }
230
+ }
231
231
  else {
232
232
  shifter = SET_CODEB
233
233
  currcs = CODESET.B
@@ -235,7 +235,7 @@ export function stringToCode128(text: string) {
235
235
  }
236
236
  }
237
237
  /* eslint-enable no-unused-expressions */
238
- }
238
+ }
239
239
  else {
240
240
  // if there is a next char AND that next char is also not compatible
241
241
 
@@ -251,11 +251,11 @@ export function stringToCode128(text: string) {
251
251
  currcs = CODESET.A
252
252
  break
253
253
  }
254
- }
254
+ }
255
255
  else {
256
256
  // no need to shift code sets, a temporary SHIFT will suffice
257
257
  shifter = SET_SHIFT
258
- }
258
+ }
259
259
  }
260
260
 
261
261
  // ok some type of shift is nessecary
@@ -263,12 +263,12 @@ export function stringToCode128(text: string) {
263
263
  result.push(shifter)
264
264
  // result.push(codeValue(chr2));-----------------------------------
265
265
  result.push(codeValue(chr1))
266
- }
266
+ }
267
267
  else {
268
268
  if (currcs === CODESET.C) {
269
269
  // include next as well
270
270
  result.push(codeValue(chr1, chr2))
271
- }
271
+ }
272
272
  else {
273
273
  result.push(codeValue(chr1))
274
274
  }
@@ -284,19 +284,19 @@ function codeValue(chr1: number, chr2: any = undefined) {
284
284
  if (typeof chr2 === 'undefined')
285
285
  return chr1 >= 32 ? chr1 - 32 : chr1 + 64
286
286
  else
287
- return Number.parseInt(String.fromCharCode(chr1) + String.fromCharCode(chr2))
287
+ return Number.parseInt(String.fromCharCode(chr1) + String.fromCharCode(chr2))
288
288
  }
289
289
 
290
290
  function charCompatible(chr: number, codeset: number) {
291
291
  const csa = codeSetAllowedFor(chr)
292
- if (csa === CODESET.ANY)
292
+ if (csa === CODESET.ANY)
293
293
  return true
294
294
  // if we need to change from current
295
- if (csa === CODESET.AB)
295
+ if (csa === CODESET.AB)
296
296
  return true
297
- if (csa === CODESET.A && codeset === CODESET.A)
297
+ if (csa === CODESET.A && codeset === CODESET.A)
298
298
  return true
299
- if (csa === CODESET.B && codeset === CODESET.B)
299
+ if (csa === CODESET.B && codeset === CODESET.B)
300
300
  return true
301
301
  return false
302
302
  }
@@ -305,11 +305,11 @@ function codeSetAllowedFor(chr: number) {
305
305
  if (chr >= 48 && chr <= 57) {
306
306
  // 0-9
307
307
  return CODESET.ANY
308
- }
308
+ }
309
309
  else if (chr >= 32 && chr <= 95) {
310
310
  // 0-9 A-Z
311
311
  return CODESET.AB
312
- }
312
+ }
313
313
  else {
314
314
  // if non printable
315
315
  return chr < 32 ? CODESET.A : CODESET.B
@@ -0,0 +1,33 @@
1
+ #### Props
2
+ | 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
3
+ | ----- | ----- | --- | ------- | ------ | -------- |
4
+ | `width` | 图表宽度,单位rpx | `number / string` | `750` | - | - |
5
+ | `height` | 图表高度,单位rpx | `number / string` | `200` | - | - |
6
+ | `canvas2d` | canvas2d模式,用于解决小程序层级过高及拖拽卡顿问题 | `boolean` | `true` | - | - |
7
+ | `pixelRatio` | 设备像素比,解决开启canvas2d后画布模糊的问题 | `number` | `微信小程序由具体设备决定,其余的默认为1` | - | - |
8
+ | `animation` | 是否动画展示图表 | `boolean` | `true` | - | - |
9
+ | `timing` | 图表动画效果 | `string` | `easeOut` | `easeOut`:由快到慢<br/>`easeIn`:由慢到快<br/>`easeInOut`:慢快慢<br/>`linear`:匀速 | - |
10
+ | `duration` | 动画展示时长(单位:毫秒) | `string` | `1000` | - | - |
11
+ | `rotate` | 横屏模式 | `boolean` | `false` | - | - |
12
+ | `rotateLock` | 横屏锁定模式 | `boolean` | `false` | - | - |
13
+ | `background` | 背景颜色,开启滚动条后请赋值 | `string` | `rgba(0,0,0,0)` | - | - |
14
+ | `color` | 主题颜色数组,16进制颜色格式 | `array` | `["#165DFF","#14C9C9","#F7BA1E","#3491FA","#722ED1","#9FDB1D"]` | - | - |
15
+ | `padding` | 画布填充边距(顺序为上右下左),单位px | `array` | `[5,5,5,5]` | - | - |
16
+ | `fontSize` | 全局默认字体大小,单位px | `number` | `13` | - | - |
17
+ | `fontColor` | 全局默认字体颜色 | `string` | `#666666` | - | - |
18
+ | `dataLabel` | 是否显示图表区域内数据点上方的数据文案 | `boolean` | `false` | - | - |
19
+ | `dataPointShape` | 是否显示数据点的图形标识 | `boolean` | `true` | - | - |
20
+ | `dataPointShapeType` | 图形标识点显示类型 | `string` | `solid` | `solid`:实心<br/>`hollow`:空心 | - |
21
+ | `touchMoveLimit` | 图表拖拽时每秒重新渲染的帧数 | `number` | `24` | - | - |
22
+ | `enableScroll` | 开启滚动条功能 | `boolean` | `false` | - | - |
23
+ | `enableMarkLine` | 是否启用标记线功能 | `boolean` | `false` | - | - |
24
+ | `scrollPosition` | 连续更新数据时滚动条的位置 | `string` | `current` | `current`:当前位置<br/>`left`:左对齐<br/>`right`:右对齐 | - |
25
+ | `series` | 图表数据 | `object` | `{}` | - | - |
26
+ | `xAxis` | X轴配置 | `-` | <a href="https://www.ucharts.cn/v2/#/document/index" target="_blank">文档地址</a> | - | - |
27
+ | `yAxis` | Y轴配置 | `-` | <a href="https://www.ucharts.cn/v2/#/document/index" target="_blank">文档地址</a> | - | - |
28
+ | `legend` | 图例配置 | `-` | <a href="https://www.ucharts.cn/v2/#/document/index" target="_blank">文档地址</a> | - | - |
29
+ | `title` | 标题配置(仅适用于 ring、arcbar、gauge) | `-` | <a href="https://www.ucharts.cn/v2/#/document/index" target="_blank">文档地址</a> | - | - |
30
+ | `subtitle` | 副标题配置 | `-` | <a href="https://www.ucharts.cn/v2/#/document/index" target="_blank">文档地址</a> | - | - |
31
+ | `extra` | 额外配置项 | `-` | <a href="https://www.ucharts.cn/v2/#/document/index" target="_blank">文档地址</a> | - | - |
32
+
33
+
@@ -12,23 +12,23 @@ const rootStyle = computed(() => {
12
12
  });
13
13
 
14
14
  const emits = defineEmits<{
15
- (e: 'click-header', type: 'title' | 'subhead' | 'more'): void;
16
- (e: 'click-item', type: 'image' | 'title' | 'subhead' | 'status' | 'button', item: FunctionListItem): void;
15
+ (e: 'click-header', type: 'empty' | 'title' | 'subhead' | 'more'): void;
16
+ (e: 'click-item', type: 'empty' | 'image' | 'title' | 'subhead' | 'status' | 'button', item: FunctionListItem): void;
17
17
  (e: 'click-empty', type: 'image' | 'text' | 'button'): void;
18
18
  }>();
19
19
 
20
- const onClickHeader = (type: 'title' | 'subhead' | 'more') => emits('click-header', type);
20
+ const onClickHeader = (type: 'empty' | 'title' | 'subhead' | 'more') => emits('click-header', type);
21
21
 
22
- const onClickItem = (type: 'image' | 'title' | 'subhead' | 'status' | 'button', item: FunctionListItem) => emits('click-item', type, item);
22
+ const onClickItem = (type: 'empty' | 'image' | 'title' | 'subhead' | 'status' | 'button', item: FunctionListItem) => emits('click-item', type, item);
23
23
 
24
24
  const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty', type);
25
25
  </script>
26
26
  <template>
27
27
  <view class="ste-function-list-root" :style="[rootStyle]">
28
- <view class="ste-function-list-header">
28
+ <view class="ste-function-list-header" @click="onClickHeader('empty')">
29
29
  <view class="ste-function-list-header-l">
30
- <view class="ste-function-list-title" @click="onClickHeader('title')">{{ title }}</view>
31
- <view class="ste-function-list-subhead" @click="onClickHeader('subhead')">
30
+ <view class="ste-function-list-title" @click.stop="onClickHeader('title')">{{ title }}</view>
31
+ <view class="ste-function-list-subhead" @click.stop="onClickHeader('subhead')">
32
32
  <slot name="subhead">
33
33
  {{ subhead }}
34
34
  </slot>
@@ -36,7 +36,7 @@ const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty',
36
36
  </view>
37
37
  <view class="ste-function-list-header-r">
38
38
  <slot name="header-right">
39
- <view class="ste-function-list-more" @click="onClickHeader('more')">
39
+ <view class="ste-function-list-more" @click.stop="onClickHeader('more')">
40
40
  更多
41
41
  <ste-icon code="&#xe674;" color="#353535"></ste-icon>
42
42
  </view>
@@ -45,24 +45,17 @@ const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty',
45
45
  </view>
46
46
  <view class="ste-function-list-content" v-if="data?.length">
47
47
  <scroll-view scroll-x class="content-list" :class="{ multiple: data?.length > 1 }">
48
- <view class="content-list-item" v-for="(item, index) in data" :key="index">
49
- <view class="content-list-item-image" @click="onClickItem('image', item)">
48
+ <view class="content-list-item" v-for="(item, index) in data" :key="index" @click="onClickItem('empty', item)">
49
+ <view class="content-list-item-image" @click.stop="onClickItem('image', item)">
50
50
  <ste-image :src="item.image" mode="aspectFill"></ste-image>
51
51
  </view>
52
52
  <view class="content-list-item-info">
53
- <view class="content-list-item-info-title" @click="onClickItem('title', item)">{{ item.title }}</view>
54
- <view class="content-list-item-info-subhead" v-if="item.subhead" @click="onClickItem('subhead', item)">{{ item.subhead }}</view>
53
+ <view class="content-list-item-info-title" @click.stop="onClickItem('title', item)">{{ item.title }}</view>
54
+ <view class="content-list-item-info-subhead" v-if="item.subhead" @click.stop="onClickItem('subhead', item)">{{ item.subhead }}</view>
55
55
  <view class="content-list-item-info-footer">
56
- <view class="content-list-item-info-status" @click="onClickItem('status', item)">{{ item.statusText }}</view>
57
- <view class="content-list-item-info-button" v-if="item.buttonText || buttonText || item.buttonIcon || buttonIcon">
58
- <ste-button
59
- :mode="100"
60
- :rootStyle="{ height: '56rpx' }"
61
- type="primary"
62
- @click="onClickItem('button', item)"
63
- :background="item.buttonBg || buttonBg"
64
- :color="item.buttonColor || buttonColor"
65
- >
56
+ <view class="content-list-item-info-status" @click.stop="onClickItem('status', item)">{{ item.statusText }}</view>
57
+ <view class="content-list-item-info-button" v-if="item.buttonText || buttonText || item.buttonIcon || buttonIcon" @click.stop="onClickItem('button', item)">
58
+ <ste-button :mode="100" :rootStyle="{ height: '56rpx' }" type="primary" :background="item.buttonBg || buttonBg" :color="item.buttonColor || buttonColor">
66
59
  <ste-icon :code="item.buttonIcon || buttonIcon" :color="item.buttonColor || buttonColor" />
67
60
  {{ item.buttonText || buttonText }}
68
61
  </ste-button>
@@ -73,7 +66,7 @@ const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty',
73
66
  </scroll-view>
74
67
  </view>
75
68
  <view class="ste-function-list-empty" v-else>
76
- <ste-image :src="emptyImage" width="96" height="96" @clicl="onClickEmpty('image')" />
69
+ <ste-image :src="emptyImage" width="96" height="96" @click="onClickEmpty('image')" />
77
70
  <view class="empty-message" @click="onClickEmpty('text')">{{ emptyText }}</view>
78
71
  <ste-button :mode="100" :rootStyle="{ height: '56rpx' }" type="primary" :background="buttonBg" :color="buttonColor" @click="onClickEmpty('button')">
79
72
  {{ emptyButtonText }}
@@ -127,7 +127,7 @@
127
127
  </template>
128
128
  ```
129
129
 
130
- ### 插槽
130
+ ### 默认插槽
131
131
 
132
132
  - 默认插槽内容为商品编码下的其他展示项
133
133
 
@@ -149,6 +149,28 @@
149
149
  </template>
150
150
  ```
151
151
 
152
+ ### 替换步进器插槽
153
+
154
+ - 使用该插槽后步进器将无法生效
155
+
156
+ ```html
157
+ <script setup lang="ts">
158
+ import { ref } from 'vue';
159
+ const data = ref({
160
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
161
+ title: '商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称商品名称',
162
+ tag: '新品',
163
+ code: '123456',
164
+ barCode: '1234567890123',
165
+ price: '88800',
166
+ originalPrice: '99900',
167
+ });
168
+ </script>
169
+ <template>
170
+ <ste-goods-info :data="data"><template v-slot:stepper>步进器</template></ste-goods-info>
171
+ </template>
172
+ ```
173
+
152
174
  ### 水印
153
175
 
154
176
  - 属性`watermark`接收水印图片URL,用于展示水印
@@ -208,10 +230,10 @@
208
230
 
209
231
  #### 组件插槽(Slots)
210
232
 
211
- | 名称 | 说明 | 支持版本 |
212
- | ------- | ---------------------------------- | -------- |
213
- | default | 默认插槽,在编码下方出现的其他内容 | - |
214
- | stepper | 步进器插槽,替换掉自带步进器 | - |
233
+ | 名称 | 说明 | 支持版本 |
234
+ | ------- | ------------------------------------------ | -------- |
235
+ | default | 默认插槽,在编码下方出现的其他内容 | - |
236
+ | stepper | 步进器位置插槽,使用该插槽后将替换掉步进器 | - |
215
237
 
216
238
  ---$
217
239
  {{xuyajun}}
@@ -189,11 +189,11 @@
189
189
  {
190
190
  "name": "[event]click",
191
191
  "description": "点击确定按钮时触发",
192
- "type": "(type: 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper') => void",
192
+ "type": "(type:'empty' | 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper') => void",
193
193
  "params": [
194
194
  {
195
195
  "name": "type",
196
- "description": "点击位置:'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper'"
196
+ "description": "点击位置: `empty` , `image` , `title` , `code` , `price` , `originalPrice` , `stepper`"
197
197
  }
198
198
  ]
199
199
  },
@@ -250,7 +250,7 @@
250
250
  "params": [
251
251
  {
252
252
  "name": "type",
253
- "description": "点击的区域:'method' | 'back' | 'item' | 'right'"
253
+ "description": "点击的区域:`method`, `back`, `item`, `right`"
254
254
  },
255
255
  {
256
256
  "name": "item",
@@ -16,7 +16,7 @@ const emits = defineEmits<{
16
16
  (e: 'update:number', number?: number): void;
17
17
  (e: 'update:checked', checked?: boolean): void;
18
18
  (e: 'change', change: { number?: number; checked?: boolean; applyForNumber?: number }, data: GoodsInfoType): void;
19
- (e: 'click', type: 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper'): void;
19
+ (e: 'click', type: 'empty' | 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper'): void;
20
20
  (e: 'plus', value: number | string, suspend: () => void, next: () => void, stop: () => void): void;
21
21
  (e: 'minus', value: number | string, suspend: () => void, next: () => void, stop: () => void): void;
22
22
  (e: 'click-suggest', type: 'method' | 'back' | 'item' | 'right', item?: { label: string; value: string | number }): void;
@@ -83,7 +83,7 @@ const checkboxChange = () => {
83
83
  emits('change', { checked: _checked.value }, props.data);
84
84
  };
85
85
 
86
- const onClick = (type: 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper') => {
86
+ const onClick = (type: 'empty' | 'image' | 'title' | 'code' | 'price' | 'originalPrice' | 'stepper') => {
87
87
  emits('click', type);
88
88
  };
89
89
 
@@ -168,14 +168,14 @@ const viewClass = computed(() => {
168
168
  <view @click="clickChecked" class="ste-goods-info-checkbox left" v-if="checkbox === 'left'">
169
169
  <setCheckbox :disabled="checkboxDisabled" iconSize="30" :model-value="_checked" />
170
170
  </view>
171
- <view class="ste-goods-info-view" :class="viewClass">
172
- <view class="ste-goods-info-image">
173
- <setImage :radius="imageRadius" :src="data.image" :width="imageSize" :height="imageSize" @click="onClick('image')" />
171
+ <view class="ste-goods-info-view" :class="viewClass" @click="onClick('empty')">
172
+ <view class="ste-goods-info-image" @click.stop="onClick('image')">
173
+ <setImage :radius="imageRadius" :src="data.image" :width="imageSize" :height="imageSize" />
174
174
  </view>
175
175
  <view class="ste-goods-info-content">
176
176
  <view class="content-header">
177
177
  <view class="ste-goods-info-header">
178
- <view class="ste-goods-info-title" :style="[titleStyle]" @click="onClick('title')">
178
+ <view class="ste-goods-info-title" :style="[titleStyle]" @click.stop="onClick('title')">
179
179
  <view class="ste-goods-info-tag-box" v-if="data.tag">
180
180
  <view class="ste-goods-info-tag" :style="{ background: _tagBg }">{{ data.tag }}</view>
181
181
  </view>
@@ -185,7 +185,7 @@ const viewClass = computed(() => {
185
185
  <setCheckbox :disabled="checkboxDisabled" iconSize="30" :model-value="_checked" />
186
186
  </view>
187
187
  </view>
188
- <view class="ste-goods-info-codes" @click="onClick('code')">
188
+ <view class="ste-goods-info-codes" @click.stop="onClick('code')">
189
189
  {{ data.code }}
190
190
  <span style="color: #e6e8ea">|</span>
191
191
  {{ data.barCode }}
@@ -196,23 +196,28 @@ const viewClass = computed(() => {
196
196
  </view>
197
197
  <view class="content-footer">
198
198
  <view class="ste-goods-info-price" v-if="showPriceRow">
199
- <view class="ste-goods-info-price-left" v-if="!hidePrice">
200
- <setPrice :value="data.price" :digits="2" bold :styleType="3" :line-price-color="priceColor" :fontSize="priceSize" @click="onClick('price')" />
201
- <setPrice
202
- v-if="data.originalPrice"
203
- :digits="2"
204
- :value="data.originalPrice"
205
- isSuggestPrice
206
- line-price-color="#666666"
207
- marginLeft="16"
208
- fontSize="20"
209
- @click="onClick('originalPrice')"
210
- :showUnit="false"
211
- />
199
+ <view class="ste-goods-info-price-left">
200
+ <block v-if="!hidePrice">
201
+ <view @click.stop="onClick('price')">
202
+ <setPrice :value="data.price" :digits="2" bold :styleType="3" :line-price-color="priceColor" :fontSize="priceSize" />
203
+ </view>
204
+ <view @click.stop="onClick('originalPrice')">
205
+ <setPrice
206
+ v-if="data.originalPrice"
207
+ :digits="2"
208
+ :value="data.originalPrice"
209
+ isSuggestPrice
210
+ line-price-color="#666666"
211
+ marginLeft="16"
212
+ fontSize="20"
213
+ :showUnit="false"
214
+ />
215
+ </view>
216
+ </block>
212
217
  </view>
213
- <view class="ste-goods-info-price-right" v-if="stepper" @click="onClick('stepper')">
218
+ <view class="ste-goods-info-price-right" @click.stop="onClick('stepper')">
214
219
  <slot name="stepper">
215
- <view :class="{ readonly: readonlyStepper }" @click.stop="true">
220
+ <view v-if="stepper" :class="{ readonly: readonlyStepper }" @click.stop="true">
216
221
  <steStepper
217
222
  v-model="_number"
218
223
  :precision="precision"
@@ -347,10 +352,16 @@ const viewClass = computed(() => {
347
352
 
348
353
  .ste-goods-info-price {
349
354
  width: 100%;
350
- height: 34rpx;
355
+ line-height: 34rpx;
351
356
  display: flex;
352
357
  justify-content: space-between;
353
- align-items: anchor-center;
358
+ align-items: center;
359
+ .ste-goods-info-price-left {
360
+ display: flex;
361
+ flex-direction: row;
362
+ align-items: flex-end;
363
+ }
364
+
354
365
  .ste-goods-info-price-right .readonly {
355
366
  pointer-events: none;
356
367
  }
@@ -4,25 +4,151 @@
4
4
 
5
5
  ---$
6
6
 
7
- ### 基础用法
7
+ ### 基础用法(一条数据)
8
8
 
9
9
  - 属性`title`用于设置组件标题
10
- - 属性`subhead`用于设置组件副标题
10
+ - 属性`image`用于设置标题图片
11
11
  - 属性`data`用于设置组件数据
12
- - 属性`buttonText`用于设置数据项按钮文字缺省值
13
- - 属性`buttonIcon`用于设置数据项按钮图标缺省值
12
+ - 属性`statusText`用于设置状态文本内容
13
+ - 属性`tagText`用于设置标签文本内容
14
+ - 属性`helperText`用于设置标签辅助信息文本内容
15
+ - 属性`mainBtnText`用于设置主要按钮文本内容
16
+ - 属性`subBtnText`用于设置次要按钮文本内容
14
17
 
15
18
  ```html
16
19
  <script setup lang="ts">
17
- import type { FunctionListItem } from 'stellar-ui-plus/components/ste-function-list/props';
18
20
  import { ref } from 'vue';
19
21
 
20
- const data = ref<FunctionListItem[]>([
21
- { title: '早餐 梅姨家常菜', subhead: '红烧牛肉面、海盐芝士燕麦奶、黑胡椒香煎鸡蛋', statusText: '当前不可取消', image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg' },
22
+ const data = ref([
23
+ {
24
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
25
+ title: '梅姨家常菜馆',
26
+ subTitle: '商品描述',
27
+ },
22
28
  ]);
23
29
  </script>
24
30
  <template>
25
- <ste-function-list title="今日餐食" subhead="食刻准备 到点开吃" :data="data" buttonText="核销" buttonIcon="&#xe693;" />
31
+ <ste-order-card
32
+ title="梅姨家常菜馆"
33
+ image="https://image.whzb.com/chain/StellarUI/bg1.jpg"
34
+ :data="data"
35
+ statusText="待核销"
36
+ tagText="标签"
37
+ helperText="辅助信息:XXXX-XX-XX"
38
+ mainBtnText="主要功能"
39
+ subBtnText="次要功能"
40
+ />
41
+ </template>
42
+ ```
43
+
44
+ ### 显示详情(一条数据)
45
+
46
+ - 属性`show-detail`用于设置商品信息下是否显示详情字样(多条数据无效)
47
+
48
+ ```html
49
+ <script setup lang="ts">
50
+ import { ref } from 'vue';
51
+
52
+ const data = ref([
53
+ {
54
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
55
+ title: '梅姨家常菜馆',
56
+ subTitle: '商品描述',
57
+ },
58
+ ]);
59
+ </script>
60
+ <template>
61
+ <ste-order-card
62
+ title="梅姨家常菜馆"
63
+ image="https://image.whzb.com/chain/StellarUI/bg1.jpg"
64
+ :data="data"
65
+ statusText="待核销"
66
+ tagText="标签"
67
+ helperText="辅助信息:XXXX-XX-XX"
68
+ mainBtnText="主要功能"
69
+ subBtnText="次要功能"
70
+ show-detail
71
+ />
72
+ </template>
73
+ ```
74
+
75
+ ### 基础用法(多条数据)
76
+
77
+ ```html
78
+ <script setup lang="ts">
79
+ import { ref } from 'vue';
80
+
81
+ const data = ref([
82
+ {
83
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
84
+ title: '梅姨家常菜馆',
85
+ subTitle: '商品描述',
86
+ },
87
+ {
88
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
89
+ title: '梅姨家常菜馆',
90
+ subTitle: '商品描述',
91
+ },
92
+ {
93
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
94
+ title: '梅姨家常菜馆',
95
+ subTitle: '商品描述',
96
+ },
97
+ ]);
98
+ </script>
99
+ <template>
100
+ <ste-order-card
101
+ title="梅姨家常菜馆"
102
+ image="https://image.whzb.com/chain/StellarUI/bg1.jpg"
103
+ :data="data"
104
+ statusText="待核销"
105
+ tagText="标签"
106
+ helperText="辅助信息:XXXX-XX-XX"
107
+ mainBtnText="主要功能"
108
+ subBtnText="次要功能"
109
+ show-detail
110
+ />
111
+ </template>
112
+ ```
113
+
114
+ ### 显示更多
115
+
116
+ - 属性`show-more`设置下方按钮左侧是否显示更多字样
117
+
118
+ ```html
119
+ <script setup lang="ts">
120
+ import { ref } from 'vue';
121
+
122
+ const data = ref([
123
+ {
124
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
125
+ title: '梅姨家常菜馆',
126
+ subTitle: '商品描述',
127
+ },
128
+ {
129
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
130
+ title: '梅姨家常菜馆',
131
+ subTitle: '商品描述',
132
+ },
133
+ {
134
+ image: 'https://image.whzb.com/chain/StellarUI/bg1.jpg',
135
+ title: '梅姨家常菜馆',
136
+ subTitle: '商品描述',
137
+ },
138
+ ]);
139
+ </script>
140
+ <template>
141
+ <ste-order-card
142
+ title="梅姨家常菜馆"
143
+ image="https://image.whzb.com/chain/StellarUI/bg1.jpg"
144
+ :data="data"
145
+ statusText="待核销"
146
+ tagText="标签"
147
+ helperText="辅助信息:XXXX-XX-XX"
148
+ mainBtnText="主要功能"
149
+ subBtnText="次要功能"
150
+ show-more
151
+ />
26
152
  </template>
27
153
  ```
28
154