stellar-ui-plus 1.21.8 → 1.21.9

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.
@@ -1,6 +1,7 @@
1
1
  #### Props
2
2
  | 属性名 | 说明 | 类型 | 默认值 | 可选值 | 支持版本 |
3
3
  | ----- | ----- | --- | ------- | ------ | -------- |
4
- | `title` | 尺寸 | `string` | `日期选择` | - | - |
4
+ | `clientId` | 应用编码 | `string` | `` | - | - |
5
+ | `clientSecret` | 应用密钥 | `string` | `` | - | - |
5
6
 
6
7
 
@@ -8,22 +8,28 @@
8
8
 
9
9
  - 属性`clientId`用于设置APP的应用编码
10
10
  - 属性`clientSecret`用于设置APP的应用密钥
11
+ - 函数`start`用于开始检查更新
12
+ - 函数`stop`用于取消强制更新
11
13
 
12
14
  ```html
13
15
  <script setup lang="ts">
14
16
  import type { RefAppUpdate } from '@/uni_modules/stellar-ui-plus/types/refComponents';
15
- import { onMounted, ref } from 'vue';
17
+ import { onHide } from '@dcloudio/uni-app';
18
+ import { ref } from 'vue';
16
19
 
17
20
  const appUpdate = ref<RefAppUpdate>();
18
- onMounted(() => {
21
+ // 监听检查更新结果
22
+ const checkForUpdates = () => {
19
23
  appUpdate.value?.start(({ code, name }, version) => {
20
24
  console.log(`当前版本号:${version}`);
21
25
  console.log(`服务器版本号:${code};服务器版本名称${name}`);
22
26
  });
23
- });
27
+ };
28
+ onHide(() => appUpdate.value?.stop());
24
29
  </script>
25
30
  <template>
26
31
  <ste-app-update ref="appUpdate" clientId="workbench_android" clientSecret="gkS6lEEncqAocYK2qsrvPQZykm3ISeMx"></ste-app-update>
32
+ <button @click="checkForUpdates">检查更新</button>
27
33
  </template>
28
34
  ```
29
35
 
@@ -5,10 +5,16 @@
5
5
  "tutorial": "https://stellar-ui.intecloud.com.cn/plus/#/?active=app-update",
6
6
  "attributes": [
7
7
  {
8
- "name": "title",
9
- "description": "尺寸",
8
+ "name": "clientId",
9
+ "description": "应用编码",
10
10
  "type": "string",
11
- "default": "日期选择"
11
+ "default": ""
12
+ },
13
+ {
14
+ "name": "clientSecret",
15
+ "description": "应用密钥",
16
+ "type": "string",
17
+ "default": ""
12
18
  }
13
19
  ]
14
20
  }
@@ -37,7 +37,7 @@ const getData = (callback?: (resVersion: { name: string; code: string; updateFil
37
37
  if (_data.code == 200) {
38
38
  data.code = _data.data.code;
39
39
  data.name = _data.data.name;
40
- data.content = _data.data.content;
40
+ data.content = _data.data.content + _data.data.desc;
41
41
  data.isForce = _data.data.isForce;
42
42
  // 强制更新使用全量包,否则如果增量包存在使用增量包,不存在则使用全量
43
43
  data.updateFile = data.isForce ? _data.data.entireFile : _data.data.updateFile || _data.data.entireFile;
@@ -24,7 +24,7 @@ const onClickItem = (type: 'empty' | 'image' | 'title' | 'subhead' | 'status' |
24
24
  const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty', type);
25
25
  </script>
26
26
  <template>
27
- <view class="ste-function-list-root" :style="[rootStyle]">
27
+ <view class="ste-function-list-root" :style="[rootStyle]" data-test="function-list">
28
28
  <view class="ste-function-list-header" @click="onClickHeader('empty')">
29
29
  <view class="ste-function-list-header-l">
30
30
  <view class="ste-function-list-title" @click.stop="onClickHeader('title')">{{ title }}</view>
@@ -38,7 +38,7 @@ const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty',
38
38
  <slot name="header-right">
39
39
  <view class="ste-function-list-more" @click.stop="onClickHeader('more')">
40
40
  更多
41
- <ste-icon code="&#xe674;" color="#353535" :fontFamily="fontFamily"></ste-icon>
41
+ <ste-icon code="&#xe674;" color="#353535"></ste-icon>
42
42
  </view>
43
43
  </slot>
44
44
  </view>
@@ -56,8 +56,8 @@ const onClickEmpty = (type: 'image' | 'text' | 'button') => emits('click-empty',
56
56
  <view class="content-list-item-info-status" @click.stop="onClickItem('status', item)">{{ item.statusText }}</view>
57
57
  <view class="content-list-item-info-button" v-if="item.buttonText || buttonText || item.buttonIcon || buttonIcon" @click.stop="onClickItem('button', item)">
58
58
  <ste-button :mode="100" :rootStyle="{ height: '56rpx' }" type="primary" :background="item.buttonBg || buttonBg" :color="item.buttonColor || buttonColor">
59
- <ste-icon :code="item.buttonIcon || buttonIcon" :color="item.buttonColor || buttonColor" :fontFamily="fontFamily" />
60
- {{ item.buttonText || buttonText }}
59
+ <ste-icon :code="item.buttonIcon || buttonIcon" :color="item.buttonColor || buttonColor" size="24.5" :fontFamily="fontFamily" />
60
+ <text style="margin-left: 8rpx">{{ item.buttonText || buttonText }}</text>
61
61
  </ste-button>
62
62
  </view>
63
63
  </view>
@@ -187,9 +187,9 @@ const viewClass = computed(() => {
187
187
  <setCheckbox :disabled="checkboxDisabled" iconSize="30" :model-value="_checked" />
188
188
  </view>
189
189
  </view>
190
- <view class="ste-goods-info-codes" @click.stop="onClick('code')">
190
+ <view class="ste-goods-info-codes" v-if="data.code || data.barCode" @click.stop="onClick('code')">
191
191
  {{ data.code }}
192
- <span style="color: #e6e8ea">|</span>
192
+ <span style="color: #e6e8ea" v-if="data.code && data.barCode">|</span>
193
193
  {{ data.barCode }}
194
194
  </view>
195
195
  <slot>
@@ -109,7 +109,7 @@ function loginBtnClick() {
109
109
  <view class="box" :style="[cmpRootStyle]">
110
110
  <view class="user-box" v-if="showUserInfo" @click="userClick">
111
111
  <view class="left">
112
- <ste-image :width="80" :height="80" :src="loginStatus == 1 ? avatar : loginSrc"></ste-image>
112
+ <ste-image :width="92" :height="92" :src="loginStatus == 1 ? avatar : loginSrc"></ste-image>
113
113
  </view>
114
114
  <view class="right">
115
115
  <view class="name" v-if="loginStatus == 1">{{ nickname }}</view>
@@ -161,12 +161,12 @@ function loginBtnClick() {
161
161
  flex-direction: row;
162
162
 
163
163
  .left {
164
- width: 80rpx;
165
- height: 80rpx;
164
+ width: 92rpx;
165
+ height: 92rpx;
166
166
  background: #dddddd;
167
- border-radius: 40rpx;
167
+ border-radius: 50%;
168
168
  overflow: hidden;
169
- margin-right: 12rpx;
169
+ margin-right: 24rpx;
170
170
  }
171
171
  .right {
172
172
  display: flex;
@@ -175,7 +175,7 @@ function loginBtnClick() {
175
175
 
176
176
  .name {
177
177
  color: #000;
178
- font-size: var(--font-size-24, 24rpx);
178
+ font-size: var(--font-size-32, 32rpx);
179
179
  font-weight: Bold;
180
180
  width: 140rpx; /* 设置固定宽度,也可以是百分比或者其他单位 */
181
181
  white-space: nowrap; /* 禁止换行 */
@@ -185,7 +185,7 @@ function loginBtnClick() {
185
185
 
186
186
  .title {
187
187
  color: #000;
188
- font-size: var(--font-size-24, 24rpx);
188
+ font-size: var(--font-size-32, 32rpx);
189
189
  font-weight: Bold;
190
190
  width: 340rpx; /* 设置固定宽度,也可以是百分比或者其他单位 */
191
191
  white-space: nowrap; /* 禁止换行 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "stellar-ui-plus",
3
- "version": "1.21.8",
3
+ "version": "1.21.9",
4
4
  "description": "",
5
5
  "author": "",
6
6
  "license": "MIT",