@tplc/business 0.2.18 → 0.2.19

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,8 @@
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.2.19](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.18...v0.2.19) (2024-12-06)
6
+
5
7
  ### [0.2.18](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.14...v0.2.18) (2024-12-06)
6
8
 
7
9
 
@@ -1,26 +1,29 @@
1
1
  <template>
2
- <view
3
- :class="{
2
+ <lcb-action-view
3
+ :custom-class="{
4
4
  center_mod: !left,
5
5
  'pl-7': back && !left,
6
6
  'pr-90px': hasCapsule,
7
+ 'search-view': true,
7
8
  }"
9
+ v-bind="link"
8
10
  >
9
11
  <wd-search
10
- class="search-input !px-0"
12
+ custom-class="search-input"
11
13
  :placeholder="searchText"
12
14
  placeholder-left
13
15
  hide-cancel
16
+ :disabled="Boolean(link)"
14
17
  @search="onSearch"
15
18
  @clear="onSearch"
16
19
  />
17
- </view>
20
+ </lcb-action-view>
18
21
  </template>
19
22
 
20
23
  <script setup lang="ts">
21
24
  import { FORM_KEY } from '../../../constants'
22
- import { inject, Ref } from 'vue'
23
-
25
+ import { inject, PropType, Ref } from 'vue'
26
+ import { LcbActionViewProps } from '../../lcb-action-view/types'
24
27
  const hasCapsule = Boolean(uni.getMenuButtonBoundingClientRect)
25
28
  defineOptions({
26
29
  name: 'LcbNavSearch',
@@ -31,6 +34,9 @@ defineOptions({
31
34
  },
32
35
  })
33
36
  defineProps({
37
+ link: {
38
+ type: Object as PropType<LcbActionViewProps>,
39
+ },
34
40
  searchText: {
35
41
  type: String,
36
42
  default: '搜索',
@@ -54,17 +60,17 @@ const onSearch = ({ value }: { value: string }) => {
54
60
  .center_mod {
55
61
  flex: 1 1;
56
62
  }
57
- .search-input {
58
- display: flex;
59
- align-items: center;
60
- justify-content: center;
61
- width: 100%;
62
- height: 64rpx;
63
- box-sizing: border-box;
64
- font-size: 26rpx;
65
- font-weight: 400;
66
- color: #a1a1a1;
67
- background: #f5f5f5;
68
- border-radius: 32rpx;
63
+ .search-view {
64
+ :deep(.search-input) {
65
+ width: 100%;
66
+ height: 64rpx;
67
+ box-sizing: border-box;
68
+ font-size: 26rpx;
69
+ font-weight: 400;
70
+ padding: 0rpx;
71
+ color: #a1a1a1;
72
+ background: #f5f5f5;
73
+ border-radius: 32rpx;
74
+ }
69
75
  }
70
76
  </style>
@@ -69,7 +69,11 @@
69
69
  </view>
70
70
  <!-- 中间布局 -->
71
71
  <view class="navbar-center">
72
- <Search v-if="styleGroup === 2 && titleLocation === 'center'" :back="canBack" />
72
+ <Search
73
+ v-if="styleGroup === 2 && titleLocation === 'center'"
74
+ :back="canBack"
75
+ :link="searchLink"
76
+ />
73
77
  <Title v-bind="titleProps" v-else-if="styleGroup === 2 || titleLocation === 'center'" />
74
78
  </view>
75
79
  </view>
@@ -1,3 +1,5 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
2
+
1
3
  export interface ICapsule {
2
4
  icon: string
3
5
  action: 'translate' | 'scanCode' | 'search' | 'home' | 'setting' | 'back'
@@ -41,4 +43,5 @@ export interface NavProps extends NavTitleProps {
41
43
  capsuleMode?: 'light' | 'dark'
42
44
  /** 胶囊列表 */
43
45
  capsules?: ICapsule[]
46
+ searchLink?: LcbActionViewProps
44
47
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tplc/business",
3
- "version": "0.2.18",
3
+ "version": "0.2.19",
4
4
  "keywords": [
5
5
  "业务组件"
6
6
  ],
@@ -1,5 +1,10 @@
1
+ import { PropType } from 'vue'
2
+ import { LcbActionViewProps } from '../../lcb-action-view/types'
1
3
  declare const _default: import('vue').DefineComponent<
2
4
  {
5
+ link: {
6
+ type: PropType<LcbActionViewProps>
7
+ }
3
8
  searchText: {
4
9
  type: StringConstructor
5
10
  default: string
@@ -22,6 +27,9 @@ declare const _default: import('vue').DefineComponent<
22
27
  import('vue').PublicProps,
23
28
  Readonly<
24
29
  import('vue').ExtractPropTypes<{
30
+ link: {
31
+ type: PropType<LcbActionViewProps>
32
+ }
25
33
  searchText: {
26
34
  type: StringConstructor
27
35
  default: string
@@ -1,3 +1,4 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
1
2
  export interface ICapsule {
2
3
  icon: string
3
4
  action: 'translate' | 'scanCode' | 'search' | 'home' | 'setting' | 'back'
@@ -38,4 +39,5 @@ export interface NavProps extends NavTitleProps {
38
39
  capsuleMode?: 'light' | 'dark'
39
40
  /** 胶囊列表 */
40
41
  capsules?: ICapsule[]
42
+ searchLink?: LcbActionViewProps
41
43
  }