w-ui-v1 1.1.45 → 1.1.47
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/package.json
CHANGED
|
@@ -280,13 +280,8 @@ const displayText = computed(() => {
|
|
|
280
280
|
}
|
|
281
281
|
// datetime
|
|
282
282
|
if (props.subItem.controlType === 'datetime' || props.subItem.extControlType === 'datetime') {
|
|
283
|
-
if (
|
|
284
|
-
|
|
285
|
-
const v0 = dayjs(val[0])
|
|
286
|
-
const v1 = dayjs(val[1])
|
|
287
|
-
if (v0.isValid() && v1.isValid()) return `${v0.format(fmt)} ~ ${v1.format(fmt)}`
|
|
288
|
-
}
|
|
289
|
-
if (typeof val === 'string' && val.includes('~')) return val
|
|
283
|
+
if (typeof val === 'string') return dayjs(val).isValid() ? dayjs(val).format('YYYY-MM-DD HH:mm') : val
|
|
284
|
+
if (typeof val === 'number') return dayjs(val).isValid() ? dayjs(val).format('YYYY-MM-DD HH:mm') : ''
|
|
290
285
|
return ''
|
|
291
286
|
}
|
|
292
287
|
// select 枚举 - 查找 label
|
|
@@ -398,9 +393,12 @@ const displayFormat2 = (value: any) => {
|
|
|
398
393
|
overflow: hidden;
|
|
399
394
|
text-overflow: ellipsis;
|
|
400
395
|
white-space: nowrap;
|
|
401
|
-
text-align:
|
|
396
|
+
text-align: left;
|
|
402
397
|
}
|
|
403
398
|
:deep(.form-control-item .form-select-clear) {
|
|
399
|
+
display: inline-flex;
|
|
400
|
+
align-items: center;
|
|
401
|
+
justify-content: center;
|
|
404
402
|
flex-shrink: 0;
|
|
405
403
|
margin-left: 4px;
|
|
406
404
|
padding: 4px;
|
package/w-search/w-search.vue
CHANGED
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
<view class="search-btn">
|
|
45
45
|
<wd-button size="small" icon="refresh" :round="false" @click="clear"
|
|
46
46
|
type="info">{{changeLanguageConmon('重置')}}</wd-button>
|
|
47
|
-
<wd-button size="small" icon="search" :round="false"
|
|
47
|
+
<wd-button size="small" icon="search-line" :round="false"
|
|
48
48
|
@click="search">{{changeLanguageConmon('确定')}}</wd-button>
|
|
49
49
|
|
|
50
50
|
</view>
|
|
@@ -254,7 +254,15 @@
|
|
|
254
254
|
// 获取页面配置
|
|
255
255
|
function getPageConfig() {
|
|
256
256
|
pageConfig(props.sourceId).then((res : any) => {
|
|
257
|
-
|
|
257
|
+
// 字段名映射:API返回criterias/primaryCriteria等,统一转为新命名
|
|
258
|
+
const cfg = res.data.ltmplConfig
|
|
259
|
+
ltmplConfig.value = {
|
|
260
|
+
...cfg,
|
|
261
|
+
criteria: cfg.criterias || cfg.criteria || [],
|
|
262
|
+
primaryCriterion: cfg.primaryCriterion || cfg.primaryCriteria || {},
|
|
263
|
+
secondCriterion: cfg.secondCriterion || cfg.secondCriteria || {},
|
|
264
|
+
thirdCriterion: cfg.thirdCriterion || cfg.thirdCriteria || {},
|
|
265
|
+
}
|
|
258
266
|
scrolltolower()
|
|
259
267
|
})
|
|
260
268
|
}
|
package/w-table/w-table.vue
CHANGED
|
@@ -89,8 +89,18 @@ watch(() => props.sourceId, (value) => {
|
|
|
89
89
|
// 获取页面配置
|
|
90
90
|
function getPageConfig() {
|
|
91
91
|
pageConfig(sourceId.value).then(async(res: any) => {
|
|
92
|
-
|
|
93
|
-
|
|
92
|
+
// 字段名映射:API返回criterias/primaryCriteria,组件使用criteria/primaryCriterion
|
|
93
|
+
const cfg = res.data.ltmplConfig
|
|
94
|
+
pageData.value = {
|
|
95
|
+
criteria: cfg.criterias || cfg.criteria || [],
|
|
96
|
+
buttons: cfg.buttons || [],
|
|
97
|
+
primaryCriterion: cfg.primaryCriterion || cfg.primaryCriteria || {},
|
|
98
|
+
defaultCriteriaValue: cfg.defaultCriteriaValue || {},
|
|
99
|
+
secondCriterion: cfg.secondCriterion || cfg.secondCriteria || {},
|
|
100
|
+
thirdCriterion: cfg.thirdCriterion || cfg.thirdCriteria || {},
|
|
101
|
+
...cfg
|
|
102
|
+
}
|
|
103
|
+
console.log(pageData.value,'322222')
|
|
94
104
|
//获取枚举
|
|
95
105
|
Enumcolumn.value=await getEnumer(pageData.value)
|
|
96
106
|
})
|
|
@@ -167,7 +177,7 @@ defineExpose({
|
|
|
167
177
|
<view v-if="props.showSearch">
|
|
168
178
|
<view >
|
|
169
179
|
<!-- 搜索 -->
|
|
170
|
-
<wSearch :primaryCriterion="pageData.
|
|
180
|
+
<wSearch :primaryCriterion="pageData.primaryCriterion" :criteria="pageData.criteria" @search="search" v-if="pageData.buttons.includes('query')">
|
|
171
181
|
</wSearch>
|
|
172
182
|
|
|
173
183
|
</view>
|