@uxda/appkit 4.3.39 → 4.3.42
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/.cursor/skills/appkit-build-update-component-rules/SKILL.md +54 -54
- package/.cursor/skills/appkit-sync-component-rules/SKILL.md +60 -60
- package/.eslintrc.mjs +7 -7
- package/Appkit/347/273/204/344/273/266/344/275/277/347/224/250/350/247/204/345/210/231.md +2002 -2002
- package/PROJECT_DOCS.md +150 -142
- package/README.md +194 -194
- package/babel.config.js +12 -12
- package/dist/appkit.css +11 -6
- package/dist/index.js +30 -16
- package/package.json +82 -82
- package/project.config.json +15 -15
- package/project.tt.json +13 -13
- package/rollup.config.mjs +81 -81
- package/src/Appkit.ts +72 -72
- package/src/balance/api/endpoints.ts +134 -134
- package/src/balance/api/index.ts +118 -118
- package/src/balance/components/AccountView.vue +850 -834
- package/src/balance/components/BalanceCard.vue +210 -210
- package/src/balance/components/BalanceReminder.vue +84 -84
- package/src/balance/components/ConsumptionFilter.vue +218 -218
- package/src/balance/components/ConsumptionRules.vue +68 -68
- package/src/balance/components/DateFilter.vue +259 -259
- package/src/balance/components/DateRange.vue +111 -111
- package/src/balance/components/ListFilter.vue +62 -62
- package/src/balance/components/ListFilterPicker.vue +191 -191
- package/src/balance/components/PromoterCard.vue +308 -308
- package/src/balance/components/SecondBalance.vue +77 -77
- package/src/balance/components/Tip.vue +45 -45
- package/src/balance/components/index.ts +8 -8
- package/src/balance/types.ts +99 -99
- package/src/components/bt-cropper/index.vue +730 -730
- package/src/components/bt-cropper/utils/calcCropper.js +42 -42
- package/src/components/bt-cropper/utils/calcImagePosition.js +23 -23
- package/src/components/bt-cropper/utils/calcImageSize.js +37 -37
- package/src/components/bt-cropper/utils/calcPointDistance.js +12 -12
- package/src/components/bt-cropper/utils/calcRightAndBottom.js +7 -7
- package/src/components/bt-cropper/utils/ratio.js +3 -3
- package/src/components/bt-cropper/utils/tools.js +25 -25
- package/src/components/dd-area/index.vue +225 -225
- package/src/components/dd-icon/doc.md +21 -21
- package/src/components/dd-icon/index.vue +23 -23
- package/src/components/dd-notice-bar/index.vue +78 -78
- package/src/components/dd-search/doc.md +34 -34
- package/src/components/dd-search/index.vue +168 -168
- package/src/components/dd-selector/index.vue +124 -124
- package/src/components/dd-skeleton/doc.md +19 -19
- package/src/components/dd-skeleton/index.vue +36 -36
- package/src/global.ts +6 -6
- package/src/index.ts +101 -101
- package/src/main.scss +1 -1
- package/src/notice/api/endpoints.ts +54 -54
- package/src/notice/api/index.ts +121 -121
- package/src/notice/components/NoticeBanner.vue +247 -247
- package/src/notice/components/NoticeEntry.vue +99 -99
- package/src/notice/components/NoticeList.vue +311 -311
- package/src/notice/components/NoticeList2.vue +401 -401
- package/src/notice/components/NoticePopup.vue +163 -163
- package/src/notice/components/index.ts +6 -6
- package/src/notice/components/useCommonList.ts +87 -87
- package/src/notice/components/useNotice.ts +35 -35
- package/src/notice/index.ts +1 -1
- package/src/notice/types.ts +25 -25
- package/src/payment/api/config.ts +7 -7
- package/src/payment/api/endpoints.ts +112 -112
- package/src/payment/api/index.ts +108 -108
- package/src/payment/components/AmountPicker.vue +56 -56
- package/src/payment/components/RechargeResult.vue +68 -68
- package/src/payment/components/RechargeView.vue +420 -420
- package/src/payment/components/RightsPicker.vue +105 -105
- package/src/payment/components/TradeView.vue +627 -627
- package/src/payment/components/UserAgreement.vue +234 -234
- package/src/payment/components/index.ts +22 -22
- package/src/payment/components/recharge-amount.spec.ts +54 -54
- package/src/payment/components/recharge-amount.ts +67 -67
- package/src/payment/index.ts +5 -5
- package/src/payment/services/index.ts +16 -16
- package/src/payment/services/invoke-recharge.ts +25 -25
- package/src/payment/services/request-payment.ts +136 -136
- package/src/payment/types.ts +34 -34
- package/src/register/components/SelfRegistration.vue +233 -233
- package/src/register/components/index.ts +2 -2
- package/src/scenarios/components/SharePoster.vue +364 -364
- package/src/scenarios/components/index.ts +2 -2
- package/src/scenarios/components/poster-paste.vue +93 -93
- package/src/scenarios/components/share-poster.md +273 -273
- package/src/shared/components/AppDrawer.vue +53 -53
- package/src/shared/components/AppVerify.vue +137 -137
- package/src/shared/components/DeviceVersion.vue +78 -78
- package/src/shared/components/EmptyView.vue +33 -33
- package/src/shared/components/OcrBank.vue +202 -202
- package/src/shared/components/OcrBusinessLicense.vue +120 -120
- package/src/shared/components/OcrIcon.vue +267 -267
- package/src/shared/components/OcrInvoice.vue +323 -323
- package/src/shared/components/OfficeDocx.vue +33 -33
- package/src/shared/components/OfficePdf.vue +35 -35
- package/src/shared/components/PageHeader.vue +84 -84
- package/src/shared/components/index.ts +12 -12
- package/src/shared/composables/index.ts +10 -10
- package/src/shared/composables/useAmount.ts +46 -46
- package/src/shared/composables/useCompress.ts +64 -64
- package/src/shared/composables/useCountdown.ts +46 -46
- package/src/shared/composables/useCrypto.ts +76 -76
- package/src/shared/composables/useDeviceEnv.ts +61 -61
- package/src/shared/composables/useDragBox.ts +97 -97
- package/src/shared/composables/useEncode.ts +43 -43
- package/src/shared/composables/useLogger.ts +149 -149
- package/src/shared/composables/useSafeArea.ts +46 -46
- package/src/shared/composables/useTabbar.ts +24 -24
- package/src/shared/composables/useUpload.ts +106 -106
- package/src/shared/composables/useValidator.ts +32 -32
- package/src/shared/composables/useWxAuth.ts +49 -49
- package/src/shared/http/Http.ts +149 -149
- package/src/shared/http/index.ts +1 -1
- package/src/shared/http/types.ts +163 -163
- package/src/shared/index.ts +9 -9
- package/src/shared/tracking/directives/index.ts +40 -40
- package/src/shared/tracking/examples/page-tracking-template.vue +27 -27
- package/src/shared/weixin/index.ts +9 -9
- package/src/shared/weixin/jssdk.ts +104 -104
- package/src/shared/weixin/payment.ts +38 -38
- package/src/styles/vars.scss +3 -3
- package/src/user/api/endpoints.ts +17 -17
- package/src/user/api/index.ts +123 -123
- package/src/user/components/LoginSetting.vue +114 -114
- package/src/user/components/UserAuth.vue +218 -218
- package/src/user/components/UserBinding.vue +277 -277
- package/src/user/components/UserBindingSuccess.vue +80 -80
- package/src/user/components/UserEntry.vue +139 -139
- package/src/user/components/UserFeedback.vue +428 -428
- package/src/user/components/UserFeedbackEntry.vue +175 -175
- package/src/user/components/UserHeadCrop.vue +65 -65
- package/src/user/components/UserInfo.vue +711 -711
- package/src/user/components/UserResourceEmpty.vue +75 -75
- package/src/user/components/index.ts +23 -23
- package/src/user/index.ts +1 -1
- package/src/utils/utils.ts +33 -33
- package/tsconfig.json +30 -30
- package/types/global.d.ts +23 -23
- package/types/vue.d.ts +10 -10
- package/dist/assets/asset-3B_CoPto +0 -1
- package/dist/assets/asset-DcH8Kg-2 +0 -1
package/README.md
CHANGED
|
@@ -1,195 +1,195 @@
|
|
|
1
|
-
# AppKit
|
|
2
|
-
|
|
3
|
-
小程序应用开发包
|
|
4
|
-
|
|
5
|
-
向诸小程序提供供用的组件及基础设施
|
|
6
|
-
|
|
7
|
-
模块:
|
|
8
|
-
* payment 支付
|
|
9
|
-
* balance 账户、代币(云豆)余额
|
|
10
|
-
* auth 登录及会话状态 (待定)
|
|
11
|
-
|
|
12
|
-
## 将 AppKit 加入应用项目
|
|
13
|
-
|
|
14
|
-
```bash
|
|
15
|
-
git clone git@10.1.108.137:fed/appkit.git
|
|
16
|
-
cd appkit
|
|
17
|
-
yarn link
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
然后 cd 到(周转)小程序根目录执行:
|
|
21
|
-
```bash
|
|
22
|
-
yarn link @uxda/appkit
|
|
23
|
-
```
|
|
24
|
-
完成 npm link
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
## 用法
|
|
28
|
-
```typescript
|
|
29
|
-
import AppKit from '@uxda/appkit'
|
|
30
|
-
import '@uxda/appkit/appkit.css'
|
|
31
|
-
```
|
|
32
|
-
## AppKit 初始化
|
|
33
|
-
|
|
34
|
-
在应用入口页调用(示例)
|
|
35
|
-
```typescript
|
|
36
|
-
const App = createApp({})
|
|
37
|
-
App.use(AppKit, {
|
|
38
|
-
app: () => 'cloudkitPro',
|
|
39
|
-
tenant: () => '1',
|
|
40
|
-
token: () => localStorage.getItem('token'),
|
|
41
|
-
baseUrl: () => process.env.TARO_APP_BASE_URL,
|
|
42
|
-
401: () => {
|
|
43
|
-
// 登录态丢失时的处理
|
|
44
|
-
}
|
|
45
|
-
})
|
|
46
|
-
```
|
|
47
|
-
为 AppKit 的运行提供必需的 API 参数
|
|
48
|
-
* app: 当前的 app code (嵌入接口调用的 header 参数)
|
|
49
|
-
* tenant: 租户ID 需要提供以便调用接口
|
|
50
|
-
* token: 用户登录态 token
|
|
51
|
-
* baseUrl: 调用 API 的URL域名
|
|
52
|
-
* 401: 登录态丢失异常处理 (通常要跳转登录页)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
## UI组件
|
|
56
|
-
### 1️⃣ 充值用户界面 <recharge-view>
|
|
57
|
-
|
|
58
|
-
```typescript
|
|
59
|
-
import { RechargeView } from '@uxda/appkit'
|
|
60
|
-
```
|
|
61
|
-
|
|
62
|
-
```html
|
|
63
|
-
<template>
|
|
64
|
-
<recharge-view
|
|
65
|
-
app="crm"
|
|
66
|
-
tenant="1"
|
|
67
|
-
@complete="onRechargeComplete" />
|
|
68
|
-
</template>
|
|
69
|
-
```
|
|
70
|
-
|
|
71
|
-
#### 属性 props
|
|
72
|
-
|
|
73
|
-
#### 事件 emits
|
|
74
|
-
|
|
75
|
-
* @complete: 充值完成时发生
|
|
76
|
-
|
|
77
|
-
### 2️⃣ 账户页 <account-view>
|
|
78
|
-
```
|
|
79
|
-
import { AccountView } from '@uxda/appkit'
|
|
80
|
-
```
|
|
81
|
-
```html
|
|
82
|
-
<template>
|
|
83
|
-
<account-view app="crm" @recharge=onAccountViewRecharge />
|
|
84
|
-
<template>
|
|
85
|
-
```
|
|
86
|
-
|
|
87
|
-
#### 事件 emits
|
|
88
|
-
* @recharge 点击充值按钮时发生
|
|
89
|
-
|
|
90
|
-
### 3️⃣ 账户卡片 <balance-card>
|
|
91
|
-
|
|
92
|
-
```typescript
|
|
93
|
-
import { BalanceCard } from '@uxda/appkit'
|
|
94
|
-
```
|
|
95
|
-
|
|
96
|
-
```html
|
|
97
|
-
<template>
|
|
98
|
-
<balance-card app="crm" @drill="onBalanceCardDrill" @recharge="onBalanceCardRecharge" />
|
|
99
|
-
<template>
|
|
100
|
-
```
|
|
101
|
-
|
|
102
|
-
#### 事件 emits
|
|
103
|
-
* app 配置到组件上的 app code
|
|
104
|
-
* @drill 点击账户详情时发生
|
|
105
|
-
* @recharge 点击充值按钮时发生
|
|
106
|
-
|
|
107
|
-
场景端需定义以上跳转逻辑:
|
|
108
|
-
|
|
109
|
-
```typescript
|
|
110
|
-
function onBalanceCardDrill () {
|
|
111
|
-
//...
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
function onBalanceCardRecharge () {
|
|
115
|
-
//...
|
|
116
|
-
}
|
|
117
|
-
```
|
|
118
|
-
|
|
119
|
-
### 方法 methods
|
|
120
|
-
* reload() 刷新数据
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
### 4️⃣ 余额不足提示框 <balance-reminder>
|
|
125
|
-
|
|
126
|
-
```typescript
|
|
127
|
-
import { BalanceReminder } from '@uxda/appkit'
|
|
128
|
-
```
|
|
129
|
-
|
|
130
|
-
```html
|
|
131
|
-
<balance-reminder v-model="balanceReminderOpen"
|
|
132
|
-
@recharge="onBalanceReminderRecharge" />
|
|
133
|
-
```
|
|
134
|
-
|
|
135
|
-
#### 事件 emits
|
|
136
|
-
* @recharge 点击充值按钮时发生
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
## 公共API
|
|
140
|
-
### 1️⃣ 唤起充值(跳支付中心小程序) $app.invokeRecharge()
|
|
141
|
-
|
|
142
|
-
```typescript
|
|
143
|
-
import { useAppKit } from '@uxda/appkit'
|
|
144
|
-
const $app = useAppKit()
|
|
145
|
-
$app.invokeRecharge({
|
|
146
|
-
app: 'crm',
|
|
147
|
-
tenant: '1',
|
|
148
|
-
})
|
|
149
|
-
```
|
|
150
|
-
|
|
151
|
-
### 2️⃣ 唤起充值(小程序内直接支付、不跳) $app.requestPayment()
|
|
152
|
-
|
|
153
|
-
```typescript
|
|
154
|
-
import { useAppKit } from '@uxda/appkit'
|
|
155
|
-
const $app = useAppKit()
|
|
156
|
-
$app.requestPayment({
|
|
157
|
-
app: 'crm',
|
|
158
|
-
tenant: '1',
|
|
159
|
-
amount: 100,
|
|
160
|
-
user: '' // wx.login 之后得到的用户临时凭证
|
|
161
|
-
})
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
## Hooks (Vue Composables)
|
|
165
|
-
|
|
166
|
-
### useTabbar
|
|
167
|
-
用于获取或设置 custom tab bar
|
|
168
|
-
|
|
169
|
-
```typescript
|
|
170
|
-
import { useTabbar } from '@uxda/appkit-next'
|
|
171
|
-
|
|
172
|
-
onMounted(() => {
|
|
173
|
-
const { setTab } = useTabbar()
|
|
174
|
-
setTab('home')
|
|
175
|
-
})
|
|
176
|
-
```
|
|
177
|
-
以上代码用于切换到 /pages/home/index 时, 设置 tab bar 选中项为 'home'
|
|
178
|
-
在 custom-tab-bar/index.vue 需要做以下设置
|
|
179
|
-
|
|
180
|
-
```typescript
|
|
181
|
-
import { useSafeArea, useTabbar } from '@uxda/appkit-next'
|
|
182
|
-
|
|
183
|
-
const { onTabChange } = useTabbar()
|
|
184
|
-
onTabChange((value: string) => {
|
|
185
|
-
selected.value = value
|
|
186
|
-
})
|
|
187
|
-
```
|
|
188
|
-
以上代码设置响应页面内的 setTab() 动作
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
## Skills使用
|
|
192
|
-
1. 「构建后更新组件使用规则」的技能:执行npm run build,并更新 Appkit组件使用规则.md
|
|
193
|
-
```
|
|
194
|
-
只要说「先 build 再更新一下组件使用规则」或「同步 Appkit组件使用规则.md」,Agent 就会按「构建后更新组件使用规则」的技能更新 Appkit组件使用规则.md。
|
|
1
|
+
# AppKit
|
|
2
|
+
|
|
3
|
+
小程序应用开发包
|
|
4
|
+
|
|
5
|
+
向诸小程序提供供用的组件及基础设施
|
|
6
|
+
|
|
7
|
+
模块:
|
|
8
|
+
* payment 支付
|
|
9
|
+
* balance 账户、代币(云豆)余额
|
|
10
|
+
* auth 登录及会话状态 (待定)
|
|
11
|
+
|
|
12
|
+
## 将 AppKit 加入应用项目
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone git@10.1.108.137:fed/appkit.git
|
|
16
|
+
cd appkit
|
|
17
|
+
yarn link
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
然后 cd 到(周转)小程序根目录执行:
|
|
21
|
+
```bash
|
|
22
|
+
yarn link @uxda/appkit
|
|
23
|
+
```
|
|
24
|
+
完成 npm link
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
## 用法
|
|
28
|
+
```typescript
|
|
29
|
+
import AppKit from '@uxda/appkit'
|
|
30
|
+
import '@uxda/appkit/appkit.css'
|
|
31
|
+
```
|
|
32
|
+
## AppKit 初始化
|
|
33
|
+
|
|
34
|
+
在应用入口页调用(示例)
|
|
35
|
+
```typescript
|
|
36
|
+
const App = createApp({})
|
|
37
|
+
App.use(AppKit, {
|
|
38
|
+
app: () => 'cloudkitPro',
|
|
39
|
+
tenant: () => '1',
|
|
40
|
+
token: () => localStorage.getItem('token'),
|
|
41
|
+
baseUrl: () => process.env.TARO_APP_BASE_URL,
|
|
42
|
+
401: () => {
|
|
43
|
+
// 登录态丢失时的处理
|
|
44
|
+
}
|
|
45
|
+
})
|
|
46
|
+
```
|
|
47
|
+
为 AppKit 的运行提供必需的 API 参数
|
|
48
|
+
* app: 当前的 app code (嵌入接口调用的 header 参数)
|
|
49
|
+
* tenant: 租户ID 需要提供以便调用接口
|
|
50
|
+
* token: 用户登录态 token
|
|
51
|
+
* baseUrl: 调用 API 的URL域名
|
|
52
|
+
* 401: 登录态丢失异常处理 (通常要跳转登录页)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
## UI组件
|
|
56
|
+
### 1️⃣ 充值用户界面 <recharge-view>
|
|
57
|
+
|
|
58
|
+
```typescript
|
|
59
|
+
import { RechargeView } from '@uxda/appkit'
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
```html
|
|
63
|
+
<template>
|
|
64
|
+
<recharge-view
|
|
65
|
+
app="crm"
|
|
66
|
+
tenant="1"
|
|
67
|
+
@complete="onRechargeComplete" />
|
|
68
|
+
</template>
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
#### 属性 props
|
|
72
|
+
|
|
73
|
+
#### 事件 emits
|
|
74
|
+
|
|
75
|
+
* @complete: 充值完成时发生
|
|
76
|
+
|
|
77
|
+
### 2️⃣ 账户页 <account-view>
|
|
78
|
+
```
|
|
79
|
+
import { AccountView } from '@uxda/appkit'
|
|
80
|
+
```
|
|
81
|
+
```html
|
|
82
|
+
<template>
|
|
83
|
+
<account-view app="crm" @recharge=onAccountViewRecharge />
|
|
84
|
+
<template>
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
#### 事件 emits
|
|
88
|
+
* @recharge 点击充值按钮时发生
|
|
89
|
+
|
|
90
|
+
### 3️⃣ 账户卡片 <balance-card>
|
|
91
|
+
|
|
92
|
+
```typescript
|
|
93
|
+
import { BalanceCard } from '@uxda/appkit'
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
```html
|
|
97
|
+
<template>
|
|
98
|
+
<balance-card app="crm" @drill="onBalanceCardDrill" @recharge="onBalanceCardRecharge" />
|
|
99
|
+
<template>
|
|
100
|
+
```
|
|
101
|
+
|
|
102
|
+
#### 事件 emits
|
|
103
|
+
* app 配置到组件上的 app code
|
|
104
|
+
* @drill 点击账户详情时发生
|
|
105
|
+
* @recharge 点击充值按钮时发生
|
|
106
|
+
|
|
107
|
+
场景端需定义以上跳转逻辑:
|
|
108
|
+
|
|
109
|
+
```typescript
|
|
110
|
+
function onBalanceCardDrill () {
|
|
111
|
+
//...
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function onBalanceCardRecharge () {
|
|
115
|
+
//...
|
|
116
|
+
}
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
### 方法 methods
|
|
120
|
+
* reload() 刷新数据
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
### 4️⃣ 余额不足提示框 <balance-reminder>
|
|
125
|
+
|
|
126
|
+
```typescript
|
|
127
|
+
import { BalanceReminder } from '@uxda/appkit'
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
```html
|
|
131
|
+
<balance-reminder v-model="balanceReminderOpen"
|
|
132
|
+
@recharge="onBalanceReminderRecharge" />
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
#### 事件 emits
|
|
136
|
+
* @recharge 点击充值按钮时发生
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
## 公共API
|
|
140
|
+
### 1️⃣ 唤起充值(跳支付中心小程序) $app.invokeRecharge()
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import { useAppKit } from '@uxda/appkit'
|
|
144
|
+
const $app = useAppKit()
|
|
145
|
+
$app.invokeRecharge({
|
|
146
|
+
app: 'crm',
|
|
147
|
+
tenant: '1',
|
|
148
|
+
})
|
|
149
|
+
```
|
|
150
|
+
|
|
151
|
+
### 2️⃣ 唤起充值(小程序内直接支付、不跳) $app.requestPayment()
|
|
152
|
+
|
|
153
|
+
```typescript
|
|
154
|
+
import { useAppKit } from '@uxda/appkit'
|
|
155
|
+
const $app = useAppKit()
|
|
156
|
+
$app.requestPayment({
|
|
157
|
+
app: 'crm',
|
|
158
|
+
tenant: '1',
|
|
159
|
+
amount: 100,
|
|
160
|
+
user: '' // wx.login 之后得到的用户临时凭证
|
|
161
|
+
})
|
|
162
|
+
```
|
|
163
|
+
|
|
164
|
+
## Hooks (Vue Composables)
|
|
165
|
+
|
|
166
|
+
### useTabbar
|
|
167
|
+
用于获取或设置 custom tab bar
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
import { useTabbar } from '@uxda/appkit-next'
|
|
171
|
+
|
|
172
|
+
onMounted(() => {
|
|
173
|
+
const { setTab } = useTabbar()
|
|
174
|
+
setTab('home')
|
|
175
|
+
})
|
|
176
|
+
```
|
|
177
|
+
以上代码用于切换到 /pages/home/index 时, 设置 tab bar 选中项为 'home'
|
|
178
|
+
在 custom-tab-bar/index.vue 需要做以下设置
|
|
179
|
+
|
|
180
|
+
```typescript
|
|
181
|
+
import { useSafeArea, useTabbar } from '@uxda/appkit-next'
|
|
182
|
+
|
|
183
|
+
const { onTabChange } = useTabbar()
|
|
184
|
+
onTabChange((value: string) => {
|
|
185
|
+
selected.value = value
|
|
186
|
+
})
|
|
187
|
+
```
|
|
188
|
+
以上代码设置响应页面内的 setTab() 动作
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
## Skills使用
|
|
192
|
+
1. 「构建后更新组件使用规则」的技能:执行npm run build,并更新 Appkit组件使用规则.md
|
|
193
|
+
```
|
|
194
|
+
只要说「先 build 再更新一下组件使用规则」或「同步 Appkit组件使用规则.md」,Agent 就会按「构建后更新组件使用规则」的技能更新 Appkit组件使用规则.md。
|
|
195
195
|
```
|
package/babel.config.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
// babel-preset-taro 更多选项和默认值:
|
|
2
|
-
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
|
|
3
|
-
module.exports = {
|
|
4
|
-
presets: [
|
|
5
|
-
['taro', {
|
|
6
|
-
framework: 'vue3',
|
|
7
|
-
ts: true
|
|
8
|
-
}]
|
|
9
|
-
],
|
|
10
|
-
plugins: [
|
|
11
|
-
],
|
|
12
|
-
}
|
|
1
|
+
// babel-preset-taro 更多选项和默认值:
|
|
2
|
+
// https://github.com/NervJS/taro/blob/next/packages/babel-preset-taro/README.md
|
|
3
|
+
module.exports = {
|
|
4
|
+
presets: [
|
|
5
|
+
['taro', {
|
|
6
|
+
framework: 'vue3',
|
|
7
|
+
ts: true
|
|
8
|
+
}]
|
|
9
|
+
],
|
|
10
|
+
plugins: [
|
|
11
|
+
],
|
|
12
|
+
}
|
package/dist/appkit.css
CHANGED
|
@@ -623,9 +623,9 @@
|
|
|
623
623
|
color: #353535;
|
|
624
624
|
background: linear-gradient(90deg, #ffebc1 0%, #ffb875 100%);
|
|
625
625
|
}
|
|
626
|
-
page {
|
|
627
|
-
--text-color: #333;
|
|
628
|
-
--text-color-dark-mode: #eee;
|
|
626
|
+
page {
|
|
627
|
+
--text-color: #333;
|
|
628
|
+
--text-color-dark-mode: #eee;
|
|
629
629
|
}
|
|
630
630
|
.account-card .card {
|
|
631
631
|
background: linear-gradient(90deg, #EEF1FA 0%, #E4E6F3 100%);
|
|
@@ -1186,17 +1186,22 @@ page {
|
|
|
1186
1186
|
font-weight: 700;
|
|
1187
1187
|
color: #000;
|
|
1188
1188
|
}
|
|
1189
|
-
.operation-box .operation-list .box-detail .item-detail .item-info-type {
|
|
1190
|
-
line-height: 15px;
|
|
1191
|
-
}
|
|
1192
1189
|
.operation-box .operation-list .box-detail .item-detail .item-info-title {
|
|
1193
1190
|
font-weight: 400;
|
|
1194
1191
|
opacity: 0.8;
|
|
1195
1192
|
font-size: 11px;
|
|
1196
1193
|
}
|
|
1194
|
+
.operation-box .operation-list .box-detail .item-detail .item-info-right {
|
|
1195
|
+
text-align: right;
|
|
1196
|
+
}
|
|
1197
1197
|
.operation-box .operation-list .box-detail .item-detail .item-info-amount {
|
|
1198
1198
|
color: #9e7b5a;
|
|
1199
1199
|
}
|
|
1200
|
+
.operation-box .operation-list .box-detail .item-detail .item-info-time {
|
|
1201
|
+
font-weight: 400;
|
|
1202
|
+
opacity: 0.5;
|
|
1203
|
+
font-size: 11px;
|
|
1204
|
+
}
|
|
1200
1205
|
.operation-box .operation-list .box-detail .item-detail-remark {
|
|
1201
1206
|
opacity: 0.3;
|
|
1202
1207
|
line-height: 15px;
|
package/dist/index.js
CHANGED
|
@@ -4640,7 +4640,7 @@ var script$z = /* @__PURE__ */ defineComponent({
|
|
|
4640
4640
|
])
|
|
4641
4641
|
])
|
|
4642
4642
|
]),
|
|
4643
|
-
createCommentVNode(' <div class="line"></div>\n <div class="card-row">\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\n <div class="card-row-right">\n <div class="pay" v-track-click @click="gotoRecharge">\n <div>\u5145\u503C</div>\n <img\n class="pay-icon"\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\n />\n </div>\n </div>\n </div> ')
|
|
4643
|
+
createCommentVNode(' <div class="line"></div>\r\n <div class="card-row">\r\n <div class="card-row-left desc">\u6743\u76CA\u4F7F\u7528\u65F6\u81EA\u52A8\u6263\u51CF\u4E91\u8C46</div>\r\n <div class="card-row-right">\r\n <div class="pay" v-track-click @click="gotoRecharge">\r\n <div>\u5145\u503C</div>\r\n <img\r\n class="pay-icon"\r\n src="https://cdn.ddjf.com/static/images/bpms-workBench/bean-right.png"\r\n />\r\n </div>\r\n </div>\r\n </div> ')
|
|
4644
4644
|
])
|
|
4645
4645
|
]);
|
|
4646
4646
|
};
|
|
@@ -5178,9 +5178,11 @@ const _hoisted_43 = { class: "item-detail" };
|
|
|
5178
5178
|
const _hoisted_44 = { class: "item-info spa-between" };
|
|
5179
5179
|
const _hoisted_45 = { class: "item-info-type" };
|
|
5180
5180
|
const _hoisted_46 = { class: "item-info-title" };
|
|
5181
|
-
const _hoisted_47 = { class: "item-info-
|
|
5182
|
-
const _hoisted_48 = { class: "item-
|
|
5183
|
-
const _hoisted_49 = {
|
|
5181
|
+
const _hoisted_47 = { class: "item-info-right" };
|
|
5182
|
+
const _hoisted_48 = { class: "item-info-amount number" };
|
|
5183
|
+
const _hoisted_49 = { class: "item-info-time number" };
|
|
5184
|
+
const _hoisted_50 = { class: "item-detail-remark" };
|
|
5185
|
+
const _hoisted_51 = {
|
|
5184
5186
|
key: 0,
|
|
5185
5187
|
class: "box-not-text"
|
|
5186
5188
|
};
|
|
@@ -5222,6 +5224,9 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5222
5224
|
let endTime = (filtering.dateTo || "").replace(/-/g, ".").substring(2);
|
|
5223
5225
|
return startTime + " - " + endTime;
|
|
5224
5226
|
});
|
|
5227
|
+
function formatItemTime(time) {
|
|
5228
|
+
return dayjs(time).format("HH:mm:ss");
|
|
5229
|
+
}
|
|
5225
5230
|
const consumptionGroups = ref([]);
|
|
5226
5231
|
const balance = ref({
|
|
5227
5232
|
total: 0,
|
|
@@ -5438,7 +5443,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5438
5443
|
1
|
|
5439
5444
|
/* TEXT */
|
|
5440
5445
|
),
|
|
5441
|
-
!isAppEnv.value || isAppEnv.value && !unref(isIOS)() ? withDirectives((openBlock(), createElementBlock("div", {
|
|
5446
|
+
props.app !== "fnfundkit" && (!isAppEnv.value || isAppEnv.value && !unref(isIOS)()) ? withDirectives((openBlock(), createElementBlock("div", {
|
|
5442
5447
|
key: 0,
|
|
5443
5448
|
class: "pay",
|
|
5444
5449
|
onClick: gotoRecharge
|
|
@@ -5454,7 +5459,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5454
5459
|
])
|
|
5455
5460
|
]),
|
|
5456
5461
|
createVNode(script$u),
|
|
5457
|
-
createCommentVNode(' <div class="rights-card" v-if="bdxLiteRight">\n <div class="title">\u98CE\u63A7\u4E2A\u4EBA\u98CE\u9669Lite\u6743\u76CA</div>\n <div class="list">\n <div class="item star-item">\n <div class="item-count">\n <span>{{ formatAmount(bdxLiteRight.count || 0) }}</span><span>{{ bdxLiteRight.unit }}</span>\n </div>\n <div class="item-title">\n <div>{{ bdxLiteRight.title }}\u6B21\u6570</div>\n <div class="item-title-button" v-if="!isAppEnv || (isAppEnv && !isIOS())">\n <div v-track-click @click="gotoTrade(bdxLiteRight)">\u98CE\u63A7\u4E2A\u4EBA\u98CE\u9669Lite\u5145\u503C</div>\n <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />\n </div>\n </div>\n </div>\n </div>\n </div> '),
|
|
5462
|
+
createCommentVNode(' <div class="rights-card" v-if="bdxLiteRight">\r\n <div class="title">\u98CE\u63A7\u4E2A\u4EBA\u98CE\u9669Lite\u6743\u76CA</div>\r\n <div class="list">\r\n <div class="item star-item">\r\n <div class="item-count">\r\n <span>{{ formatAmount(bdxLiteRight.count || 0) }}</span><span>{{ bdxLiteRight.unit }}</span>\r\n </div>\r\n <div class="item-title">\r\n <div>{{ bdxLiteRight.title }}\u6B21\u6570</div>\r\n <div class="item-title-button" v-if="!isAppEnv || (isAppEnv && !isIOS())">\r\n <div v-track-click @click="gotoTrade(bdxLiteRight)">\u98CE\u63A7\u4E2A\u4EBA\u98CE\u9669Lite\u5145\u503C</div>\r\n <img class="button-icon" src="https://cdn.ddjf.com/static/images/bpms-workBench/button-hg.svg" />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n </div> '),
|
|
5458
5463
|
bdxProRight.value ? (openBlock(), createElementBlock("div", _hoisted_8$4, [
|
|
5459
5464
|
_cache[15] || (_cache[15] = createElementVNode(
|
|
5460
5465
|
"div",
|
|
@@ -5947,17 +5952,26 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5947
5952
|
/* TEXT */
|
|
5948
5953
|
)
|
|
5949
5954
|
]),
|
|
5950
|
-
createElementVNode(
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5955
|
+
createElementVNode("div", _hoisted_47, [
|
|
5956
|
+
createElementVNode(
|
|
5957
|
+
"div",
|
|
5958
|
+
_hoisted_48,
|
|
5959
|
+
toDisplayString(it.\u6536\u5165\u8FD8\u662F\u652F\u51FA == "\u652F\u51FA" ? "-" : "+") + toDisplayString(it.amount),
|
|
5960
|
+
1
|
|
5961
|
+
/* TEXT */
|
|
5962
|
+
),
|
|
5963
|
+
createElementVNode(
|
|
5964
|
+
"div",
|
|
5965
|
+
_hoisted_49,
|
|
5966
|
+
toDisplayString(formatItemTime(it.time)),
|
|
5967
|
+
1
|
|
5968
|
+
/* TEXT */
|
|
5969
|
+
)
|
|
5970
|
+
])
|
|
5957
5971
|
]),
|
|
5958
5972
|
createElementVNode(
|
|
5959
5973
|
"div",
|
|
5960
|
-
|
|
5974
|
+
_hoisted_50,
|
|
5961
5975
|
toDisplayString(it.description),
|
|
5962
5976
|
1
|
|
5963
5977
|
/* TEXT */
|
|
@@ -5973,7 +5987,7 @@ var script$t = /* @__PURE__ */ defineComponent({
|
|
|
5973
5987
|
128
|
|
5974
5988
|
/* KEYED_FRAGMENT */
|
|
5975
5989
|
)),
|
|
5976
|
-
reachedLastPage.value ? (openBlock(), createElementBlock("div",
|
|
5990
|
+
reachedLastPage.value ? (openBlock(), createElementBlock("div", _hoisted_51, "\u6CA1\u6709\u66F4\u591A\u4E86")) : createCommentVNode("v-if", true)
|
|
5977
5991
|
])) : (openBlock(), createBlock(script$v, { key: 1 }))
|
|
5978
5992
|
]),
|
|
5979
5993
|
_: 1
|
|
@@ -8477,7 +8491,7 @@ var script$e = /* @__PURE__ */ defineComponent({
|
|
|
8477
8491
|
class: normalizeClass(["tabContainer", { inH5: unref(isWeb)() }])
|
|
8478
8492
|
},
|
|
8479
8493
|
[
|
|
8480
|
-
createCommentVNode(' <ns-tabs\n v-model="state.tab"\n fill="#fff"\n square\n size="xl"\n style="height: 46px"\n @change="onTabChange"\n >\n <ns-tabs-item key="\u5168\u90E8" tab="\u5168\u90E8"></ns-tabs-item>\n <ns-tabs-item key="\u4E1A\u52A1\u6D88\u606F" tab="\u4E1A\u52A1\u6D88\u606F"></ns-tabs-item>\n <ns-tabs-item key="\u7CFB\u7EDF\u516C\u544A" tab="\u7CFB\u7EDF\u516C\u544A"></ns-tabs-item>\n <ns-tabs-item key="\u672A\u8BFB" tab="\u672A\u8BFB"></ns-tabs-item>\n </ns-tabs> '),
|
|
8494
|
+
createCommentVNode(' <ns-tabs\r\n v-model="state.tab"\r\n fill="#fff"\r\n square\r\n size="xl"\r\n style="height: 46px"\r\n @change="onTabChange"\r\n >\r\n <ns-tabs-item key="\u5168\u90E8" tab="\u5168\u90E8"></ns-tabs-item>\r\n <ns-tabs-item key="\u4E1A\u52A1\u6D88\u606F" tab="\u4E1A\u52A1\u6D88\u606F"></ns-tabs-item>\r\n <ns-tabs-item key="\u7CFB\u7EDF\u516C\u544A" tab="\u7CFB\u7EDF\u516C\u544A"></ns-tabs-item>\r\n <ns-tabs-item key="\u672A\u8BFB" tab="\u672A\u8BFB"></ns-tabs-item>\r\n </ns-tabs> '),
|
|
8481
8495
|
createVNode(unref(NsTabs), {
|
|
8482
8496
|
modelValue: state.tab,
|
|
8483
8497
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => state.tab = $event),
|