@kengic/uni 0.5.0 → 0.5.1-beta.1

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,28 +1,28 @@
1
- // noinspection ES6UnusedImports
2
-
3
- import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
4
- import * as DEF from '../../../def';
5
- import { keys } from '../../models';
6
-
7
- /** 请求参数. */
8
- export class GetLatestApkVersionQuery {}
9
-
10
- /**
11
- * 获取 APK 最新的版本号.
12
- *
13
- * @param config 请求配置.
14
- * @param option 请求选项.
15
- */
16
- export function GetLatestApkVersion(config?: IRequestConfig<GetLatestApkVersionQuery, {}>, option?: IRequestOptions): Promise<string> {
17
- return httpClient().request(
18
- {
19
- method: GetLatestApkVersion.method,
20
- url: `${option?.mock ? '/mock' : ''}${GetLatestApkVersion.url}`,
21
- ...(config ?? {}),
22
- },
23
- option,
24
- );
25
- }
26
-
27
- GetLatestApkVersion.method = 'GET' as const;
28
- GetLatestApkVersion.url = '/sys/common/getLatestApkVersion';
1
+ // noinspection ES6UnusedImports
2
+
3
+ import { httpClient, IRequestConfig, IRequestOptions } from '../../../../service';
4
+ import * as DEF from '../../../def';
5
+ import { keys } from '../../models';
6
+
7
+ /** 请求参数. */
8
+ export class GetLatestApkVersionQuery {}
9
+
10
+ /**
11
+ * 获取 APK 最新的版本号.
12
+ *
13
+ * @param config 请求配置.
14
+ * @param option 请求选项.
15
+ */
16
+ export function GetLatestApkVersion(config?: IRequestConfig<GetLatestApkVersionQuery, {}>, option?: IRequestOptions): Promise<string> {
17
+ return httpClient().request(
18
+ {
19
+ method: GetLatestApkVersion.method,
20
+ url: `${option?.mock ? '/mock' : ''}${GetLatestApkVersion.url}`,
21
+ ...(config ?? {}),
22
+ },
23
+ option,
24
+ );
25
+ }
26
+
27
+ GetLatestApkVersion.method = 'GET' as const;
28
+ GetLatestApkVersion.url = '/sys/common/getLatestApkVersion';
@@ -166,7 +166,13 @@
166
166
  font-size: 14px;
167
167
  }
168
168
 
169
- .kg-update-popup.kg-update-popup--not-allow-cancel :deep(.uni-dialog-button:not(.uni-border-left)) {
170
- display: none;
169
+ .kg-update-popup.kg-update-popup--not-allow-cancel {
170
+ :deep(.uni-dialog-button:first-child) {
171
+ display: none;
172
+ }
173
+
174
+ :deep(.uni-dialog-button:last-child) {
175
+ border-left-width: 0px !important;
176
+ }
171
177
  }
172
178
  </style>
@@ -6,7 +6,7 @@
6
6
  </UniPopup>
7
7
  </template>
8
8
 
9
- <script setup lang="ts">
9
+ <script lang="ts" setup>
10
10
  import { UniDataCheckbox, UniPopup, UniPopupDialog } from '../../uni';
11
11
  import { API } from '../../api';
12
12
  import { ref } from 'vue';
@@ -17,7 +17,7 @@
17
17
 
18
18
  const kgWarehouse = useKgWarehouse();
19
19
 
20
- const popupRef = ref<UniPopupDialog>(null);
20
+ const popupRef = ref<any>(null);
21
21
  /** 当前选择的仓库编号. */
22
22
  const whID = ref<string>('');
23
23
  /** 仓库列表. */
@@ -44,20 +44,20 @@
44
44
  const { records } = await API.WMS.WhController.ListVO({ params: { pageNo: 1, pageSize: 999 } });
45
45
  warehouses = records ?? [];
46
46
  datas.value = warehouses.map((i: WhDTO) => ({
47
- value: i.whId,
47
+ value: i.whId ?? '',
48
48
  text: `${i.whDsc ?? ' '} - ${i.whId ?? ' '}`,
49
49
  }));
50
50
 
51
51
  const currentWarehouse = warehouses.find((i) => kgWarehouse.warehouse.value?.whId === i.whId);
52
52
  // 如果当前仓库不为空, 且有效(存在于当前仓库列表中), 则继续使用
53
53
  if (currentWarehouse) {
54
- whID.value = currentWarehouse.whId;
54
+ whID.value = currentWarehouse.whId ?? '';
55
55
  }
56
56
  // 否则, 清空当前仓库, 并默认选中第一个仓库
57
57
  else {
58
58
  kgWarehouse.store.setWarehouse(null);
59
59
  if (warehouses.length > 0) {
60
- whID.value = warehouses[0].whId;
60
+ whID.value = warehouses[0].whId ?? '';
61
61
  }
62
62
  }
63
63
  } catch (e) {
@@ -74,6 +74,10 @@
74
74
  display: none;
75
75
  }
76
76
 
77
+ .uni-dialog-button-group > .uni-dialog-button:last-child {
78
+ border-left-width: 0px !important;
79
+ }
80
+
77
81
  .uni-label-pointer {
78
82
  width: 100%;
79
83
  margin: 0 !important;
@@ -1,11 +1,10 @@
1
1
  /**
2
- * localStorage 的 KEY.
2
+ * 本地缓存的项.
3
3
  */
4
4
  const STORAGE_KEYS = {
5
5
  API_URL: 'API_URL',
6
6
  TOKEN: 'TOKEN',
7
7
  USER: 'USER',
8
- MENUS: 'MENUS',
9
8
  };
10
9
 
11
10
  export { STORAGE_KEYS };
@@ -4,13 +4,16 @@ import { SysUser } from '../api/WMS/models';
4
4
  import { API } from '../api';
5
5
 
6
6
  interface IAppState {
7
+ /** 后端接口地址. */
7
8
  apiUrl: string;
9
+
10
+ /** 登录令牌. */
8
11
  token: string;
9
12
 
10
13
  /** 当前登录用户. */
11
14
  user: SysUser | null;
12
15
 
13
- /** 是否取消本次升级. 取消之后, 使用应用期间不会再提示升级, 下次重新打开应用才会提示升级. */
16
+ /** 是否取消本次升级. 取消之后, 使用应用期间不会再提示升级, 直到下次重新打开应用才会提示升级. */
14
17
  isUpdateCancel: boolean;
15
18
  }
16
19
 
@@ -22,10 +25,12 @@ export const useAppStore = defineStore('app', {
22
25
  isUpdateCancel: false,
23
26
  }),
24
27
  getters: {
28
+ /** 后端接口地址. */
25
29
  getApiUrl(state) {
26
30
  return state.apiUrl || uni.getStorageSync(STORAGE_KEYS.API_URL);
27
31
  },
28
32
 
33
+ /** 登录令牌. */
29
34
  getToken(state) {
30
35
  return state.token || uni.getStorageSync(STORAGE_KEYS.TOKEN);
31
36
  },
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kengic/uni",
3
- "version": "0.5.0",
3
+ "version": "0.5.1-beta.1",
4
4
  "scripts": {
5
5
  "build": "npm run switch-node-version && rimraf dist && vue-tsc && vite build",
6
6
  "------ -------------------------------------------": "",
@@ -29,37 +29,35 @@
29
29
  "publish:npm": "npm run switch-node-version && npmrc kengic && npm publish ./ --registry https://registry.npmjs.org/ --access public"
30
30
  },
31
31
  "dependencies": {
32
- "@ant-design/icons-vue": "~6.1.0",
32
+ "@ant-design/icons-vue": "6.1.0",
33
+ "@dcloudio/types": "~3.3.3",
33
34
  "@dcloudio/uni-app": "3.0.0-alpha-3080220230428001",
34
35
  "@iconify-icons/ant-design": "~1.2.5",
35
36
  "@iconify/vue": "~4.1.1",
36
- "@vueuse/core": "~8.9.4",
37
- "@vueuse/shared": "~8.9.4",
38
- "lodash-es": "~4.17.21",
39
- "pinia": "~2.0.35",
40
- "uuid": "~9.0.1",
41
- "vue": "~3.2.47"
42
- },
43
- "devDependencies": {
44
- "@dcloudio/types": "~3.3.3",
45
- "@kengic/pont": "~1.2.12",
46
- "@types/lodash-es": "~4.17.7",
47
- "@types/node": "~18.14.6",
48
- "@types/semver": "~7.3.13",
37
+ "@kengic/pont": "1.2.13-beta.2",
38
+ "@types/lodash-es": "4.17.7",
39
+ "@types/node": "18.16.3",
40
+ "@types/semver": "7.3.13",
49
41
  "@types/uuid": "~9.0.7",
50
- "@vitejs/plugin-vue": "~4.2.1",
51
- "chalk": "~4.1.2",
52
- "less": "~4.1.3",
53
- "prettier": "~3.2.4",
42
+ "@vitejs/plugin-vue": "4.2.1",
43
+ "@vueuse/core": "8.9.4",
44
+ "@vueuse/shared": "8.9.4",
45
+ "ant-design-vue": "3.2.20",
46
+ "chalk": "4.1.2",
47
+ "less": "4.1.3",
48
+ "lodash-es": "4.17.21",
49
+ "pinia": "2.0.35",
50
+ "prettier": "3.2.5",
54
51
  "rimraf": "~3.0.2",
55
52
  "rollup": "~2.79.1",
56
- "sass": "~1.62.1",
57
- "sass-loader": "~10.4.1",
58
- "semver": "~7.3.8",
59
- "typescript": "~4.9.5",
60
- "vite": "~4.3.4",
61
- "vue": "~3.2.47",
62
- "vue-tsc": "~1.6.4"
53
+ "sass": "1.62.1",
54
+ "sass-loader": "10.4.1",
55
+ "semver": "7.5.0",
56
+ "typescript": "4.9.5",
57
+ "uuid": "~9.0.1",
58
+ "vite": "4.3.4",
59
+ "vue": "3.2.47",
60
+ "vue-tsc": "1.8.27"
63
61
  },
64
62
  "main": "./dist/kengic-uni.js",
65
63
  "module": "./dist/kengic-uni.js",