w-ui-v1 1.1.46 → 1.1.48
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
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "w-ui-v1",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.48",
|
|
4
4
|
"description": "w-ui",
|
|
5
5
|
"author": "wgxshh",
|
|
6
6
|
"license": "ISC",
|
|
7
7
|
"main": "index.ts",
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"registry": "https://registry.npmjs.org/"
|
|
10
|
+
},
|
|
11
11
|
"peerDependencies": {
|
|
12
12
|
"@wot-ui/ui": "^2.0.0",
|
|
13
13
|
"z-paging": "^2.8.5",
|
|
@@ -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>
|