@tplc/business 0.0.26 → 0.0.28

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.
Files changed (111) hide show
  1. package/CHANGELOG.md +56 -0
  2. package/components/lcb-area-picker/api/index.ts +45 -0
  3. package/components/lcb-area-picker/lcb-area-picker.vue +77 -0
  4. package/components/lcb-area-picker/types.ts +3 -0
  5. package/components/lcb-banner-block/lcb-banner-block.vue +2 -2
  6. package/components/lcb-calendar/api/index.ts +17 -0
  7. package/components/lcb-calendar/lcb-calendar.vue +116 -0
  8. package/components/lcb-calendar-search/lcb-calendar-search.vue +72 -0
  9. package/components/lcb-calendar-search/types.ts +6 -0
  10. package/components/lcb-city-select/api/index.ts +34 -0
  11. package/components/lcb-city-select/components/lcb-city-letter/index.vue +171 -0
  12. package/components/lcb-city-select/components/lcb-city-list/index.vue +127 -0
  13. package/components/lcb-city-select/components/lcb-city-list/types.ts +6 -0
  14. package/components/lcb-city-select/images/hot.png +0 -0
  15. package/components/lcb-city-select/lcb-city-select.vue +145 -0
  16. package/components/lcb-city-select/types.ts +7 -0
  17. package/components/lcb-dynamic-data/lcb-dynamic-data.vue +25 -0
  18. package/components/lcb-dynamic-data/types.ts +7 -0
  19. package/components/lcb-home-search/lcb-home-search.vue +52 -18
  20. package/components/lcb-image/Image/index.vue +41 -20
  21. package/components/lcb-img-nav/lcb-img-nav.vue +70 -30
  22. package/components/lcb-img-nav/types.ts +3 -3
  23. package/components/{lcb-filter → lcb-list}/api.ts +7 -2
  24. package/components/{lcb-filter → lcb-list}/components/ComponentGroup/index.vue +31 -0
  25. package/components/lcb-list/components/FilterList/index.vue +78 -0
  26. package/components/lcb-list/components/FilterList/type.ts +9 -0
  27. package/components/{lcb-filter → lcb-list}/components/FilterSlider/index.vue +2 -1
  28. package/components/{lcb-filter → lcb-list}/components/TreeSelect/index.vue +3 -2
  29. package/components/{lcb-filter → lcb-list}/index.scss +3 -0
  30. package/components/lcb-list/lcb-list.vue +163 -0
  31. package/components/{lcb-filter → lcb-list}/types.ts +5 -1
  32. package/components/lcb-nav/lcb-nav.vue +8 -13
  33. package/components/lcb-notice/Item/index.vue +1 -1
  34. package/components/lcb-product/lcb-product.vue +47 -0
  35. package/components/lcb-product/types.ts +14 -0
  36. package/components/lcb-product-item/lcb-product-item.vue +97 -0
  37. package/components/lcb-product-item/types.ts +14 -0
  38. package/components/lcb-tags/Tag/index.vue +27 -0
  39. package/components/lcb-tags/lcb-tags.vue +49 -0
  40. package/components/lcb-tags/types.ts +30 -0
  41. package/components/lcb-title/lcb-title.vue +14 -8
  42. package/components/lcb-title/types.ts +5 -0
  43. package/components/lcb-user-order/lcb-user-order.vue +44 -23
  44. package/components/lcb-user-top/lcb-user-top.vue +77 -48
  45. package/constants.ts +1 -0
  46. package/global.d.ts +9 -1
  47. package/hooks/useLocation.api.ts +7 -0
  48. package/hooks/useLocation.ts +78 -0
  49. package/iconfonts/index.css +1 -175
  50. package/package.json +5 -2
  51. package/types/components/lcb-area-picker/api/index.d.ts +38 -0
  52. package/types/components/lcb-area-picker/lcb-area-picker.vue.d.ts +67 -0
  53. package/types/components/lcb-area-picker/types.d.ts +1 -0
  54. package/types/components/lcb-calendar/api/index.d.ts +16 -0
  55. package/types/components/lcb-calendar/lcb-calendar.vue.d.ts +137 -0
  56. package/types/components/lcb-calendar-search/lcb-calendar-search.vue.d.ts +62 -0
  57. package/types/components/lcb-calendar-search/types.d.ts +4 -0
  58. package/types/components/lcb-city-select/api/index.d.ts +32 -0
  59. package/types/components/lcb-city-select/components/lcb-city-letter/index.vue.d.ts +53 -0
  60. package/types/components/lcb-city-select/components/lcb-city-list/index.vue.d.ts +48 -0
  61. package/types/components/lcb-city-select/components/lcb-city-list/types.d.ts +5 -0
  62. package/types/components/lcb-city-select/lcb-city-select.vue.d.ts +77 -0
  63. package/types/components/lcb-city-select/types.d.ts +5 -0
  64. package/types/components/lcb-dynamic-data/lcb-dynamic-data.vue.d.ts +44 -0
  65. package/types/components/lcb-dynamic-data/types.d.ts +7 -0
  66. package/types/components/lcb-home-search/lcb-home-search.vue.d.ts +1 -1
  67. package/types/components/lcb-image/lcb-image.vue.d.ts +1 -1
  68. package/types/components/lcb-img-nav/lcb-img-nav.vue.d.ts +1 -1
  69. package/types/components/lcb-img-nav/types.d.ts +2 -2
  70. package/types/components/{lcb-filter → lcb-list}/api.d.ts +5 -0
  71. package/types/components/lcb-list/components/FilterList/index.vue.d.ts +28 -0
  72. package/types/components/lcb-list/components/FilterList/type.d.ts +9 -0
  73. package/types/components/lcb-list/lcb-list.vue.d.ts +71 -0
  74. package/types/components/{lcb-filter → lcb-list}/types.d.ts +4 -1
  75. package/types/components/lcb-product/lcb-product.vue.d.ts +42 -0
  76. package/types/components/lcb-product/types.d.ts +13 -0
  77. package/types/components/lcb-product-item/lcb-product-item.vue.d.ts +62 -0
  78. package/types/components/lcb-product-item/types.d.ts +13 -0
  79. package/types/components/lcb-tags/Tag/index.vue.d.ts +44 -0
  80. package/types/components/{lcb-filter/lcb-filter.vue.d.ts → lcb-tags/lcb-tags.vue.d.ts} +9 -7
  81. package/types/components/lcb-tags/types.d.ts +13 -0
  82. package/types/components/lcb-title/types.d.ts +5 -0
  83. package/types/constants.d.ts +1 -0
  84. package/types/hooks/useLocation.api.d.ts +9 -0
  85. package/types/hooks/useLocation.d.ts +7 -0
  86. package/types/utils/utils.d.ts +1 -0
  87. package/utils/utils.ts +12 -0
  88. package/components/lcb-filter/lcb-filter.vue +0 -129
  89. package/components/{lcb-filter → lcb-list}/components/ActionView/index.vue +0 -0
  90. package/components/{lcb-filter → lcb-list}/components/ComponentGroup/type.ts +0 -0
  91. package/components/{lcb-filter → lcb-list}/components/FilterSelect/index.vue +0 -0
  92. package/components/{lcb-filter → lcb-list}/components/FilterSelect/type.ts +0 -0
  93. package/components/{lcb-filter → lcb-list}/components/FilterSlider/types.ts +0 -0
  94. package/components/{lcb-filter → lcb-list}/components/SelectTagView/index.vue +0 -0
  95. package/components/{lcb-filter → lcb-list}/components/TagSelect/index.vue +0 -0
  96. package/components/{lcb-filter → lcb-list}/components/TagSelect/type.ts +0 -0
  97. package/components/{lcb-filter → lcb-list}/components/TreeSelect/type.ts +0 -0
  98. package/components/{lcb-filter → lcb-list}/hooks/useSelect.ts +0 -0
  99. package/types/components/{lcb-filter → lcb-list}/components/ActionView/index.vue.d.ts +1 -1
  100. /package/types/components/{lcb-filter → lcb-list}/components/ComponentGroup/index.vue.d.ts +0 -0
  101. /package/types/components/{lcb-filter → lcb-list}/components/ComponentGroup/type.d.ts +0 -0
  102. /package/types/components/{lcb-filter → lcb-list}/components/FilterSelect/index.vue.d.ts +0 -0
  103. /package/types/components/{lcb-filter → lcb-list}/components/FilterSelect/type.d.ts +0 -0
  104. /package/types/components/{lcb-filter → lcb-list}/components/FilterSlider/index.vue.d.ts +0 -0
  105. /package/types/components/{lcb-filter → lcb-list}/components/FilterSlider/types.d.ts +0 -0
  106. /package/types/components/{lcb-filter → lcb-list}/components/SelectTagView/index.vue.d.ts +0 -0
  107. /package/types/components/{lcb-filter → lcb-list}/components/TagSelect/index.vue.d.ts +0 -0
  108. /package/types/components/{lcb-filter → lcb-list}/components/TagSelect/type.d.ts +0 -0
  109. /package/types/components/{lcb-filter → lcb-list}/components/TreeSelect/index.vue.d.ts +0 -0
  110. /package/types/components/{lcb-filter → lcb-list}/components/TreeSelect/type.d.ts +0 -0
  111. /package/types/components/{lcb-filter → lcb-list}/hooks/useSelect.d.ts +0 -0
@@ -0,0 +1,71 @@
1
+ import { LcbListProps } from './types'
2
+ import './index.scss'
3
+ declare const _default: import('vue').DefineComponent<
4
+ __VLS_WithDefaults<
5
+ __VLS_TypePropsToOption<LcbListProps>,
6
+ {
7
+ pageFilterType: string
8
+ border: boolean
9
+ pageListProps: () => {
10
+ productProps: {
11
+ styleGroup: number
12
+ }
13
+ }
14
+ }
15
+ >,
16
+ {},
17
+ unknown,
18
+ {},
19
+ {},
20
+ import('vue').ComponentOptionsMixin,
21
+ import('vue').ComponentOptionsMixin,
22
+ {},
23
+ string,
24
+ import('vue').PublicProps,
25
+ Readonly<
26
+ import('vue').ExtractPropTypes<
27
+ __VLS_WithDefaults<
28
+ __VLS_TypePropsToOption<LcbListProps>,
29
+ {
30
+ pageFilterType: string
31
+ border: boolean
32
+ pageListProps: () => {
33
+ productProps: {
34
+ styleGroup: number
35
+ }
36
+ }
37
+ }
38
+ >
39
+ >
40
+ >,
41
+ {
42
+ border: boolean
43
+ pageFilterType: string
44
+ pageListProps: import('./components/FilterList/type').PageListProps
45
+ },
46
+ {}
47
+ >
48
+ export default _default
49
+ type __VLS_WithDefaults<P, D> = {
50
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
51
+ ? __VLS_Prettify<
52
+ P[K] & {
53
+ default: D[K]
54
+ }
55
+ >
56
+ : P[K]
57
+ }
58
+ type __VLS_Prettify<T> = {
59
+ [K in keyof T]: T[K]
60
+ } & {}
61
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
62
+ type __VLS_TypePropsToOption<T> = {
63
+ [K in keyof T]-?: {} extends Pick<T, K>
64
+ ? {
65
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
66
+ }
67
+ : {
68
+ type: import('vue').PropType<T[K]>
69
+ required: true
70
+ }
71
+ }
@@ -1,5 +1,8 @@
1
- export interface LcbFilterProps {
1
+ import { PageListProps } from './components/FilterList/type'
2
+ export interface LcbListProps {
2
3
  pageFilterType?: string
4
+ pageListProps?: PageListProps
5
+ border?: boolean
3
6
  }
4
7
  export interface Option {
5
8
  label: string
@@ -0,0 +1,42 @@
1
+ import { LcbProductProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<__VLS_TypePropsToOption<LcbProductProps>, {}>,
4
+ {},
5
+ unknown,
6
+ {},
7
+ {},
8
+ import('vue').ComponentOptionsMixin,
9
+ import('vue').ComponentOptionsMixin,
10
+ {},
11
+ string,
12
+ import('vue').PublicProps,
13
+ Readonly<
14
+ import('vue').ExtractPropTypes<__VLS_WithDefaults<__VLS_TypePropsToOption<LcbProductProps>, {}>>
15
+ >,
16
+ {},
17
+ {}
18
+ >
19
+ export default _default
20
+ type __VLS_WithDefaults<P, D> = {
21
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
22
+ ? __VLS_Prettify<
23
+ P[K] & {
24
+ default: D[K]
25
+ }
26
+ >
27
+ : P[K]
28
+ }
29
+ type __VLS_Prettify<T> = {
30
+ [K in keyof T]: T[K]
31
+ } & {}
32
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
33
+ type __VLS_TypePropsToOption<T> = {
34
+ [K in keyof T]-?: {} extends Pick<T, K>
35
+ ? {
36
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
37
+ }
38
+ : {
39
+ type: import('vue').PropType<T[K]>
40
+ required: true
41
+ }
42
+ }
@@ -0,0 +1,13 @@
1
+ export interface LcbProductProps {
2
+ styleGroup?: 1 | 2 | 3 | 4
3
+ items?: Record<string, any>
4
+ marginHorizontal?: number
5
+ productStyle?: 'image' | 'flat' | 'card' | 'border'
6
+ productTitle?: 0 | 1 | 2
7
+ showTags?: boolean
8
+ showPrice?: boolean
9
+ showScribePrice?: boolean
10
+ showCart?: boolean
11
+ showLocation?: boolean
12
+ showCollection?: boolean
13
+ }
@@ -0,0 +1,62 @@
1
+ import { LcbProductItemProps } from './types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<
4
+ __VLS_TypePropsToOption<LcbProductItemProps>,
5
+ {
6
+ idx: number
7
+ picWidth: number
8
+ picHeight: number
9
+ }
10
+ >,
11
+ {},
12
+ unknown,
13
+ {},
14
+ {},
15
+ import('vue').ComponentOptionsMixin,
16
+ import('vue').ComponentOptionsMixin,
17
+ {},
18
+ string,
19
+ import('vue').PublicProps,
20
+ Readonly<
21
+ import('vue').ExtractPropTypes<
22
+ __VLS_WithDefaults<
23
+ __VLS_TypePropsToOption<LcbProductItemProps>,
24
+ {
25
+ idx: number
26
+ picWidth: number
27
+ picHeight: number
28
+ }
29
+ >
30
+ >
31
+ >,
32
+ {
33
+ idx: number
34
+ picWidth: number
35
+ picHeight: number
36
+ },
37
+ {}
38
+ >
39
+ export default _default
40
+ type __VLS_WithDefaults<P, D> = {
41
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
42
+ ? __VLS_Prettify<
43
+ P[K] & {
44
+ default: D[K]
45
+ }
46
+ >
47
+ : P[K]
48
+ }
49
+ type __VLS_Prettify<T> = {
50
+ [K in keyof T]: T[K]
51
+ } & {}
52
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
53
+ type __VLS_TypePropsToOption<T> = {
54
+ [K in keyof T]-?: {} extends Pick<T, K>
55
+ ? {
56
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
57
+ }
58
+ : {
59
+ type: import('vue').PropType<T[K]>
60
+ required: true
61
+ }
62
+ }
@@ -0,0 +1,13 @@
1
+ export interface LcbProductItemProps {
2
+ coverImg?: string
3
+ picWidth?: number
4
+ picHeight?: number
5
+ productName?: string
6
+ tags?: string | Record<string, any>
7
+ subTitle?: string
8
+ price?: string | number
9
+ priceColor?: string
10
+ scribePrice?: string | number
11
+ styleProps?: Record<string, any>
12
+ idx?: number
13
+ }
@@ -0,0 +1,44 @@
1
+ import type { LcbTagsItemProps } from '../types'
2
+ declare const _default: import('vue').DefineComponent<
3
+ __VLS_WithDefaults<__VLS_TypePropsToOption<LcbTagsItemProps>, {}>,
4
+ {},
5
+ unknown,
6
+ {},
7
+ {},
8
+ import('vue').ComponentOptionsMixin,
9
+ import('vue').ComponentOptionsMixin,
10
+ {},
11
+ string,
12
+ import('vue').PublicProps,
13
+ Readonly<
14
+ import('vue').ExtractPropTypes<
15
+ __VLS_WithDefaults<__VLS_TypePropsToOption<LcbTagsItemProps>, {}>
16
+ >
17
+ >,
18
+ {},
19
+ {}
20
+ >
21
+ export default _default
22
+ type __VLS_WithDefaults<P, D> = {
23
+ [K in keyof Pick<P, keyof P>]: K extends keyof D
24
+ ? __VLS_Prettify<
25
+ P[K] & {
26
+ default: D[K]
27
+ }
28
+ >
29
+ : P[K]
30
+ }
31
+ type __VLS_Prettify<T> = {
32
+ [K in keyof T]: T[K]
33
+ } & {}
34
+ type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
35
+ type __VLS_TypePropsToOption<T> = {
36
+ [K in keyof T]-?: {} extends Pick<T, K>
37
+ ? {
38
+ type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
39
+ }
40
+ : {
41
+ type: import('vue').PropType<T[K]>
42
+ required: true
43
+ }
44
+ }
@@ -1,10 +1,10 @@
1
- import { LcbFilterProps } from './types'
2
- import './index.scss'
1
+ import { LcbTagsProps } from './types'
3
2
  declare const _default: import('vue').DefineComponent<
4
3
  __VLS_WithDefaults<
5
- __VLS_TypePropsToOption<LcbFilterProps>,
4
+ __VLS_TypePropsToOption<LcbTagsProps>,
6
5
  {
7
- pageFilterType: string
6
+ fontSize: number
7
+ tagColor: string
8
8
  }
9
9
  >,
10
10
  {},
@@ -19,15 +19,17 @@ declare const _default: import('vue').DefineComponent<
19
19
  Readonly<
20
20
  import('vue').ExtractPropTypes<
21
21
  __VLS_WithDefaults<
22
- __VLS_TypePropsToOption<LcbFilterProps>,
22
+ __VLS_TypePropsToOption<LcbTagsProps>,
23
23
  {
24
- pageFilterType: string
24
+ fontSize: number
25
+ tagColor: string
25
26
  }
26
27
  >
27
28
  >
28
29
  >,
29
30
  {
30
- pageFilterType: string
31
+ fontSize: number
32
+ tagColor: string
31
33
  },
32
34
  {}
33
35
  >
@@ -0,0 +1,13 @@
1
+ export interface LcbTagsProps {
2
+ items?: any
3
+ mode?: 1 | 2
4
+ tagRadius?: number
5
+ fontSize?: number
6
+ tagColor?: string
7
+ }
8
+ export interface LcbTagsItemProps {
9
+ items: object[]
10
+ tagRadius?: number
11
+ fontSize?: number
12
+ tagColor?: string
13
+ }
@@ -1,5 +1,10 @@
1
+ import { LcbActionViewProps } from '../lcb-action-view/types'
1
2
  import { LcbBlockProps } from '../lcb-block/types'
2
3
  export interface LcbTitleProps extends LcbBlockProps {
3
4
  title: string
5
+ /** 副标题 */
6
+ hint?: string
4
7
  fontWeight?: number
8
+ showMore?: boolean
9
+ action?: LcbActionViewProps
5
10
  }
@@ -0,0 +1 @@
1
+ export declare const FORM_KEY = 'form'
@@ -0,0 +1,9 @@
1
+ export interface UserLocation {
2
+ addressInfo: string
3
+ cityId: string
4
+ cityName: string
5
+ }
6
+ export declare const getUserLocation: (data: {
7
+ userLongitude: string
8
+ userLatitude: string
9
+ }) => Promise<import('../action').IResData<UserLocation>>
@@ -0,0 +1,7 @@
1
+ import { UserLocation } from './useLocation.api'
2
+ declare const useLocation: () => {
3
+ getLocation: () => Promise<void>
4
+ locationIng: import('vue').Ref<boolean>
5
+ userLocation: import('vue').Ref<UserLocation | undefined>
6
+ }
7
+ export default useLocation
@@ -0,0 +1 @@
1
+ export declare function formatJson(str: string | object | undefined, defVal?: {}): {}
package/utils/utils.ts ADDED
@@ -0,0 +1,12 @@
1
+ export function formatJson(str: string | object | undefined, defVal = {}) {
2
+ if (!str) return defVal;
3
+ if (typeof str == 'object') return str;
4
+ let json = defVal;
5
+ try {
6
+ json = JSON.parse(str);
7
+ // console.log('formatJson :', json)
8
+ } catch (e) {
9
+ json = defVal;
10
+ };
11
+ return json;
12
+ }
@@ -1,129 +0,0 @@
1
- <template>
2
- <view v-if="info">
3
- <wd-drop-menu>
4
- <wd-drop-menu-item
5
- v-for="(item, index) in info?.filterComponent"
6
- :key="item.valueName"
7
- :title="titleObj[item.valueName] || item.fitlerName"
8
- icon="caret-down-small"
9
- icon-size="26px"
10
- :selected="getSelect(item)"
11
- ref="dropMenu"
12
- @opened="handleOpened"
13
- >
14
- <view class="lcb-filter__popup">
15
- <FilterSelect
16
- v-if="item.component === 'select'"
17
- v-bind="item.componentProps"
18
- v-model="filter[item.valueName]"
19
- v-model:title="titleObj[item.valueName]"
20
- @submit="onSubmit(index)"
21
- />
22
- <TreeSelect
23
- v-else-if="item.component === 'treeSelect'"
24
- v-bind="item.componentProps"
25
- v-model="filter[item.valueName]"
26
- v-model:title="titleObj[item.valueName]"
27
- @submit="onSubmit(index)"
28
- />
29
- <ComponentGroup
30
- v-else-if="item.component === 'componentGroup'"
31
- v-bind="item.componentProps"
32
- :filter="filter"
33
- @submit="onSubmit(index, $event)"
34
- />
35
- </view>
36
- </wd-drop-menu-item>
37
- </wd-drop-menu>
38
- <view
39
- v-if="info?.filterTags || info.btnComponent"
40
- class="bg-white px-3 pb-2 box-border flex items-center"
41
- >
42
- <view class="flex gap-3.5 flex-1">
43
- <TagSelect
44
- v-if="info.filterTags"
45
- size="small"
46
- v-bind="info.filterTags.componentProps"
47
- v-model="filter[info.filterTags.valueName]"
48
- />
49
- </view>
50
- <wd-button v-if="info.btnComponent" custom-class="!h-60rpx opacity-primary">
51
- {{ info.btnComponent?.postRequest }}
52
- </wd-button>
53
- </view>
54
- </view>
55
- </template>
56
-
57
- <script setup lang="ts">
58
- import { ref, watch } from 'vue'
59
- import { LcbFilterProps } from './types'
60
- import { FilterComponent, getFilterDetail, LcbFilterResult } from './api'
61
- import FilterSelect from './components/FilterSelect/index.vue'
62
- import TreeSelect from './components/TreeSelect/index.vue'
63
- import ComponentGroup from './components/ComponentGroup/index.vue'
64
- import TagSelect from './components/TagSelect/index.vue'
65
- import './index.scss'
66
- defineOptions({
67
- name: 'LcbFilter',
68
- options: {
69
- addGlobalClass: true,
70
- virtualHost: true,
71
- styleIsolation: 'shared',
72
- },
73
- })
74
- const dropMenu = ref()
75
- const props = withDefaults(defineProps<LcbFilterProps>(), {
76
- pageFilterType: 'hotelTravelFilter',
77
- })
78
- const info = ref<LcbFilterResult>()
79
- const filter = ref<Record<string, any>>({})
80
- const titleObj = ref<Record<string, any>>({})
81
- watch(
82
- () => props.pageFilterType,
83
- async (val) => {
84
- if (val) {
85
- const { data } = await getFilterDetail(val)
86
- data.filterComponent.forEach((item) => {
87
- filter.value[item.valueName] = item.defaultValue
88
- titleObj.value[item.valueName] = item.fitlerName
89
- if (item.componentProps?.componentList) {
90
- item.componentProps.componentList.forEach((data) => {
91
- filter.value[data.valueName] = data.defaultValue
92
- })
93
- }
94
- })
95
- if (data.filterTags) {
96
- filter.value[data.filterTags.valueName] = data.filterTags.defaultValue
97
- titleObj.value[data.filterTags.valueName] = data.filterTags.defaultName
98
- }
99
- info.value = data
100
- }
101
- },
102
- {
103
- immediate: true,
104
- },
105
- )
106
- const onSubmit = (index: number, filterObj?: Record<string, any>) => {
107
- dropMenu.value?.[index]?.close()
108
- if (filterObj) {
109
- filter.value = {
110
- ...filter.value,
111
- ...filterObj,
112
- }
113
- }
114
- }
115
- const getSelect = (item: FilterComponent) => {
116
- if (item.component === 'componentGroup') {
117
- return item.componentProps.componentList?.some((v) => filter.value[v.valueName])
118
- } else {
119
- return Boolean(filter.value[item.valueName])
120
- }
121
- }
122
- const handleOpened = () => {
123
- uni.$emit('drop-opened')
124
- }
125
- </script>
126
-
127
- <style lang="scss" scoped>
128
- @import './index';
129
- </style>
@@ -11,8 +11,8 @@ declare const _default: import('vue').DefineComponent<
11
11
  import('vue').ComponentOptionsMixin,
12
12
  import('vue').ComponentOptionsMixin,
13
13
  {
14
- submit: (...args: any[]) => void
15
14
  cancel: (...args: any[]) => void
15
+ submit: (...args: any[]) => void
16
16
  },
17
17
  string,
18
18
  import('vue').PublicProps,