@tplc/business 0.2.18 → 0.2.20

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,10 @@
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.20](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.19...v0.2.20) (2024-12-06)
6
+
7
+ ### [0.2.19](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.18...v0.2.19) (2024-12-06)
8
+
5
9
  ### [0.2.18](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.2.14...v0.2.18) (2024-12-06)
6
10
 
7
11
 
@@ -190,7 +190,7 @@ const onChooseAvatar = async (e) => {
190
190
  margin: 0;
191
191
  color: inherit;
192
192
  font-size: inherit;
193
- display: inline-block;
193
+ // display: inline-block;
194
194
  line-height: normal;
195
195
  border-radius: inherit;
196
196
  overflow: inherit;
@@ -1,13 +1,24 @@
1
1
  <template>
2
2
  <view
3
3
  :class="{
4
- center_mod: !left,
5
- 'pl-7': back && !left,
6
- 'pr-90px': hasCapsule,
4
+ '!flex-1': !left,
5
+ '!pl-7': back && !left,
6
+ '!pr-90px': hasCapsule,
7
+ 'search-view': true,
7
8
  }"
8
9
  >
10
+ <lcb-action-view v-bind="link" v-if="link">
11
+ <wd-search
12
+ custom-class="search-input"
13
+ :placeholder="searchText"
14
+ placeholder-left
15
+ hide-cancel
16
+ :disabled="Boolean(link)"
17
+ />
18
+ </lcb-action-view>
9
19
  <wd-search
10
- class="search-input !px-0"
20
+ v-else
21
+ custom-class="search-input"
11
22
  :placeholder="searchText"
12
23
  placeholder-left
13
24
  hide-cancel
@@ -19,8 +30,8 @@
19
30
 
20
31
  <script setup lang="ts">
21
32
  import { FORM_KEY } from '../../../constants'
22
- import { inject, Ref } from 'vue'
23
-
33
+ import { inject, PropType, Ref } from 'vue'
34
+ import { LcbActionViewProps } from '../../lcb-action-view/types'
24
35
  const hasCapsule = Boolean(uni.getMenuButtonBoundingClientRect)
25
36
  defineOptions({
26
37
  name: 'LcbNavSearch',
@@ -31,6 +42,9 @@ defineOptions({
31
42
  },
32
43
  })
33
44
  defineProps({
45
+ link: {
46
+ type: Object as PropType<LcbActionViewProps>,
47
+ },
34
48
  searchText: {
35
49
  type: String,
36
50
  default: '搜索',
@@ -54,17 +68,17 @@ const onSearch = ({ value }: { value: string }) => {
54
68
  .center_mod {
55
69
  flex: 1 1;
56
70
  }
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;
71
+ .search-view {
72
+ :deep(.search-input) {
73
+ width: 100%;
74
+ height: 64rpx;
75
+ box-sizing: border-box;
76
+ font-size: 26rpx;
77
+ font-weight: 400;
78
+ padding: 0rpx;
79
+ color: #a1a1a1;
80
+ background: #f5f5f5;
81
+ border-radius: 32rpx;
82
+ }
69
83
  }
70
84
  </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.20",
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
  }