@tplc/business 0.3.87 → 0.3.88

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/CHANGELOG.md CHANGED
@@ -2,6 +2,13 @@
2
2
 
3
3
  All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
4
4
 
5
+ ### [0.3.88](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.87...v0.3.88) (2025-03-19)
6
+
7
+
8
+ ### ✨ Features | 新功能
9
+
10
+ * 修改ui ([68a2962](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/68a296215291241f71d8c52425e150685ccff6f7))
11
+
5
12
  ### [0.3.87](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.70...v0.3.87) (2025-03-19)
6
13
 
7
14
  ### [0.3.86](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.3.80...v0.3.86) (2025-03-18)
@@ -20,7 +20,7 @@ import type { ButtonProps } from '@tplc/wot/components/wd-button/types'
20
20
  import type { IPageBtn, LcbOperationActionsProps } from './types'
21
21
  import { useMessage } from '@tplc/wot'
22
22
  import OrderDetLogistic from './components/OrderDetLogistic/index.vue'
23
- import { reactive } from 'vue'
23
+ import { reactive, ref } from 'vue'
24
24
  const message = useMessage()
25
25
  const logistic = reactive({
26
26
  show: false,
@@ -46,20 +46,43 @@ const getBtnProps = (item: IPageBtn) => {
46
46
  ...item.buttonProps,
47
47
  } as ButtonProps
48
48
  }
49
+ const formValue = ref('')
49
50
  async function link({ item }: { item: IPageBtn }) {
50
51
  if (item.popUpFlag) {
51
- message
52
- .confirm({
53
- msg: item.popUpTip,
54
- title: item.content,
55
- })
56
- .then(async () => {
57
- if (item.buttonType === 1) {
58
- await uni.$lcb.http.post(item.requestUrl, item.requestParam)
52
+ if (item.buttonKey.includes('form')) {
53
+ formValue.value = item.popUpRequestInfo.defaultValue || ''
54
+ message
55
+ .prompt({
56
+ ...item.popUpRequestInfo,
57
+ title: item.popUpTitle,
58
+ inputValue: formValue.value,
59
+ inputError: '内容不能为空',
60
+ inputValidate: (value) => Boolean(value),
61
+ })
62
+ .then(async () => {
63
+ await uni.$lcb.http.post(item.requestUrl, {
64
+ ...item.requestParam,
65
+ [item.popUpRequestInfo.inputKey]: formValue.value,
66
+ })
59
67
  emits('refresh')
60
- }
61
- })
62
- .catch(console.log)
68
+ })
69
+ .catch((error) => {
70
+ console.log(error)
71
+ })
72
+ } else {
73
+ message
74
+ .confirm({
75
+ msg: item.popUpTip,
76
+ title: item.content,
77
+ })
78
+ .then(async () => {
79
+ if (item.buttonType === 1) {
80
+ await uni.$lcb.http.post(item.requestUrl, item.requestParam)
81
+ emits('refresh')
82
+ }
83
+ })
84
+ .catch(console.log)
85
+ }
63
86
  } else if (item.jumpType === 2) {
64
87
  uni.navigateTo({
65
88
  url: item.jumpUrl,
@@ -7,7 +7,7 @@
7
7
  placement="top-start"
8
8
  use-content-slot
9
9
  :visible-arrow="false"
10
- ref="popverRef"
10
+ ref="popoverRef"
11
11
  v-if="item.iconType === 2"
12
12
  >
13
13
  <IconActionView v-bind="item" popover />
@@ -30,7 +30,7 @@
30
30
  v-else
31
31
  @refresh="$emit('refresh')"
32
32
  @cancel="$emit('cancel')"
33
- ref="popverRef"
33
+ ref="popoverRef"
34
34
  />
35
35
  </block>
36
36
  <view class="flex-1" v-if="!noIcons"></view>
@@ -61,7 +61,7 @@ defineOptions({
61
61
  })
62
62
  defineProps<LcbOperationActionsProps>()
63
63
  const emits = defineEmits(['refresh', 'cancel'])
64
- const popverRef = ref()
64
+ const popoverRef = ref()
65
65
  const message = useMessage()
66
66
  const getMenu = (list: IPageBtn[]) => {
67
67
  return list.map((item) => {
@@ -72,7 +72,7 @@ const getMenu = (list: IPageBtn[]) => {
72
72
  })
73
73
  }
74
74
  function link({ item }: { item: IPageBtn }, index: number) {
75
- popverRef.value?.[index]?.close()
75
+ popoverRef.value?.[index]?.close()
76
76
  if (item.popUpFlag) {
77
77
  message
78
78
  .confirm({
@@ -18,6 +18,12 @@ export interface IPageBtn {
18
18
  popUpFlag: boolean
19
19
  popUpTip: string
20
20
  content: string
21
+ popUpTitle: string
22
+ popUpRequestInfo: {
23
+ defaultValue?: string
24
+ inputKey: string
25
+ inputType: string
26
+ }
21
27
  requestParam?: {
22
28
  orderNo: string
23
29
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.3.87",
3
+ "version": "0.3.88",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -16,6 +16,12 @@ export interface IPageBtn {
16
16
  popUpFlag: boolean
17
17
  popUpTip: string
18
18
  content: string
19
+ popUpTitle: string
20
+ popUpRequestInfo: {
21
+ defaultValue?: string
22
+ inputKey: string
23
+ inputType: string
24
+ }
19
25
  requestParam?: {
20
26
  orderNo: string
21
27
  }