@kengic/uni 0.7.13 → 0.7.14-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.
- package/bin/postinstall.mjs +1 -1
- package/package.json +1 -1
- package/page/KgPageMy.vue +75 -19
package/bin/postinstall.mjs
CHANGED
package/package.json
CHANGED
package/page/KgPageMy.vue
CHANGED
|
@@ -1,21 +1,34 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<view class="my">
|
|
3
|
-
<UniList class="uni-list
|
|
4
|
-
<UniListItem link title="语言" :right-text="
|
|
5
|
-
<UniListItem link title="仓库" :right-text="
|
|
3
|
+
<UniList class="uni-list--setting">
|
|
4
|
+
<UniListItem link title="语言" :right-text="localeRightText$$" @click="$LocalePopup$open" />
|
|
5
|
+
<UniListItem link title="仓库" :right-text="warehouseRightText$$" @click="openKgWarehouse" />
|
|
6
6
|
<UniListItem link title="工作站 - 工作区" :right-text="stationRightText$$" @click="openKgStation" />
|
|
7
7
|
<UniListItem link title="后端服务地址" :right-text="apiUrl" />
|
|
8
8
|
|
|
9
9
|
<!--#ifdef APP-PLUS-->
|
|
10
10
|
<UniListItem link title="当前版本" :right-text="currentVersion" @click="checkForUpdate" />
|
|
11
|
-
<UniListItem class="list-item
|
|
11
|
+
<UniListItem class="list-item--check-for-update" clickable title="检查更新" @click="checkForUpdate" />
|
|
12
12
|
<!--#endif-->
|
|
13
13
|
|
|
14
|
-
<UniListItem class="list-item
|
|
14
|
+
<UniListItem class="list-item--logout" clickable title="退出系统" @click="logout" />
|
|
15
15
|
</UniList>
|
|
16
16
|
</view>
|
|
17
|
-
|
|
18
|
-
<
|
|
17
|
+
|
|
18
|
+
<UniPopup ref="localePopupRef$" :type="'bottom'" class="my--uni-popup--locale">
|
|
19
|
+
<UniCard :isFull="true" :title="'语言'">
|
|
20
|
+
<view>
|
|
21
|
+
<view class="login-config-form"> TODO</view>
|
|
22
|
+
<view class="buttons">
|
|
23
|
+
<button class="btn btn-cancel" @tap.stop="$LocalePopup$cancel()">取消</button>
|
|
24
|
+
<button :type="'primary' as any" class="btn btn-ok" @tap.stop="$LocalePopup$ok">确认</button>
|
|
25
|
+
</view>
|
|
26
|
+
</view>
|
|
27
|
+
</UniCard>
|
|
28
|
+
</UniPopup>
|
|
29
|
+
|
|
30
|
+
<KgWarehouse ref="kgWarehouseRef$"></KgWarehouse>
|
|
31
|
+
<KgStation ref="kgStationRef$"></KgStation>
|
|
19
32
|
<!--#ifdef APP-PLUS-->
|
|
20
33
|
<KgUpdatePopup />
|
|
21
34
|
<!--#endif-->
|
|
@@ -26,20 +39,31 @@
|
|
|
26
39
|
import { computed, ref } from 'vue';
|
|
27
40
|
import { useAppStore } from '../store/app.store';
|
|
28
41
|
import { KgStation, KgTabBar, KgUpdatePopup, KgWarehouse, useKgStation, useKgWarehouse } from '../component';
|
|
29
|
-
import { UniList, UniListItem } from '../uni-ui';
|
|
42
|
+
import { UniCard, UniList, UniListItem, UniPopup } from '../uni-ui';
|
|
30
43
|
import { KgUtil } from '../util';
|
|
31
44
|
|
|
32
45
|
const appStore = useAppStore();
|
|
33
46
|
const kgWarehouse = useKgWarehouse();
|
|
34
47
|
const kgStation = useKgStation();
|
|
35
48
|
|
|
36
|
-
const kgWarehouseRef = ref<any>(null);
|
|
37
|
-
const kgStationRef = ref<any>(null);
|
|
38
|
-
|
|
39
49
|
//region DATA
|
|
40
50
|
// ----------------------------------------------------------------------------------------------------
|
|
51
|
+
const kgWarehouseRef$ = ref<any>(null);
|
|
52
|
+
const kgStationRef$ = ref<any>(null);
|
|
53
|
+
const localePopupRef$ = ref<any>(null);
|
|
54
|
+
|
|
41
55
|
/**
|
|
42
|
-
*
|
|
56
|
+
* 语言的右侧文本.
|
|
57
|
+
*/
|
|
58
|
+
const localeRightText$$ = computed<string>(() => 'TODO');
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* 仓库的右侧文本.
|
|
62
|
+
*/
|
|
63
|
+
const warehouseRightText$$ = computed<string>(() => kgWarehouse.warehouse.value?.whDsc ?? kgWarehouse.warehouse.value?.whId ?? '');
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* 工作站工作区的右侧文本.
|
|
43
67
|
*/
|
|
44
68
|
const stationRightText$$ = computed<string>(() => {
|
|
45
69
|
let text = kgStation.station.value?.devcodDsc ?? kgStation.station.value?.devcod ?? '';
|
|
@@ -70,18 +94,39 @@
|
|
|
70
94
|
});
|
|
71
95
|
}
|
|
72
96
|
|
|
97
|
+
/**
|
|
98
|
+
* 语言选择弹窗--打开.
|
|
99
|
+
*/
|
|
100
|
+
function $LocalePopup$open() {
|
|
101
|
+
localePopupRef$.value?.open();
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* 语言选择弹窗--取消.
|
|
106
|
+
*/
|
|
107
|
+
function $LocalePopup$cancel() {
|
|
108
|
+
localePopupRef$.value?.close();
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
/**
|
|
112
|
+
* 语言选择弹窗--确定.
|
|
113
|
+
*/
|
|
114
|
+
function $LocalePopup$ok() {
|
|
115
|
+
localePopupRef$.value?.close();
|
|
116
|
+
}
|
|
117
|
+
|
|
73
118
|
/**
|
|
74
119
|
* 打开仓库选择弹窗.
|
|
75
120
|
*/
|
|
76
121
|
function openKgWarehouse() {
|
|
77
|
-
kgWarehouseRef
|
|
122
|
+
kgWarehouseRef$.value?.open();
|
|
78
123
|
}
|
|
79
124
|
|
|
80
125
|
/**
|
|
81
126
|
* 打开工作站选择弹窗.
|
|
82
127
|
*/
|
|
83
128
|
function openKgStation() {
|
|
84
|
-
kgStationRef
|
|
129
|
+
kgStationRef$.value?.open();
|
|
85
130
|
}
|
|
86
131
|
|
|
87
132
|
const apiUrl = computed<string>(() => appStore.getApiUrl ?? '');
|
|
@@ -105,27 +150,38 @@
|
|
|
105
150
|
</script>
|
|
106
151
|
|
|
107
152
|
<style lang="scss">
|
|
108
|
-
.my .uni-list
|
|
153
|
+
.my .uni-list--setting {
|
|
109
154
|
background-color: #e0e0e0;
|
|
110
155
|
}
|
|
111
156
|
|
|
112
|
-
.my .list-item
|
|
157
|
+
.my .list-item--check-for-update {
|
|
113
158
|
text-align: center;
|
|
114
159
|
}
|
|
115
160
|
|
|
116
|
-
.my .list-item
|
|
161
|
+
.my .list-item--check-for-update :deep .uni-list-item__content-title {
|
|
117
162
|
color: #2979ff;
|
|
118
163
|
}
|
|
119
164
|
|
|
120
|
-
.my .list-item
|
|
165
|
+
.my .list-item--logout {
|
|
121
166
|
text-align: center;
|
|
122
167
|
}
|
|
123
168
|
|
|
124
|
-
.my .list-item
|
|
169
|
+
.my .list-item--logout :deep .uni-list-item__content-title {
|
|
125
170
|
color: red;
|
|
126
171
|
}
|
|
127
172
|
|
|
128
173
|
.my :deep .uni-list-item__content-title {
|
|
129
174
|
font-size: 13px;
|
|
130
175
|
}
|
|
176
|
+
|
|
177
|
+
.my--uni-popup--locale .uni-card {
|
|
178
|
+
margin: 0 1px 1px 1px !important;
|
|
179
|
+
box-shadow: none !important;
|
|
180
|
+
border-radius: 3px !important;
|
|
181
|
+
border-left-width: 1px !important;
|
|
182
|
+
padding: 0px !important;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
.my--uni-popup--locale .uni-card .uni-card__header {
|
|
186
|
+
}
|
|
131
187
|
</style>
|