@tplc/business 0.4.27 → 0.4.29
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 +14 -0
- package/components/lcb-calendar-search/lcb-calendar-search.vue +0 -22
- package/components/lcb-city-select/lcb-city-select.vue +20 -2
- package/components/lcb-home-search/lcb-home-search.vue +9 -11
- package/components/lcb-list/api.ts +6 -0
- package/components/lcb-list/components/ComponentGroup/index.vue +8 -1
- package/components/lcb-list/components/FilterSelect/index.vue +7 -0
- package/components/lcb-list/components/FilterSlider/index.vue +12 -0
- package/components/lcb-list/components/FilterTabs/index.vue +11 -1
- package/components/lcb-list/components/FilterView/index.vue +5 -0
- package/components/lcb-list/components/TagSelect/index.vue +12 -1
- package/components/lcb-list/components/TreeSelect/index.vue +44 -3
- package/components/lcb-list/components/UnconditionedLayout/index.vue +124 -0
- package/components/lcb-list/hooks/useSyncValues.ts +16 -0
- package/components/lcb-list/lcb-list.vue +5 -4
- package/components/lcb-list/types.ts +5 -2
- package/components/lcb-nav/SharePopup/index.vue +1 -0
- package/components/lcb-product/lcb-product.vue +32 -29
- package/components/lcb-search/lcb-search.vue +12 -23
- package/components/lcb-search/types.ts +2 -0
- package/constants.ts +2 -0
- package/package.json +2 -2
- package/types/components/lcb-list/api.d.ts +6 -0
- package/types/components/lcb-list/components/UnconditionedLayout/index.vue.d.ts +83 -0
- package/types/components/lcb-list/hooks/useSelect.d.ts +1 -1
- package/types/components/lcb-list/hooks/useSyncValues.d.ts +5 -0
- package/types/components/lcb-list/types.d.ts +4 -2
- package/types/components/lcb-search/lcb-search.vue.d.ts +16 -0
- package/types/components/lcb-search/types.d.ts +1 -0
- package/types/constants.d.ts +2 -0
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,20 @@
|
|
|
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.4.29](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.28...v0.4.29) (2025-03-27)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
### ✨ Features | 新功能
|
|
9
|
+
|
|
10
|
+
* 调整组件 ([6b4ce6c](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/6b4ce6c95ee380e143df93b6de16e6c8af0116d7))
|
|
11
|
+
|
|
12
|
+
### [0.4.28](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.1.75...v0.4.28) (2025-03-27)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
### ✨ Features | 新功能
|
|
16
|
+
|
|
17
|
+
* backup ([5934345](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/commit/59343452497456c698c7c6e0d9cafb4cc18ea842))
|
|
18
|
+
|
|
5
19
|
### [0.4.27](http://gitlab888.30jia.com.cn/bhBank/zero-code-pro/compare/v0.4.24...v0.4.27) (2025-03-27)
|
|
6
20
|
|
|
7
21
|
|
|
@@ -108,28 +108,6 @@ const urlParams = computed(() => {
|
|
|
108
108
|
const { translate } = useTranslate()
|
|
109
109
|
const { getLocation, userLocation } = useLocation()
|
|
110
110
|
|
|
111
|
-
watch(
|
|
112
|
-
() => addressCity.value,
|
|
113
|
-
(val) => {
|
|
114
|
-
if (val) {
|
|
115
|
-
const params: Record<string, any> = {
|
|
116
|
-
cityId: val?.cityId,
|
|
117
|
-
areaId: val?.areaId,
|
|
118
|
-
provinceId: val?.provinceId,
|
|
119
|
-
addressName: val?.addressName,
|
|
120
|
-
}
|
|
121
|
-
if (val.keywords) {
|
|
122
|
-
params.keywords = val.keywords
|
|
123
|
-
}
|
|
124
|
-
const datas = cleanOutSizeKeys(form.value, Object.keys(getCurrentPage().options))
|
|
125
|
-
form.value = {
|
|
126
|
-
...datas,
|
|
127
|
-
...params,
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
},
|
|
131
|
-
)
|
|
132
|
-
|
|
133
111
|
getLocation()
|
|
134
112
|
const onSearch = (e) => {
|
|
135
113
|
form.value.keywords = e.target.value
|
|
@@ -59,13 +59,16 @@
|
|
|
59
59
|
</template>
|
|
60
60
|
|
|
61
61
|
<script setup lang="ts">
|
|
62
|
-
import { ref, watch, provide, onMounted, onUnmounted } from 'vue'
|
|
62
|
+
import { ref, watch, provide, onMounted, onUnmounted, inject, Ref } from 'vue'
|
|
63
63
|
import { ChildHotAddress, getAddressList, LcbAddress } from './api'
|
|
64
64
|
import LcbCityLetter from './components/lcb-city-letter/index.vue'
|
|
65
65
|
import LcbCityList from './components/lcb-city-list/index.vue'
|
|
66
66
|
import { LcbCitySelectProps } from './types'
|
|
67
67
|
import { debounce } from '@tplc/wot/components/common/util'
|
|
68
68
|
import { setHistoryCity } from '../../utils/history'
|
|
69
|
+
import { cleanOutSizeKeys } from '../../utils/transform'
|
|
70
|
+
import { getCurrentPage } from '../../utils/utils'
|
|
71
|
+
import { FORM_KEY } from '../../constants'
|
|
69
72
|
defineOptions({
|
|
70
73
|
name: 'LcbCitySelect',
|
|
71
74
|
options: {
|
|
@@ -78,6 +81,7 @@ const props = withDefaults(defineProps<LcbCitySelectProps>(), {
|
|
|
78
81
|
placeholder: '搜索城市/区域/景点',
|
|
79
82
|
})
|
|
80
83
|
const historyList = ref<LcbAddress[]>(uni.getStorageSync('historyAddress') || [])
|
|
84
|
+
const form = inject(FORM_KEY) as Ref<Record<string, any>>
|
|
81
85
|
provide('lcb-city-history', historyList)
|
|
82
86
|
const modelValue = defineModel<ChildHotAddress>()
|
|
83
87
|
const isOver = ref(false)
|
|
@@ -121,7 +125,21 @@ watch(
|
|
|
121
125
|
|
|
122
126
|
watch(
|
|
123
127
|
() => modelValue.value,
|
|
124
|
-
() => {
|
|
128
|
+
(val) => {
|
|
129
|
+
const params: Record<string, any> = {
|
|
130
|
+
cityId: val?.cityId,
|
|
131
|
+
areaId: val?.areaId,
|
|
132
|
+
provinceId: val?.provinceId,
|
|
133
|
+
addressName: val?.addressName,
|
|
134
|
+
}
|
|
135
|
+
// if (val.keywords) {
|
|
136
|
+
// params.keywords = val.keywords
|
|
137
|
+
// }
|
|
138
|
+
const datas = cleanOutSizeKeys(form.value, Object.keys(getCurrentPage().options))
|
|
139
|
+
form.value = {
|
|
140
|
+
...datas,
|
|
141
|
+
...params,
|
|
142
|
+
}
|
|
125
143
|
setHistoryCity(modelValue.value)
|
|
126
144
|
show.value = false
|
|
127
145
|
},
|
|
@@ -111,7 +111,7 @@
|
|
|
111
111
|
</template>
|
|
112
112
|
|
|
113
113
|
<script setup lang="ts">
|
|
114
|
-
import { computed, ref, watchEffect, inject, Ref } from 'vue'
|
|
114
|
+
import { computed, ref, watchEffect, inject, Ref, onMounted } from 'vue'
|
|
115
115
|
import { LcbHomeSearch } from './types'
|
|
116
116
|
import dayjs from 'dayjs/esm'
|
|
117
117
|
import useLocation from '../../hooks/useLocation'
|
|
@@ -169,16 +169,14 @@ watchEffect(() => {
|
|
|
169
169
|
form.value.startDate = dayjs(dayRange.value[0]).format('YYYY-MM-DD')
|
|
170
170
|
form.value.endDate = dayjs(dayRange.value[1]).format('YYYY-MM-DD')
|
|
171
171
|
})
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
form.value
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
form.value.keywords = addressCity.value.keywords
|
|
181
|
-
}
|
|
172
|
+
onMounted(() => {
|
|
173
|
+
const { addressName, cityId, provinceId, areaId } = getHistoryCity() || {}
|
|
174
|
+
form.value = {
|
|
175
|
+
...form.value,
|
|
176
|
+
addressName,
|
|
177
|
+
cityId,
|
|
178
|
+
provinceId,
|
|
179
|
+
areaId,
|
|
182
180
|
}
|
|
183
181
|
})
|
|
184
182
|
</script>
|
|
@@ -12,6 +12,7 @@ export interface LcbFilterResult {
|
|
|
12
12
|
filterTabs?: {
|
|
13
13
|
componentProps: FilterTabsProps
|
|
14
14
|
valueName: string
|
|
15
|
+
sortType?: boolean
|
|
15
16
|
defaultValue?: string
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -22,6 +23,7 @@ export interface FilterComponent {
|
|
|
22
23
|
defaultValue?: string
|
|
23
24
|
defaultName?: string
|
|
24
25
|
valueName: string
|
|
26
|
+
sortType?: boolean
|
|
25
27
|
componentProps: FilterComponentProps
|
|
26
28
|
}
|
|
27
29
|
|
|
@@ -36,6 +38,7 @@ export interface ComponentList {
|
|
|
36
38
|
filterName: string
|
|
37
39
|
component: string
|
|
38
40
|
valueName: string
|
|
41
|
+
sortType?: boolean
|
|
39
42
|
defaultValue?: string | string[] | number[]
|
|
40
43
|
componentProps: FilterTagsProps
|
|
41
44
|
}
|
|
@@ -43,6 +46,7 @@ export interface ComponentList {
|
|
|
43
46
|
export interface FilterTags {
|
|
44
47
|
component: string
|
|
45
48
|
valueName: string
|
|
49
|
+
sortType?: boolean
|
|
46
50
|
defaultValue?: string
|
|
47
51
|
defaultName?: string
|
|
48
52
|
componentProps: FilterTagsProps
|
|
@@ -56,6 +60,8 @@ export interface FilterTagsProps {
|
|
|
56
60
|
options: Option[]
|
|
57
61
|
unit?: string
|
|
58
62
|
step?: number
|
|
63
|
+
valueName: string
|
|
64
|
+
sortType?: boolean
|
|
59
65
|
}
|
|
60
66
|
|
|
61
67
|
interface BtnComponent {
|
|
@@ -15,12 +15,19 @@
|
|
|
15
15
|
</view>
|
|
16
16
|
</view>
|
|
17
17
|
<view class="grid grid-cols-4 gap-22rpx" v-if="child.component === 'tagSelect'">
|
|
18
|
-
<TagSelect
|
|
18
|
+
<TagSelect
|
|
19
|
+
v-bind="child.componentProps"
|
|
20
|
+
v-model="innerFilter[child.valueName]"
|
|
21
|
+
:value-name="child.valueName"
|
|
22
|
+
:sort-type="child.sortType"
|
|
23
|
+
/>
|
|
19
24
|
</view>
|
|
20
25
|
<FilterSlider
|
|
21
26
|
v-if="child.component === 'slider'"
|
|
22
27
|
v-bind="child.componentProps"
|
|
23
28
|
v-model="innerFilter[child.valueName]"
|
|
29
|
+
:value-name="child.valueName"
|
|
30
|
+
:sort-type="child.sortType"
|
|
24
31
|
/>
|
|
25
32
|
</view>
|
|
26
33
|
</view>
|
|
@@ -17,6 +17,7 @@
|
|
|
17
17
|
import { FilterSelectProps } from './type'
|
|
18
18
|
import useSelect from '../../hooks/useSelect'
|
|
19
19
|
import { watch, watchEffect } from 'vue'
|
|
20
|
+
import useSyncValues from '../../hooks/useSyncValues'
|
|
20
21
|
defineOptions({
|
|
21
22
|
name: 'FilterSelect',
|
|
22
23
|
options: {
|
|
@@ -27,11 +28,17 @@ defineOptions({
|
|
|
27
28
|
})
|
|
28
29
|
const props = defineProps<FilterSelectProps>()
|
|
29
30
|
const model = defineModel<string | string[]>()
|
|
31
|
+
const { syncValues } = useSyncValues()
|
|
30
32
|
const modelTitle = defineModel<string>('title')
|
|
31
33
|
const { onItemClick, options, getChecked } = useSelect(props, { model })
|
|
32
34
|
const emits = defineEmits(['submit'])
|
|
33
35
|
watchEffect(() => {
|
|
34
36
|
modelTitle.value = options.value?.find((v) => v.value === model.value)?.label
|
|
37
|
+
syncValues(
|
|
38
|
+
props.valueName,
|
|
39
|
+
options.value?.filter((v) => v.value === model.value),
|
|
40
|
+
props.sortType,
|
|
41
|
+
)
|
|
35
42
|
})
|
|
36
43
|
watch(
|
|
37
44
|
() => model.value,
|
|
@@ -35,6 +35,7 @@ import { FilterSliderProps } from './types'
|
|
|
35
35
|
import SelectTagView from '../SelectTagView/index.vue'
|
|
36
36
|
import { onMounted, onUnmounted, ref, watch, inject } from 'vue'
|
|
37
37
|
import type { SliderInstance } from '@tplc/wot/components/wd-slider/types'
|
|
38
|
+
import useSyncValues from '../../hooks/useSyncValues'
|
|
38
39
|
defineOptions({
|
|
39
40
|
name: 'FilterSlider',
|
|
40
41
|
options: {
|
|
@@ -51,6 +52,7 @@ const props = withDefaults(defineProps<FilterSliderProps>(), {
|
|
|
51
52
|
})
|
|
52
53
|
const model = defineModel<number[]>()
|
|
53
54
|
const innerValue = ref<number[]>()
|
|
55
|
+
const { syncValues } = useSyncValues()
|
|
54
56
|
const onItemClick = (value) => {
|
|
55
57
|
if (Array.isArray(value)) {
|
|
56
58
|
if (value[1]) {
|
|
@@ -85,6 +87,16 @@ watch(
|
|
|
85
87
|
? val.map((v) => (typeof v === 'string' ? parseInt(v) : v))
|
|
86
88
|
: [props.min, props.max]
|
|
87
89
|
}
|
|
90
|
+
syncValues(
|
|
91
|
+
props.valueName,
|
|
92
|
+
[
|
|
93
|
+
{
|
|
94
|
+
label: `${innerValue.value?.[0]}${props.unit} - ${innerValue.value?.[1]}${props.unit}`,
|
|
95
|
+
value: `${innerValue.value}`,
|
|
96
|
+
},
|
|
97
|
+
],
|
|
98
|
+
props.sortType,
|
|
99
|
+
)
|
|
88
100
|
},
|
|
89
101
|
{ immediate: true },
|
|
90
102
|
)
|
|
@@ -13,6 +13,8 @@
|
|
|
13
13
|
|
|
14
14
|
<script setup lang="ts">
|
|
15
15
|
import { FilterTabsProps } from './type'
|
|
16
|
+
import useSyncValues from '../../hooks/useSyncValues'
|
|
17
|
+
import { watchEffect } from 'vue'
|
|
16
18
|
defineOptions({
|
|
17
19
|
name: 'FilterTabs',
|
|
18
20
|
options: {
|
|
@@ -21,7 +23,15 @@ defineOptions({
|
|
|
21
23
|
styleIsolation: 'shared',
|
|
22
24
|
},
|
|
23
25
|
})
|
|
24
|
-
defineProps<FilterTabsProps>()
|
|
26
|
+
const props = defineProps<FilterTabsProps>()
|
|
25
27
|
const modelValue = defineModel<string>()
|
|
28
|
+
const { syncValues } = useSyncValues()
|
|
29
|
+
watchEffect(() => {
|
|
30
|
+
syncValues(
|
|
31
|
+
props.valueName,
|
|
32
|
+
props.options?.filter((v) => v.value === modelValue.value),
|
|
33
|
+
props.sortType,
|
|
34
|
+
)
|
|
35
|
+
})
|
|
26
36
|
</script>
|
|
27
37
|
<style lang="scss" scoped></style>
|
|
@@ -30,6 +30,8 @@
|
|
|
30
30
|
v-if="item.component === 'select'"
|
|
31
31
|
v-bind="item.componentProps"
|
|
32
32
|
v-model="filter[item.valueName]"
|
|
33
|
+
:value-name="item.valueName"
|
|
34
|
+
:sort-type="item.sortType"
|
|
33
35
|
v-model:title="titleObj[item.valueName]"
|
|
34
36
|
@submit="onSubmit(index)"
|
|
35
37
|
/>
|
|
@@ -38,6 +40,7 @@
|
|
|
38
40
|
v-bind="item.componentProps"
|
|
39
41
|
:value="filter[item.valueName]"
|
|
40
42
|
:value-name="item.valueName"
|
|
43
|
+
:sort-type="item.sortType"
|
|
41
44
|
:filter-value="filter"
|
|
42
45
|
v-model:keys="dynamicKeys[index]"
|
|
43
46
|
@submit="onSubmit(index, $event)"
|
|
@@ -64,6 +67,8 @@
|
|
|
64
67
|
size="small"
|
|
65
68
|
v-bind="info.filterTags.componentProps"
|
|
66
69
|
v-model="filter[info.filterTags.valueName]"
|
|
70
|
+
:value-name="info.filterTags.valueName"
|
|
71
|
+
:sort-type="info.filterTags.sortType"
|
|
67
72
|
/>
|
|
68
73
|
</view>
|
|
69
74
|
<wd-button v-if="info?.btnComponent" custom-class="!h-60rpx opacity-primary">
|
|
@@ -44,6 +44,7 @@ import useSelect from '../../hooks/useSelect'
|
|
|
44
44
|
import { ref, watchEffect, nextTick } from 'vue'
|
|
45
45
|
import SelectTagView from '../SelectTagView/index.vue'
|
|
46
46
|
import { Option } from '../../types'
|
|
47
|
+
import useSyncValues from '../../hooks/useSyncValues'
|
|
47
48
|
defineOptions({
|
|
48
49
|
name: 'TagSelect',
|
|
49
50
|
options: {
|
|
@@ -58,8 +59,18 @@ const modelTitle = defineModel<string>('title')
|
|
|
58
59
|
const showInput = ref(false)
|
|
59
60
|
const inputValue = ref('')
|
|
60
61
|
const { options, onItemClick, getChecked } = useSelect(props, { model })
|
|
62
|
+
const { syncValues } = useSyncValues()
|
|
61
63
|
watchEffect(() => {
|
|
62
|
-
|
|
64
|
+
if (typeof model.value === 'string') {
|
|
65
|
+
modelTitle.value = options.value?.find((v) => v.value === model.value)?.label
|
|
66
|
+
}
|
|
67
|
+
syncValues(
|
|
68
|
+
props.valueName,
|
|
69
|
+
options.value?.filter((v) =>
|
|
70
|
+
Array.isArray(model.value) ? model.value.includes(v.value) : v.value === model.value,
|
|
71
|
+
),
|
|
72
|
+
props.sortType,
|
|
73
|
+
)
|
|
63
74
|
})
|
|
64
75
|
const onCustomClick = (item: Option, edit = false) => {
|
|
65
76
|
if (item.value && !edit) {
|
|
@@ -60,11 +60,13 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup lang="ts">
|
|
63
|
-
import { getCurrentInstance, nextTick, watch, ref, computed
|
|
63
|
+
import { getCurrentInstance, nextTick, watch, ref, computed } from 'vue'
|
|
64
64
|
import { TreeSelectProps } from './type'
|
|
65
65
|
import useSelect from '../../hooks/useSelect'
|
|
66
66
|
import SelectTagView from '../SelectTagView/index.vue'
|
|
67
67
|
import ActionView from '../ActionView/index.vue'
|
|
68
|
+
import useSyncValues from '../../hooks/useSyncValues'
|
|
69
|
+
import { Option } from '../../types'
|
|
68
70
|
defineOptions({
|
|
69
71
|
name: 'TreeSelect',
|
|
70
72
|
options: {
|
|
@@ -75,6 +77,7 @@ defineOptions({
|
|
|
75
77
|
})
|
|
76
78
|
const props = defineProps<TreeSelectProps>()
|
|
77
79
|
const modelKeys = defineModel<string[]>('keys')
|
|
80
|
+
const { syncValues } = useSyncValues()
|
|
78
81
|
const innerValue = ref(props.value)
|
|
79
82
|
const toView = ref('')
|
|
80
83
|
const extraModel = ref({
|
|
@@ -97,11 +100,14 @@ const { onItemClick, options, getChecked } = useSelect(props, {
|
|
|
97
100
|
onOpen,
|
|
98
101
|
})
|
|
99
102
|
const currentCategory = ref(0)
|
|
103
|
+
|
|
100
104
|
const onSubmit = () => {
|
|
101
|
-
|
|
105
|
+
const params = {
|
|
102
106
|
...extraModel.value,
|
|
103
107
|
[props.valueName]: innerValue.value,
|
|
104
|
-
}
|
|
108
|
+
}
|
|
109
|
+
setValues(params)
|
|
110
|
+
emits('submit', params)
|
|
105
111
|
}
|
|
106
112
|
const onCategoryClick = (index: number) => {
|
|
107
113
|
currentCategory.value = index
|
|
@@ -149,6 +155,41 @@ const onCancel = () => {
|
|
|
149
155
|
{} as Record<string, any>,
|
|
150
156
|
)
|
|
151
157
|
}
|
|
158
|
+
/** 递归获取optionsMap key为value 值位options */
|
|
159
|
+
const optionsMap = computed(() => {
|
|
160
|
+
const map = {} as Record<string, Option>
|
|
161
|
+
options.value.forEach((v) => {
|
|
162
|
+
if (!v.valueName) {
|
|
163
|
+
map[v.value] = v
|
|
164
|
+
if (v.children) {
|
|
165
|
+
v.children.forEach((v) => {
|
|
166
|
+
map[v.value] = v
|
|
167
|
+
})
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
})
|
|
171
|
+
return map
|
|
172
|
+
})
|
|
173
|
+
|
|
174
|
+
const setValues = (params: Record<string, any>) => {
|
|
175
|
+
if (params[props.valueName]) {
|
|
176
|
+
syncValues(
|
|
177
|
+
props.valueName,
|
|
178
|
+
params[props.valueName].map((v) => optionsMap.value[v]),
|
|
179
|
+
)
|
|
180
|
+
}
|
|
181
|
+
modelKeys.value?.forEach((v: string) => {
|
|
182
|
+
if (v !== props.valueName && params[v]) {
|
|
183
|
+
const currentOptions = options.value.find((option) => option.valueName === v)
|
|
184
|
+
if (currentOptions) {
|
|
185
|
+
syncValues(
|
|
186
|
+
v,
|
|
187
|
+
params[v].map((v) => optionsMap.value[v]),
|
|
188
|
+
)
|
|
189
|
+
}
|
|
190
|
+
}
|
|
191
|
+
})
|
|
192
|
+
}
|
|
152
193
|
</script>
|
|
153
194
|
<style lang="scss" scoped>
|
|
154
195
|
@import '@tplc/wot/components/common/abstracts/variable';
|
|
@@ -0,0 +1,124 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<view v-if="extendJson" :style="itemStyle" class="overflow-hidden text-3">
|
|
3
|
+
<view
|
|
4
|
+
class="flex items-center justify-center p-3 bg-white box-border"
|
|
5
|
+
v-if="extendJson.resultTitle"
|
|
6
|
+
>
|
|
7
|
+
<view class="flex items-center justify-center">
|
|
8
|
+
<img :src="extendJson.resultIcon" alt="" class="w-4 h-4" />
|
|
9
|
+
<view class="ml-2">
|
|
10
|
+
<view class="mt-1">{{ extendJson.resultTitle }}</view>
|
|
11
|
+
<view class="text-#969696 text-2.5">{{ extendJson.resultSubTitle }}</view>
|
|
12
|
+
</view>
|
|
13
|
+
</view>
|
|
14
|
+
</view>
|
|
15
|
+
<view class="p-3 bg-#F5F5F5 box-border">
|
|
16
|
+
<view class="flex items-center justify-between">
|
|
17
|
+
<view class="flex items-center gap-1">
|
|
18
|
+
<img :src="extendJson.optionIcon" alt="" class="w-3 h-3" />
|
|
19
|
+
{{ extendJson.optionTitle }}
|
|
20
|
+
</view>
|
|
21
|
+
<view class="flex items-center justify-center" @click="handleClearAll">
|
|
22
|
+
<wd-icon name="delete1" size="16" />
|
|
23
|
+
<text class="ml-0.5">清空</text>
|
|
24
|
+
</view>
|
|
25
|
+
</view>
|
|
26
|
+
<view class="flex flex-wrap gap-1 mt-2">
|
|
27
|
+
<block v-for="tag in options" :key="tag.key">
|
|
28
|
+
<view
|
|
29
|
+
v-for="option in tag.options"
|
|
30
|
+
:key="option.value"
|
|
31
|
+
@click="removeTag(option.value, tag.key, tag.options!.length)"
|
|
32
|
+
class="rounded-1 flex items-center bg-white px-2 py-0.5 gap-1 box-border overflow-hidden"
|
|
33
|
+
>
|
|
34
|
+
<text class="tag-text text-3">{{ option.label }}</text>
|
|
35
|
+
<wd-icon name="close" size="20rpx" color="#969696" />
|
|
36
|
+
</view>
|
|
37
|
+
</block>
|
|
38
|
+
</view>
|
|
39
|
+
</view>
|
|
40
|
+
</view>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts" setup>
|
|
44
|
+
import { ListFormChooserValues } from '../../types'
|
|
45
|
+
import { LIST_FORM_CHOOSER_VALUES, FORM_KEY } from '../../../../constants'
|
|
46
|
+
import { Ref, computed, inject } from 'vue'
|
|
47
|
+
import { transformValueUnit } from '../../../../utils/transform'
|
|
48
|
+
defineOptions({
|
|
49
|
+
name: 'UnconditionedLayout',
|
|
50
|
+
options: {
|
|
51
|
+
addGlobalClass: true,
|
|
52
|
+
virtualHost: true,
|
|
53
|
+
},
|
|
54
|
+
})
|
|
55
|
+
interface UnconditionedLayoutConfig {
|
|
56
|
+
optionTitle: string
|
|
57
|
+
resultIcon: string
|
|
58
|
+
resultTitle: string
|
|
59
|
+
optionIcon: string
|
|
60
|
+
resultSubTitle: string
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
const list = inject(LIST_FORM_CHOOSER_VALUES) as Ref<ListFormChooserValues>
|
|
64
|
+
const form = inject(FORM_KEY) as Ref<Record<string, any>>
|
|
65
|
+
const props = withDefaults(
|
|
66
|
+
defineProps<{
|
|
67
|
+
extendJson?: UnconditionedLayoutConfig
|
|
68
|
+
borderRadius?: number
|
|
69
|
+
shadowSize?: number
|
|
70
|
+
shadowColor?: string
|
|
71
|
+
blurSize?: number
|
|
72
|
+
}>(),
|
|
73
|
+
{
|
|
74
|
+
borderRadius: 12,
|
|
75
|
+
shadowSize: 1,
|
|
76
|
+
shadowColor: '#D6D7DA',
|
|
77
|
+
blurSize: 5,
|
|
78
|
+
},
|
|
79
|
+
)
|
|
80
|
+
|
|
81
|
+
const itemStyle = computed(() => {
|
|
82
|
+
return {
|
|
83
|
+
borderRadius: transformValueUnit(props.borderRadius),
|
|
84
|
+
boxShadow:
|
|
85
|
+
props.shadowColor && props.shadowSize
|
|
86
|
+
? `0px 0px ${props.blurSize}px ${props.shadowSize}px ${props.shadowColor}`
|
|
87
|
+
: '',
|
|
88
|
+
}
|
|
89
|
+
})
|
|
90
|
+
|
|
91
|
+
const options = computed(() => {
|
|
92
|
+
return Object.keys(list.value)
|
|
93
|
+
.filter((v) => list.value[v])
|
|
94
|
+
.map((v) => {
|
|
95
|
+
return {
|
|
96
|
+
key: v,
|
|
97
|
+
options: list.value[v],
|
|
98
|
+
}
|
|
99
|
+
})
|
|
100
|
+
})
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* 移除单个标签
|
|
104
|
+
*/
|
|
105
|
+
const removeTag = (value: string, key: string, length: number) => {
|
|
106
|
+
if (length === 1) {
|
|
107
|
+
form.value[key] = undefined
|
|
108
|
+
list.value[key] = []
|
|
109
|
+
} else {
|
|
110
|
+
list.value[key] = list.value[key]!.filter((v) => v.value !== value)
|
|
111
|
+
form.value[key] = form.value[key].filter((v: string) => v !== value)
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* 清空所有标签
|
|
117
|
+
*/
|
|
118
|
+
const handleClearAll = () => {
|
|
119
|
+
Object.keys(list.value).forEach((v) => {
|
|
120
|
+
form.value[v] = undefined
|
|
121
|
+
list.value[v] = []
|
|
122
|
+
})
|
|
123
|
+
}
|
|
124
|
+
</script>
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Ref, inject } from 'vue'
|
|
2
|
+
import { LIST_FORM_CHOOSER_VALUES } from '../../../constants'
|
|
3
|
+
import { ListFormChooserValues, Option } from '../types'
|
|
4
|
+
|
|
5
|
+
const useSyncValues = () => {
|
|
6
|
+
const listFormChooserValues = inject(LIST_FORM_CHOOSER_VALUES) as Ref<ListFormChooserValues>
|
|
7
|
+
const syncValues = (valueName: string, options?: Option[], sortType?: boolean) => {
|
|
8
|
+
if (!sortType) {
|
|
9
|
+
listFormChooserValues.value[valueName] = options
|
|
10
|
+
}
|
|
11
|
+
}
|
|
12
|
+
return {
|
|
13
|
+
syncValues,
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
export default useSyncValues
|
|
@@ -60,12 +60,12 @@
|
|
|
60
60
|
</template>
|
|
61
61
|
|
|
62
62
|
<script setup lang="ts">
|
|
63
|
-
import { inject, Ref, ref, watch, useAttrs } from 'vue'
|
|
63
|
+
import { inject, Ref, ref, watch, useAttrs, provide } from 'vue'
|
|
64
64
|
import { getFilterDetail, LcbFilterResult } from './api'
|
|
65
65
|
import FilterList from './components/FilterList/index.vue'
|
|
66
66
|
import FilterView from './components/FilterView/index.vue'
|
|
67
|
-
import { LcbListProps } from './types'
|
|
68
|
-
import { FORM_KEY } from '../../constants'
|
|
67
|
+
import { LcbListProps, ListFormChooserValues } from './types'
|
|
68
|
+
import { FORM_KEY, LIST_FORM_CHOOSER_VALUES } from '../../constants'
|
|
69
69
|
import './index.scss'
|
|
70
70
|
const attrs = useAttrs()
|
|
71
71
|
/** 是否悬停 */
|
|
@@ -82,7 +82,8 @@ defineOptions({
|
|
|
82
82
|
})
|
|
83
83
|
const titleObj = ref<Record<string, any>>({})
|
|
84
84
|
const titleCount = ref<Record<string, number>>({})
|
|
85
|
-
const form = inject
|
|
85
|
+
const form = inject(FORM_KEY) as Ref<Record<string, any>>
|
|
86
|
+
provide<Ref<Record<string, any>>>(LIST_FORM_CHOOSER_VALUES, ref<ListFormChooserValues>({}))
|
|
86
87
|
const props = withDefaults(defineProps<LcbListProps>(), {
|
|
87
88
|
borderRadius: 12,
|
|
88
89
|
styleMode: 'default',
|
|
@@ -20,7 +20,7 @@ export interface LcbListProps extends LcbBlockProps {
|
|
|
20
20
|
}
|
|
21
21
|
export interface Option {
|
|
22
22
|
label: string
|
|
23
|
-
value: string
|
|
23
|
+
value: string
|
|
24
24
|
custom?: boolean
|
|
25
25
|
max?: number
|
|
26
26
|
min?: number
|
|
@@ -34,5 +34,8 @@ export interface FilterItemProps {
|
|
|
34
34
|
apiPath?: string
|
|
35
35
|
apiParams?: Record<string, any>
|
|
36
36
|
options?: Option[]
|
|
37
|
-
|
|
37
|
+
valueName: string
|
|
38
|
+
sortType?: boolean
|
|
38
39
|
}
|
|
40
|
+
|
|
41
|
+
export type ListFormChooserValues = Record<string, Option[] | undefined>
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
2
|
import { inject, Ref, ref, useAttrs, watch, watchEffect } from 'vue'
|
|
3
3
|
import UWaterfall from 'uview-plus/components/u-waterfall/u-waterfall.vue'
|
|
4
|
+
import UnconditionedLayout from '../lcb-list/components/UnconditionedLayout/index.vue'
|
|
4
5
|
import { LcbProductProps } from './types'
|
|
5
6
|
import { transformValueUnit } from '../../utils/transform'
|
|
6
7
|
import { calculateImageHeight } from '../../utils/utils'
|
|
@@ -149,35 +150,37 @@ defineExpose({
|
|
|
149
150
|
width: itemWidth ? `${itemWidth}rpx` : '100%',
|
|
150
151
|
}"
|
|
151
152
|
>
|
|
152
|
-
<
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
<
|
|
158
|
-
<
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
153
|
+
<block v-for="(item, index) in renderList" :key="`${item?.productId}:${index}`">
|
|
154
|
+
<UnconditionedLayout
|
|
155
|
+
v-if="item.productType === 'noProductOption'"
|
|
156
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
157
|
+
/>
|
|
158
|
+
<lcb-action-view v-bind="item.link" v-else>
|
|
159
|
+
<slot name="item" :item="item">
|
|
160
|
+
<lcb-absolute-config-layout
|
|
161
|
+
v-if="renderItemAbsoluteConfigLayout"
|
|
162
|
+
:blocks="renderItemAbsoluteConfigLayout?.blocks"
|
|
163
|
+
:canvas="renderItemAbsoluteConfigLayout?.canvas"
|
|
164
|
+
:dataset="{
|
|
165
|
+
...(renderItemAbsoluteConfigLayout?.dataset ?? {}),
|
|
166
|
+
...item,
|
|
167
|
+
}"
|
|
168
|
+
/>
|
|
169
|
+
<lcb-product-item
|
|
170
|
+
v-else
|
|
171
|
+
v-bind="{ ...item, ...$props, ...attrs }"
|
|
172
|
+
:layoutType="layoutType"
|
|
173
|
+
:coverImgStyle="{
|
|
174
|
+
width: layoutType === 'vertical' ? '100%' : transformValueUnit(imageWidth),
|
|
175
|
+
height: layoutType === 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
176
|
+
minHeight: layoutType !== 'vertical' ? transformValueUnit(imageHeight) : undefined,
|
|
177
|
+
borderRadius: imageRadius ? transformValueUnit(imageRadius) : undefined,
|
|
178
|
+
...($props?.coverImgStyle ?? {}),
|
|
179
|
+
}"
|
|
180
|
+
></lcb-product-item>
|
|
181
|
+
</slot>
|
|
182
|
+
</lcb-action-view>
|
|
183
|
+
</block>
|
|
181
184
|
</view>
|
|
182
185
|
<!-- 双列 -->
|
|
183
186
|
<view
|
|
@@ -64,14 +64,15 @@
|
|
|
64
64
|
:placeholder="placeholder"
|
|
65
65
|
v-model="form.keywords"
|
|
66
66
|
@confirm="onSearch"
|
|
67
|
-
focus
|
|
67
|
+
@blur="focus = false"
|
|
68
|
+
:focus="focus"
|
|
68
69
|
/>
|
|
69
70
|
<wd-icon
|
|
70
71
|
name="close-circle"
|
|
71
72
|
:size="iconSize"
|
|
72
73
|
:color="iconColor"
|
|
73
74
|
v-if="form.keywords"
|
|
74
|
-
@
|
|
75
|
+
@click="onClear"
|
|
75
76
|
/>
|
|
76
77
|
</view>
|
|
77
78
|
<lcb-action-view v-bind="link" :urlParams="stringify(addressCity)" v-else>
|
|
@@ -118,7 +119,7 @@ import { ChildHotAddress } from '../lcb-city-select/api'
|
|
|
118
119
|
import useLocation from '../../hooks/useLocation'
|
|
119
120
|
import { getHistoryCity } from '../../utils/history'
|
|
120
121
|
import { parse, stringify } from 'qs'
|
|
121
|
-
import { inject, Ref, ref,
|
|
122
|
+
import { inject, Ref, ref, watchEffect } from 'vue'
|
|
122
123
|
import { FORM_KEY } from '../../constants'
|
|
123
124
|
import LcbSearchHistory from './components/SearchHistory/index.vue'
|
|
124
125
|
import LcbSearchList from './components/SearchList/index.vue'
|
|
@@ -156,10 +157,12 @@ const props = withDefaults(defineProps<LcbSearchProps>(), {
|
|
|
156
157
|
iconType: 'icon',
|
|
157
158
|
mode: 'link',
|
|
158
159
|
fontSize: 24,
|
|
160
|
+
initFocus: true,
|
|
159
161
|
})
|
|
160
162
|
const searchHistoryRef = ref<InstanceType<typeof LcbSearchHistory>>()
|
|
161
163
|
const searchListRef = ref<InstanceType<typeof LcbSearchList>>()
|
|
162
164
|
const { height, top } = useAutoHeight('searchPagingTop')
|
|
165
|
+
const focus = ref(props.initFocus)
|
|
163
166
|
const { getLocation, userLocation } = useLocation()
|
|
164
167
|
const addressCity = ref<ChildHotAddress | undefined>(getHistoryCity())
|
|
165
168
|
const popupProvide = inject('wd-popup', {
|
|
@@ -211,26 +214,12 @@ const onCancel = () => {
|
|
|
211
214
|
watchEffect(() => {
|
|
212
215
|
popupProvide.value = form.value?.keywords && props.productTypeList && top
|
|
213
216
|
})
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
(
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
areaId: val?.areaId,
|
|
221
|
-
provinceId: val?.provinceId,
|
|
222
|
-
addressName: val?.addressName,
|
|
223
|
-
}
|
|
224
|
-
if (val.keywords) {
|
|
225
|
-
params.keywords = val.keywords
|
|
226
|
-
}
|
|
227
|
-
form.value = {
|
|
228
|
-
...form.value,
|
|
229
|
-
...params,
|
|
230
|
-
}
|
|
231
|
-
}
|
|
232
|
-
},
|
|
233
|
-
)
|
|
217
|
+
const onClear = () => {
|
|
218
|
+
form.value.keywords = ''
|
|
219
|
+
setTimeout(() => {
|
|
220
|
+
focus.value = true
|
|
221
|
+
}, 100)
|
|
222
|
+
}
|
|
234
223
|
</script>
|
|
235
224
|
|
|
236
225
|
<style lang="scss" scoped>
|
package/constants.ts
CHANGED
|
@@ -7,3 +7,5 @@ export const PAGE_TYPE_PROVIDE_KEY = 'page_type_provide'
|
|
|
7
7
|
export const PAGE_ANCHOR_PROVIDE_KEY = 'page_anchor_provide'
|
|
8
8
|
/** 用户基本信息 */
|
|
9
9
|
export const USER_BASIC_INFO = 'user_basic_info'
|
|
10
|
+
/** 列表页表单选择项 */
|
|
11
|
+
export const LIST_FORM_CHOOSER_VALUES = 'list_form_chooser_values'
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tplc/business",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.29",
|
|
4
4
|
"keywords": [
|
|
5
5
|
"业务组件"
|
|
6
6
|
],
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
},
|
|
12
12
|
"peerDependencies": {
|
|
13
13
|
"vue": ">=3.2.47",
|
|
14
|
-
"@tplc/wot": "0.1.
|
|
14
|
+
"@tplc/wot": "0.1.75"
|
|
15
15
|
},
|
|
16
16
|
"engines": {
|
|
17
17
|
"node": ">=18",
|
|
@@ -12,6 +12,7 @@ export interface LcbFilterResult {
|
|
|
12
12
|
filterTabs?: {
|
|
13
13
|
componentProps: FilterTabsProps
|
|
14
14
|
valueName: string
|
|
15
|
+
sortType?: boolean
|
|
15
16
|
defaultValue?: string
|
|
16
17
|
}
|
|
17
18
|
}
|
|
@@ -21,6 +22,7 @@ export interface FilterComponent {
|
|
|
21
22
|
defaultValue?: string
|
|
22
23
|
defaultName?: string
|
|
23
24
|
valueName: string
|
|
25
|
+
sortType?: boolean
|
|
24
26
|
componentProps: FilterComponentProps
|
|
25
27
|
}
|
|
26
28
|
interface FilterComponentProps {
|
|
@@ -33,12 +35,14 @@ export interface ComponentList {
|
|
|
33
35
|
filterName: string
|
|
34
36
|
component: string
|
|
35
37
|
valueName: string
|
|
38
|
+
sortType?: boolean
|
|
36
39
|
defaultValue?: string | string[] | number[]
|
|
37
40
|
componentProps: FilterTagsProps
|
|
38
41
|
}
|
|
39
42
|
export interface FilterTags {
|
|
40
43
|
component: string
|
|
41
44
|
valueName: string
|
|
45
|
+
sortType?: boolean
|
|
42
46
|
defaultValue?: string
|
|
43
47
|
defaultName?: string
|
|
44
48
|
componentProps: FilterTagsProps
|
|
@@ -51,6 +55,8 @@ export interface FilterTagsProps {
|
|
|
51
55
|
options: Option[]
|
|
52
56
|
unit?: string
|
|
53
57
|
step?: number
|
|
58
|
+
valueName: string
|
|
59
|
+
sortType?: boolean
|
|
54
60
|
}
|
|
55
61
|
interface BtnComponent {
|
|
56
62
|
postRequest: string
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
interface UnconditionedLayoutConfig {
|
|
2
|
+
optionTitle: string
|
|
3
|
+
resultIcon: string
|
|
4
|
+
resultTitle: string
|
|
5
|
+
optionIcon: string
|
|
6
|
+
resultSubTitle: string
|
|
7
|
+
}
|
|
8
|
+
declare const _default: import('vue').DefineComponent<
|
|
9
|
+
__VLS_WithDefaults<
|
|
10
|
+
__VLS_TypePropsToOption<{
|
|
11
|
+
extendJson?: UnconditionedLayoutConfig
|
|
12
|
+
borderRadius?: number
|
|
13
|
+
shadowSize?: number
|
|
14
|
+
shadowColor?: string
|
|
15
|
+
blurSize?: number
|
|
16
|
+
}>,
|
|
17
|
+
{
|
|
18
|
+
borderRadius: number
|
|
19
|
+
shadowSize: number
|
|
20
|
+
shadowColor: string
|
|
21
|
+
blurSize: number
|
|
22
|
+
}
|
|
23
|
+
>,
|
|
24
|
+
{},
|
|
25
|
+
unknown,
|
|
26
|
+
{},
|
|
27
|
+
{},
|
|
28
|
+
import('vue').ComponentOptionsMixin,
|
|
29
|
+
import('vue').ComponentOptionsMixin,
|
|
30
|
+
{},
|
|
31
|
+
string,
|
|
32
|
+
import('vue').PublicProps,
|
|
33
|
+
Readonly<
|
|
34
|
+
import('vue').ExtractPropTypes<
|
|
35
|
+
__VLS_WithDefaults<
|
|
36
|
+
__VLS_TypePropsToOption<{
|
|
37
|
+
extendJson?: UnconditionedLayoutConfig
|
|
38
|
+
borderRadius?: number
|
|
39
|
+
shadowSize?: number
|
|
40
|
+
shadowColor?: string
|
|
41
|
+
blurSize?: number
|
|
42
|
+
}>,
|
|
43
|
+
{
|
|
44
|
+
borderRadius: number
|
|
45
|
+
shadowSize: number
|
|
46
|
+
shadowColor: string
|
|
47
|
+
blurSize: number
|
|
48
|
+
}
|
|
49
|
+
>
|
|
50
|
+
>
|
|
51
|
+
>,
|
|
52
|
+
{
|
|
53
|
+
shadowColor: string
|
|
54
|
+
shadowSize: number
|
|
55
|
+
blurSize: number
|
|
56
|
+
borderRadius: number
|
|
57
|
+
},
|
|
58
|
+
{}
|
|
59
|
+
>
|
|
60
|
+
export default _default
|
|
61
|
+
type __VLS_WithDefaults<P, D> = {
|
|
62
|
+
[K in keyof Pick<P, keyof P>]: K extends keyof D
|
|
63
|
+
? __VLS_Prettify<
|
|
64
|
+
P[K] & {
|
|
65
|
+
default: D[K]
|
|
66
|
+
}
|
|
67
|
+
>
|
|
68
|
+
: P[K]
|
|
69
|
+
}
|
|
70
|
+
type __VLS_Prettify<T> = {
|
|
71
|
+
[K in keyof T]: T[K]
|
|
72
|
+
} & {}
|
|
73
|
+
type __VLS_NonUndefinedable<T> = T extends undefined ? never : T
|
|
74
|
+
type __VLS_TypePropsToOption<T> = {
|
|
75
|
+
[K in keyof T]-?: {} extends Pick<T, K>
|
|
76
|
+
? {
|
|
77
|
+
type: import('vue').PropType<__VLS_NonUndefinedable<T[K]>>
|
|
78
|
+
}
|
|
79
|
+
: {
|
|
80
|
+
type: import('vue').PropType<T[K]>
|
|
81
|
+
required: true
|
|
82
|
+
}
|
|
83
|
+
}
|
|
@@ -19,7 +19,7 @@ export interface LcbListProps extends LcbBlockProps {
|
|
|
19
19
|
}
|
|
20
20
|
export interface Option {
|
|
21
21
|
label: string
|
|
22
|
-
value: string
|
|
22
|
+
value: string
|
|
23
23
|
custom?: boolean
|
|
24
24
|
max?: number
|
|
25
25
|
min?: number
|
|
@@ -32,5 +32,7 @@ export interface FilterItemProps {
|
|
|
32
32
|
apiPath?: string
|
|
33
33
|
apiParams?: Record<string, any>
|
|
34
34
|
options?: Option[]
|
|
35
|
-
|
|
35
|
+
valueName: string
|
|
36
|
+
sortType?: boolean
|
|
36
37
|
}
|
|
38
|
+
export type ListFormChooserValues = Record<string, Option[] | undefined>
|
|
@@ -25,6 +25,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
25
25
|
iconType: string
|
|
26
26
|
mode: string
|
|
27
27
|
fontSize: number
|
|
28
|
+
initFocus: boolean
|
|
28
29
|
}
|
|
29
30
|
>,
|
|
30
31
|
{},
|
|
@@ -62,6 +63,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
62
63
|
linePadding?: number
|
|
63
64
|
lineHeight?: number
|
|
64
65
|
historyKey?: string
|
|
66
|
+
initFocus?: boolean
|
|
65
67
|
} & {
|
|
66
68
|
jumpUrl?: string
|
|
67
69
|
urlParams?: string
|
|
@@ -120,6 +122,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
120
122
|
iconType: string
|
|
121
123
|
mode: string
|
|
122
124
|
fontSize: number
|
|
125
|
+
initFocus: boolean
|
|
123
126
|
}
|
|
124
127
|
>
|
|
125
128
|
>
|
|
@@ -150,6 +153,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
150
153
|
linePadding?: number
|
|
151
154
|
lineHeight?: number
|
|
152
155
|
historyKey?: string
|
|
156
|
+
initFocus?: boolean
|
|
153
157
|
} & {
|
|
154
158
|
jumpUrl?: string
|
|
155
159
|
urlParams?: string
|
|
@@ -186,6 +190,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
186
190
|
iconType: string
|
|
187
191
|
mode: string
|
|
188
192
|
fontSize: number
|
|
193
|
+
initFocus: boolean
|
|
189
194
|
}
|
|
190
195
|
>
|
|
191
196
|
>
|
|
@@ -216,6 +221,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
216
221
|
linePadding?: number
|
|
217
222
|
lineHeight?: number
|
|
218
223
|
historyKey?: string
|
|
224
|
+
initFocus?: boolean
|
|
219
225
|
} & {
|
|
220
226
|
jumpUrl?: string
|
|
221
227
|
urlParams?: string
|
|
@@ -254,6 +260,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
254
260
|
iconType: string
|
|
255
261
|
mode: string
|
|
256
262
|
fontSize: number
|
|
263
|
+
initFocus: boolean
|
|
257
264
|
}
|
|
258
265
|
>
|
|
259
266
|
>
|
|
@@ -284,6 +291,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
284
291
|
linePadding?: number
|
|
285
292
|
lineHeight?: number
|
|
286
293
|
historyKey?: string
|
|
294
|
+
initFocus?: boolean
|
|
287
295
|
} & {
|
|
288
296
|
jumpUrl?: string
|
|
289
297
|
urlParams?: string
|
|
@@ -317,6 +325,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
317
325
|
iconType: string
|
|
318
326
|
mode: string
|
|
319
327
|
fontSize: number
|
|
328
|
+
initFocus: boolean
|
|
320
329
|
}
|
|
321
330
|
>
|
|
322
331
|
>
|
|
@@ -347,6 +356,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
347
356
|
linePadding?: number
|
|
348
357
|
lineHeight?: number
|
|
349
358
|
historyKey?: string
|
|
359
|
+
initFocus?: boolean
|
|
350
360
|
} & {
|
|
351
361
|
jumpUrl?: string
|
|
352
362
|
urlParams?: string
|
|
@@ -379,6 +389,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
379
389
|
iconType: string
|
|
380
390
|
mode: string
|
|
381
391
|
fontSize: number
|
|
392
|
+
initFocus: boolean
|
|
382
393
|
}
|
|
383
394
|
>
|
|
384
395
|
>
|
|
@@ -406,6 +417,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
406
417
|
cityIconColor: string
|
|
407
418
|
lineColor: string
|
|
408
419
|
linePadding: number
|
|
420
|
+
initFocus: boolean
|
|
409
421
|
}
|
|
410
422
|
| {
|
|
411
423
|
mode: 'search' | 'link'
|
|
@@ -430,6 +442,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
430
442
|
cityIconColor: string
|
|
431
443
|
lineColor: string
|
|
432
444
|
linePadding: number
|
|
445
|
+
initFocus: boolean
|
|
433
446
|
}
|
|
434
447
|
| {
|
|
435
448
|
mode: 'search' | 'link'
|
|
@@ -454,6 +467,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
454
467
|
cityIconColor: string
|
|
455
468
|
lineColor: string
|
|
456
469
|
linePadding: number
|
|
470
|
+
initFocus: boolean
|
|
457
471
|
}
|
|
458
472
|
| {
|
|
459
473
|
mode: 'search' | 'link'
|
|
@@ -478,6 +492,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
478
492
|
cityIconColor: string
|
|
479
493
|
lineColor: string
|
|
480
494
|
linePadding: number
|
|
495
|
+
initFocus: boolean
|
|
481
496
|
}
|
|
482
497
|
| {
|
|
483
498
|
mode: 'search' | 'link'
|
|
@@ -502,6 +517,7 @@ declare const _default: import('vue').DefineComponent<
|
|
|
502
517
|
cityIconColor: string
|
|
503
518
|
lineColor: string
|
|
504
519
|
linePadding: number
|
|
520
|
+
initFocus: boolean
|
|
505
521
|
},
|
|
506
522
|
{}
|
|
507
523
|
>
|
package/types/constants.d.ts
CHANGED
|
@@ -7,3 +7,5 @@ export declare const PAGE_TYPE_PROVIDE_KEY = 'page_type_provide'
|
|
|
7
7
|
export declare const PAGE_ANCHOR_PROVIDE_KEY = 'page_anchor_provide'
|
|
8
8
|
/** 用户基本信息 */
|
|
9
9
|
export declare const USER_BASIC_INFO = 'user_basic_info'
|
|
10
|
+
/** 列表页表单选择项 */
|
|
11
|
+
export declare const LIST_FORM_CHOOSER_VALUES = 'list_form_chooser_values'
|