@uxda/appkit 1.0.40 → 1.0.46

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.
@@ -0,0 +1,61 @@
1
+ {
2
+ "新建组件": {
3
+ "prefix": ["nsc", "nutshell"],
4
+ "body": [
5
+ "import { PropType, ObjectEmitsOptions, SlotsType } from 'vue'"
6
+ "import { define, MakePropsType } from '../../utils'"
7
+ "",
8
+ "export const ${2}Props = {"
9
+ "\tlabel: {"
10
+ "\t\ttype: String"
11
+ "\t}"
12
+ "}"
13
+ ""
14
+ "export type ${1}Emits = {"
15
+ "}"
16
+ ""
17
+ "const ${2}Emits: ${1}Emits = {"
18
+ "}"
19
+ ""
20
+ "export type ${1}Slots = {"
21
+ "\tdefault: never,"
22
+ "}"
23
+ ""
24
+ "export type ${1}Props = MakePropsType<typeof ${2}Props, ${1}Emits>"
25
+ "",
26
+ "$BLOCK_COMMENT_START*"
27
+ " * ${3} 组件 <ns-${2}>"
28
+ " $BLOCK_COMMENT_END"
29
+ "export const Ns${1:$TM_FILENAME_BASE} = define({"
30
+ "\tname: 'Ns${1}',"
31
+ "\tprops: ${2}Props,"
32
+ "\temits: ${2}Emits,"
33
+ "\tsetup (props, ctx) {"
34
+ "\t\treturn {"
35
+ "\t\t}"
36
+ "\t}"
37
+ "})"
38
+ "// 需要增加 import 到 ./index.ts, ../components.ts"
39
+ ],
40
+ "description": "新建组件"
41
+ },
42
+
43
+ "新建 vendor": {
44
+ "prefix": ["nsv", "nutshell-vendor"],
45
+ "body": [
46
+ "import { h, SetupContext } from 'vue'",
47
+ "import { ${2:$TM_FILENAME_BASE} as Antdv${2} } from 'ant-design-vue'",
48
+ "import { ${1}Props } from '../../../../components'"
49
+ "",
50
+ "export const ${1:$TM_FILENAME_BASE} = (props: ${1}Props, ctx: SetupContext) => {",
51
+ "",
52
+ "\treturn h(Antdv${2}, {",
53
+ "\t\tclass: 'ns-${3}',",
54
+ "\t}, () => '')",
55
+ "}",
56
+ "// + import => ./index.ts, ../components.ts"
57
+ ""
58
+ ],
59
+ "description": "新建组件"
60
+ }
61
+ }
@@ -0,0 +1,7 @@
1
+ {
2
+ "recommendations": [
3
+ "editorconfig.editorconfig",
4
+ ],
5
+ "unwantedRecommendations": [
6
+ ]
7
+ }
@@ -0,0 +1,98 @@
1
+ {
2
+ "eslint.enable": true,
3
+ "eslint.validate": [],
4
+ "javascript.format.insertSpaceBeforeFunctionParenthesis": true,
5
+ "files.exclude": {
6
+ "**/dist": true,
7
+ "**/nutshell.css": true,
8
+ "**/antdv.css": true,
9
+ "**/nutui.css": true,
10
+ "**/auto-imports.d.ts": true,
11
+ "**/node_modules": true,
12
+ "**/yarn-error.log": true,
13
+ "**/.eslintrc-auto-import.json": true,
14
+ },
15
+ "workbench.colorCustomizations": {
16
+ "[Atlantic Night]": {
17
+ "editor.background": "#060f3d",
18
+ "tab.border": "#060f3d",
19
+ "tab.activeBackground": "#060f3d",
20
+ "tab.activeBorder": "#060f3d",
21
+ "tab.activeBorderTop": "#060f3d",
22
+ "tab.inactiveBackground": "#060f3d",
23
+ "tab.activeModifiedBorder": "#060f3d",
24
+ "sideBar.background": "#060f3d",
25
+ "sideBar.border": "#060f3d",
26
+ "sideBar.foreground": "#0091ff",
27
+ "sideBarSectionHeader.border": "#060f3d",
28
+ "focusBorder": "#060f3d",
29
+ "sideBarSectionHeader.background": "#060f3d",
30
+ "activityBar.background": "#060f3d",
31
+ "activityBar.foreground": "#ff009d",
32
+ "activityBar.activeBorder": "#ff009d",
33
+ "activityBar.inactiveForeground": "#ff009d",
34
+ "scrollbarSlider.background": "#00569d66",
35
+ "activityBar.border": "#060f3d",
36
+ "activityBar.activeBackground": "#060f3d",
37
+ "editorGroup.border": "#060f3d",
38
+ "editorGroupHeader.noTabsBackground": "#060f3d",
39
+ "editorGroupHeader.tabsBackground": "#060f3d",
40
+ "editorGroupHeader.tabsBorder": "#060f3d",
41
+ "editorWidget.background": "#060f3d",
42
+ "editorHoverWidget.background": "#001163",
43
+ "editorHoverWidget.border": "#002aff",
44
+ "editorSuggestWidget.background": "#001163",
45
+ "editorSuggestWidget.border": "#002aff",
46
+ "editorSuggestWidget.focusHighlightForeground": "#00ff73",
47
+ "editorSuggestWidget.selectedBackground": "#ff009d",
48
+ "editorGutter.background": "#060f3d",
49
+ "editor.lineHighlightBackground": "#08165a",
50
+ "editor.lineHighlightBorder": "#060f3d",
51
+ "titleBar.activeBackground": "#060f3d",
52
+ "titleBar.inactiveBackground": "#060f3d",
53
+ "quickInput.background": "#001163",
54
+ "quickInputList.focusBackground": "#ff009d",
55
+ "quickInputTitle.background": "#ff0000",
56
+ "quickInput.foreground": "#00ff73",
57
+ "input.background": "#060f3d",
58
+ }
59
+ },
60
+ "editor.semanticTokenColorCustomizations": {
61
+ "rules": {
62
+ "keyword.void": {
63
+ "foreground": "#ffff99",
64
+ "fontStyle": "underline"
65
+ }
66
+ },
67
+ },
68
+ "editor.tokenColorCustomizations": {
69
+ "[Shades of Purple]": {
70
+ "comments": {
71
+ "foreground": "#00ffae",
72
+ "fontStyle": ""
73
+ },
74
+ "textMateRules": [
75
+ {
76
+ "name": "types",
77
+ "scope": "entity.name.type",
78
+ "settings": {
79
+ "fontStyle": "bold underline",
80
+ },
81
+ },
82
+ {
83
+ "scope": "variable.other.readwrite.ts",
84
+ "settings": {
85
+ "foreground": "#ff00c8"
86
+ }
87
+ },
88
+ {
89
+ "scope": "entity.other.attribute-name.html",
90
+ "settings": {
91
+ "fontStyle": "",
92
+ "foreground": "#ffbb00"
93
+ },
94
+ }
95
+ ]
96
+ }
97
+ }
98
+ }
package/README.md CHANGED
@@ -35,13 +35,20 @@ import '@uxda/appkit/appkit.css'
35
35
  ```typescript
36
36
  const App = createApp({})
37
37
  App.use(AppKit, {
38
+ app: () => 'cloudkitPro',
38
39
  token: () => localStorage.getItem('token'),
39
40
  baseUrl: () => process.env.TARO_APP_BASE_URL,
41
+ 401: () => {
42
+ // 登录态丢失时的处理
43
+ }
40
44
  })
41
45
  ```
42
46
  为 AppKit 的运行提供必需的 API 参数
47
+ * app: 当前的 app code (嵌入接口调用的 header 参数)
43
48
  * token: 用户登录态 token
44
49
  * baseUrl: 调用 API 的URL域名
50
+ * 401: 登录态丢失异常处理 (通常要跳转登录页)
51
+
45
52
 
46
53
  ## UI组件
47
54
  ### 1️⃣ 充值用户界面 &lt;recharge-view&gt;
package/dist/appkit.css CHANGED
@@ -137,36 +137,44 @@
137
137
  color: #FD6701;
138
138
  }
139
139
  .recharge-result {
140
- display: flex;
141
- width: 100vw;
140
+ background-color: #fff;
142
141
  height: 100vh;
142
+ padding-top: 120px;
143
+ box-sizing: border-box;
144
+ }
145
+ .recharge-result .content {
146
+ display: flex;
147
+ width: 100%;
148
+ height: fit-content;
143
149
  flex-direction: column;
144
- justify-content: center;
150
+ justify-content: flex-start;
145
151
  align-items: center;
146
152
  }
147
153
  .recharge-result h2 {
148
154
  font-size: 16px;
149
155
  font-weight: bold;
150
- margin: 1em;
156
+ margin-top: 20px;
151
157
  }
152
158
  .recharge-result .caption {
153
159
  color: #353535;
154
160
  opacity: 0.5;
161
+ margin-top: 8px;
155
162
  }
156
163
  .recharge-result .figure {
157
164
  width: 100px;
158
165
  height: 100px;
159
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIG9wYWNpdHk9IjAuMiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01MC41IDEwQzcyLjg2NzUgMTAgOTEgMjcuOTA4NiA5MSA1MEM5MSA3Mi4wOTE0IDcyLjg2NzUgOTAgNTAuNSA5MEMyOC4xMzI1IDkwIDEwIDcyLjA5MTQgMTAgNTBDMTAgMjcuOTA4NiAyOC4xMzI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UgOTAgNTAuNSA5MEMyOC4xMzI1IDkwIDEwIDcyLjA5MTQgMTAgNTBDMTAgMjcuOTA4NiAyOC4xMzI1IDEwIDUwLjUgMTBaIiBmaWxsPSIjOUFFMkNEIi8+CjxwYXRoIGZpbGwtcnVsZT0iZXZlbm9kZCIgY2xpcC1ydWxlPSJldmVub2RkIiBkPSJNNTAuNSAxOEM2OS4wMDE1IDE4IDg0IDMyLjU1MDggODQgNTAuNUM4NCA2OC40NDkyIDY5LjAwMTUgODMgNTAuNSA4M0MzMS45OTg1IDgzIDE3IDY4LjQ0OTIgMTcgNTAuNUMxNyAzMi41NTA4IDMxLjk5ODUgMTggNTAuNSAxOFoiIGZpbGw9IiNDQUZBRUMiLz4KPHBhdGggZD0iTTM3IDQ5LjVMNDcgNjBMNjcgMzkiIHN0cm9rZT0iIzNEQ0E5RCIgc3Ryb2tlLXdpZHRoPSI2IiBzdHJva2UtbGluZWNhcD0icm91bmQiIHN0cm9rZS1saW5lam9pbj0icm91bmQiLz4KPHBhdGggZD0iTTE5LjEyMDQgMTYuMjkxOUw3Ljk5ODg0IDEyLjczMjFMMTUuOTI5NCA1LjA1ODk3TDE5LjEyMDQgMTYuMjkxOVoiIGZpbGw9IiNDQUZBRUMiLz4KPHBhdGggZD0iTTEyLjgzNCAyMy40NjQyTDguNTQ2MzEgMjcuNTc3OEw3LjEyNzY1IDIxLjgwNzhMMTIuODM0IDIzLjQ2NDJaIiBmaWxsPSIjQ0FGQUVDIi8+Cjwvc3ZnPgo=");
160
167
  }
161
168
  .recharge-result .back-button {
162
- margin-top: 3em;
169
+ margin-top: 40px;
170
+ width: 128px;
163
171
  }
164
172
  page {
165
173
  --text-color: #333;
166
174
  --text-color-dark-mode: #eee;
167
175
  }
168
176
  .number {
169
- font-family: 'DIN alternate';
177
+ font-family: 'DIN alternate', 'Barlow Condensed', 'Roboto Condensed', sans-serif-condensed-light;
170
178
  }
171
179
  .account-card .card {
172
180
  background: #2F2F2F;
@@ -217,8 +225,8 @@ page {
217
225
  }
218
226
  .account-card .card .line {
219
227
  margin: 6px 0px 8px 0px;
220
- height: 1px;
221
- background: #C3C3C3;
228
+ height: 0.5px;
229
+ background: rgb(195, 195, 195);
222
230
  opacity: 0.2;
223
231
  }
224
232
  .account-card .card .card-row-right .pay {
@@ -234,7 +242,7 @@ page {
234
242
  .account-card .card .card-row-right .pay .pay-icon {
235
243
  display: block;
236
244
  font-size: 0;
237
- width: 3px;
245
+ width: 3.5px;
238
246
  height: 6px;
239
247
  margin-left: 6px;
240
248
  }
@@ -698,7 +706,7 @@ page {
698
706
  .consumption-rules-popup {
699
707
  border-radius: 16px;
700
708
  width: 70%;
701
- height: 70%;
709
+ max-height: 80%;
702
710
  padding: 24px;
703
711
  }
704
712
  .balance-reminder-popup {
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { defineComponent, reactive, resolveComponent, openBlock, createBlock, withCtx, createElementBlock, Fragment, renderList, normalizeClass, createElementVNode, toDisplayString, createTextVNode, createStaticVNode, createCommentVNode, renderSlot, createVNode, ref, onMounted, unref, computed, withDirectives, vShow } from 'vue';
2
- import Taro, { useDidShow, usePageScroll } from '@tarojs/taro';
2
+ import Taro, { useDidShow, usePageScroll, usePullDownRefresh } from '@tarojs/taro';
3
3
  import { Grid, GridItem, Button, Checkbox, Popup, OverLay, Icon, DatePicker, Picker } from '@nutui/nutui-taro';
4
4
 
5
5
  const _hoisted_1$b = { class: "token-line number" };
@@ -7,12 +7,7 @@ const _hoisted_2$9 = { class: "number" };
7
7
  var script$b = /* @__PURE__ */ defineComponent({
8
8
  __name: "AmountPicker",
9
9
  props: {
10
- items: { type: Array, required: true, default: () => [
11
- {
12
- token: 1e3,
13
- amount: 100
14
- }
15
- ] },
10
+ items: { type: Array, required: true, default: () => [] },
16
11
  selected: { type: Number, required: false, default: () => 0 }
17
12
  },
18
13
  emits: ["change"],
@@ -362,6 +357,7 @@ const transforms$1 = Object.fromEntries(
362
357
  const globalData = {};
363
358
 
364
359
  const appKitOptions = {
360
+ app: () => "",
365
361
  token: () => "",
366
362
  baseUrl: () => "",
367
363
  401() {
@@ -377,7 +373,8 @@ const useAppKitOptions = () => {
377
373
  const makeHttp$1 = () => {
378
374
  const appkitOptions = useAppKitOptions();
379
375
  const header = {
380
- Token: appkitOptions.token()
376
+ Token: appkitOptions.token(),
377
+ Appcode: appkitOptions.app()
381
378
  };
382
379
  const $http = useHttp({
383
380
  baseUrl: appkitOptions.baseUrl(),
@@ -570,21 +567,22 @@ var script$7 = /* @__PURE__ */ defineComponent({
570
567
  script$7.__file = "src/payment/components/RechargeView.vue";
571
568
 
572
569
  const _hoisted_1$6 = { class: "recharge-result" };
573
- const _hoisted_2$6 = /* @__PURE__ */ createElementVNode(
570
+ const _hoisted_2$6 = { class: "content" };
571
+ const _hoisted_3$6 = /* @__PURE__ */ createElementVNode(
574
572
  "div",
575
573
  { class: "figure" },
576
574
  null,
577
575
  -1
578
576
  /* HOISTED */
579
577
  );
580
- const _hoisted_3$6 = /* @__PURE__ */ createElementVNode(
578
+ const _hoisted_4$5 = /* @__PURE__ */ createElementVNode(
581
579
  "h2",
582
580
  null,
583
581
  "\u5145\u503C\u6210\u529F",
584
582
  -1
585
583
  /* HOISTED */
586
584
  );
587
- const _hoisted_4$5 = /* @__PURE__ */ createElementVNode(
585
+ const _hoisted_5$5 = /* @__PURE__ */ createElementVNode(
588
586
  "div",
589
587
  { class: "caption" },
590
588
  "\u4E91\u8C46\u5C06\u57285\u5206\u949F\u4E4B\u5185\u5230\u8D26",
@@ -602,20 +600,22 @@ var script$6 = /* @__PURE__ */ defineComponent({
602
600
  return (_ctx, _cache) => {
603
601
  const _component_nut_button = resolveComponent("nut-button");
604
602
  return openBlock(), createElementBlock("div", _hoisted_1$6, [
605
- _hoisted_2$6,
606
- _hoisted_3$6,
607
- _hoisted_4$5,
608
- createVNode(_component_nut_button, {
609
- class: "back-button",
610
- type: "default",
611
- onClick: onBackClick
612
- }, {
613
- default: withCtx(() => [
614
- createTextVNode("\u8FD4\u56DE")
615
- ]),
616
- _: 1
617
- /* STABLE */
618
- })
603
+ createElementVNode("div", _hoisted_2$6, [
604
+ _hoisted_3$6,
605
+ _hoisted_4$5,
606
+ _hoisted_5$5,
607
+ createVNode(_component_nut_button, {
608
+ class: "back-button",
609
+ type: "default",
610
+ onClick: onBackClick
611
+ }, {
612
+ default: withCtx(() => [
613
+ createTextVNode("\u8FD4\u56DE")
614
+ ]),
615
+ _: 1
616
+ /* STABLE */
617
+ })
618
+ ])
619
619
  ]);
620
620
  };
621
621
  }
@@ -663,10 +663,7 @@ const endpointsList = {
663
663
  getBalance: {
664
664
  path: "/ac-app/account/info/detail/app",
665
665
  // /app
666
- translate: (data) => ({
667
- // appCode: 'fnfundkit',
668
- // tenantCode: '1665925586953629696',
669
- }),
666
+ translate: (data) => ({}),
670
667
  transform(result) {
671
668
  return {
672
669
  total: result.commonAccount,
@@ -726,7 +723,8 @@ const transforms = Object.fromEntries(
726
723
  const makeHttp = () => {
727
724
  const appkitOptions = useAppKitOptions();
728
725
  const header = {
729
- Token: appkitOptions.token()
726
+ Token: appkitOptions.token(),
727
+ Appcode: appkitOptions.app()
730
728
  };
731
729
  const $http = useHttp({
732
730
  baseUrl: appkitOptions.baseUrl(),
@@ -1429,6 +1427,12 @@ var script$1 = /* @__PURE__ */ defineComponent({
1429
1427
  const { scrollTop } = e;
1430
1428
  scrollY.value = scrollTop;
1431
1429
  });
1430
+ usePullDownRefresh(() => {
1431
+ loadBalance();
1432
+ setTimeout(() => {
1433
+ Taro.stopPullDownRefresh();
1434
+ }, 500);
1435
+ });
1432
1436
  return (_ctx, _cache) => {
1433
1437
  const _component_nut_popup = resolveComponent("nut-popup");
1434
1438
  return openBlock(), createElementBlock(
@@ -1779,6 +1783,7 @@ function useAppKit() {
1779
1783
  const AppKit = {
1780
1784
  install(app, options) {
1781
1785
  const appKitOptions = useAppKitOptions();
1786
+ appKitOptions.app = options.app;
1782
1787
  appKitOptions.token = options.token;
1783
1788
  appKitOptions.baseUrl = options.baseUrl;
1784
1789
  appKitOptions[401] = options[401];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@uxda/appkit",
3
- "version": "1.0.40",
3
+ "version": "1.0.46",
4
4
  "description": "小程序应用开发包",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.ts",
package/src/Appkit.ts CHANGED
@@ -5,6 +5,7 @@ import { globalData } from './global'
5
5
  * options for useAppKit
6
6
  */
7
7
  export type AppKitOptions = {
8
+ app (): string,
8
9
  /**
9
10
  * token 获取方法
10
11
  * 由使用场景提供
@@ -14,6 +15,7 @@ export type AppKitOptions = {
14
15
  * 调用 API 时使用的 base url
15
16
  */
16
17
  baseUrl (): string,
18
+
17
19
  401 (): void
18
20
  }
19
21
 
@@ -27,6 +29,7 @@ export type DollarApp = {
27
29
  * 用来记忆使用场景传递的 options
28
30
  */
29
31
  const appKitOptions: AppKitOptions = {
32
+ app: () => '',
30
33
  token: () => '',
31
34
  baseUrl: () => '',
32
35
  401 () {}
@@ -40,8 +40,6 @@ const endpointsList: HttpEndpoints = {
40
40
  getBalance: {
41
41
  path: '/ac-app/account/info/detail/app', // /app
42
42
  translate: (data: any) => ({
43
- // appCode: 'fnfundkit',
44
- // tenantCode: '1665925586953629696',
45
43
  }),
46
44
  transform (result: any) {
47
45
  return {
@@ -6,7 +6,8 @@ const makeHttp = () => {
6
6
  const appkitOptions = useAppKitOptions()
7
7
 
8
8
  const header = {
9
- Token: appkitOptions.token()
9
+ Token: appkitOptions.token(),
10
+ Appcode: appkitOptions.app(),
10
11
  }
11
12
 
12
13
  const $http = useHttp({
@@ -128,7 +128,7 @@
128
128
  </template>
129
129
 
130
130
  <script lang="ts" setup>
131
- import Taro, { useDidShow, usePageScroll } from '@tarojs/taro'
131
+ import Taro, { useDidShow, usePageScroll, usePullDownRefresh } from '@tarojs/taro'
132
132
  import { computed, reactive, ref } from 'vue'
133
133
  import { endpoints, makeHttp } from '../api'
134
134
  import { ConsumptionFiltering, ConsumptionGroups, Balance } from '../types'
@@ -232,6 +232,14 @@ usePageScroll((e) => {
232
232
  const { scrollTop } = e
233
233
  scrollY.value = scrollTop
234
234
  })
235
+
236
+ usePullDownRefresh(() => {
237
+ // 页面下拉刷新
238
+ loadBalance()
239
+ setTimeout(() => {
240
+ Taro.stopPullDownRefresh()
241
+ }, 500);
242
+ })
235
243
  </script>
236
244
 
237
245
  <style lang="scss">
@@ -478,7 +486,7 @@ usePageScroll((e) => {
478
486
  .consumption-rules-popup {
479
487
  border-radius: 16px;
480
488
  width: 70%;
481
- height: 70%;
489
+ max-height: 80%;
482
490
  padding: 24px;
483
491
  }
484
492
  </style>
@@ -128,8 +128,8 @@ useDidShow(() => {
128
128
  }
129
129
  .line{
130
130
  margin: 6px 0px 8px 0px;
131
- height: 1px;
132
- background: #C3C3C3;
131
+ height: 0.5px;
132
+ background: rgb(195, 195, 195);
133
133
  opacity: 0.2;
134
134
  }
135
135
  .card-row-right{
@@ -145,7 +145,7 @@ useDidShow(() => {
145
145
  .pay-icon{
146
146
  display: block;
147
147
  font-size: 0;
148
- width: 3px;
148
+ width: 3.5px;
149
149
  height: 6px;
150
150
  margin-left: 6px;
151
151
  }
package/src/index.ts CHANGED
@@ -56,6 +56,7 @@ export function useAppKit (): DollarApp {
56
56
  const AppKit = {
57
57
  install (app: App, options: AppKitOptions) {
58
58
  const appKitOptions = useAppKitOptions()
59
+ appKitOptions.app = options.app
59
60
  appKitOptions.token = options.token
60
61
  appKitOptions.baseUrl = options.baseUrl
61
62
  appKitOptions[401] = options[401]
@@ -6,7 +6,8 @@ const makeHttp = () => {
6
6
  const appkitOptions = useAppKitOptions()
7
7
 
8
8
  const header = {
9
- Token: appkitOptions.token()
9
+ Token: appkitOptions.token(),
10
+ Appcode: appkitOptions.app(),
10
11
  }
11
12
 
12
13
  const $http = useHttp({
@@ -38,12 +38,7 @@ const emit = defineEmits<{
38
38
  withDefaults(
39
39
  defineProps<AmountPickerProps>(),
40
40
  {
41
- items: () => [
42
- {
43
- token: 1000,
44
- amount: 100
45
- },
46
- ],
41
+ items: () => [],
47
42
  selected: () => 0
48
43
  }
49
44
  )
@@ -1,9 +1,11 @@
1
1
  <template>
2
2
  <div class="recharge-result">
3
- <div class="figure"></div>
4
- <h2>充值成功</h2>
5
- <div class="caption">云豆将在5分钟之内到账</div>
6
- <nut-button class="back-button" type="default" @click="onBackClick">返回</nut-button>
3
+ <div class="content">
4
+ <div class="figure"></div>
5
+ <h2>充值成功</h2>
6
+ <div class="caption">云豆将在5分钟之内到账</div>
7
+ <nut-button class="back-button" type="default" @click="onBackClick">返回</nut-button>
8
+ </div>
7
9
  </div>
8
10
  </template>
9
11
 
@@ -18,28 +20,36 @@ function onBackClick () {
18
20
 
19
21
  <style lang="scss">
20
22
  .recharge-result {
21
- display: flex;
22
- width: 100vw;
23
+ background-color: #fff;
23
24
  height: 100vh;
24
- flex-direction: column;
25
- justify-content: center;
26
- align-items: center;
25
+ padding-top: 120px;
26
+ box-sizing: border-box;
27
+ .content {
28
+ display: flex;
29
+ width: 100%;
30
+ height: fit-content;
31
+ flex-direction: column;
32
+ justify-content: flex-start;
33
+ align-items: center;
34
+ }
27
35
  h2 {
28
36
  font-size: 16px;
29
37
  font-weight: bold;
30
- margin: 1em;
38
+ margin-top: 20px;
31
39
  }
32
40
  .caption {
33
41
  color: #353535;
34
42
  opacity: 0.5;
43
+ margin-top: 8px;
35
44
  }
36
45
  .figure {
37
46
  width: 100px;
38
47
  height: 100px;
39
- background-image: url("data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAwIiBoZWlnaHQ9IjEwMCIgdmlld0JveD0iMCAwIDEwMCAxMDAiIGZpbGw9Im5vbmUiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+CjxwYXRoIG9wYWNpdHk9IjAuMiIgZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik01MC41IDEwQzc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'
36
36
  // 配置了必须的属性后
37
37
  // 自动获取支付套餐包列表
38
38
  // 并发起微信支付
39
-
40
39
  export interface RechargeViewProps {
41
40
  /**
42
41
  * 应用
@@ -0,0 +1,5 @@
1
+ export {
2
+ BusSymbol,
3
+ createBus,
4
+ useBus,
5
+ } from './bus'
@@ -1,3 +1,3 @@
1
1
  .number {
2
- font-family: 'DIN alternate';
2
+ font-family: 'DIN alternate', 'Barlow Condensed', 'Roboto Condensed', sans-serif-condensed-light;
3
3
  }