w-ui-v1 1.0.48 → 1.0.50
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 +1 -1
- package/utils/http.ts +2 -1
- package/w-card/w-card.vue +2 -2
- package/w-detail/w-detail.vue +3 -4
- package/w-form-control/w-form-control.vue +7 -0
- package/w-search/w-search.vue +11 -3
package/package.json
CHANGED
package/utils/http.ts
CHANGED
|
@@ -4,6 +4,7 @@ export default function request(options: any): Promise<any> {
|
|
|
4
4
|
const hydrocarbonProgramToken = uni.getStorageSync('hydrocarbonProgramToken') || ''
|
|
5
5
|
const token = uni.getStorageSync('token') || ''
|
|
6
6
|
const header = options.header || {}
|
|
7
|
+
const hydrocarbonClient=uni.getStorageSync('hydrocarbonClient') ||"MOBILE"
|
|
7
8
|
return new Promise((resolve, reject) => {
|
|
8
9
|
uni.request({
|
|
9
10
|
url: baseUrl + options.url,
|
|
@@ -13,7 +14,7 @@ export default function request(options: any): Promise<any> {
|
|
|
13
14
|
'content-type': 'application/x-www-form-urlencoded',
|
|
14
15
|
'hydrocarbon-program-token': hydrocarbonProgramToken, // 项目code
|
|
15
16
|
'hydrocarbon-token': token, // 登录token
|
|
16
|
-
'hydrocarbon-client':
|
|
17
|
+
'hydrocarbon-client': hydrocarbonClient,//端类型
|
|
17
18
|
// #ifdef APP-PLUS
|
|
18
19
|
'hydrocarbon-app-version': '1.0.0',
|
|
19
20
|
// #endif
|
package/w-card/w-card.vue
CHANGED
|
@@ -263,8 +263,8 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
263
263
|
</view>
|
|
264
264
|
</view>
|
|
265
265
|
|
|
266
|
-
<view v-else class="value">
|
|
267
|
-
|
|
266
|
+
<view v-else class="value" v-html="item.content?.label ? item.content?.label : item.content">
|
|
267
|
+
|
|
268
268
|
</view>
|
|
269
269
|
|
|
270
270
|
</view>
|
package/w-detail/w-detail.vue
CHANGED
|
@@ -167,11 +167,10 @@ function goto(type = '', PItem: any, item: any) {
|
|
|
167
167
|
<text> {{ bItem.label }}</text>
|
|
168
168
|
</view>
|
|
169
169
|
</view>
|
|
170
|
-
<view v-else class="value"
|
|
171
|
-
{{
|
|
172
|
-
getValue(pageData.fieldMap[subItem.sourceId], subItem.title)?.label ?
|
|
170
|
+
<view v-else class="value" v-html="getValue(pageData.fieldMap[subItem.sourceId], subItem.title)?.label ?
|
|
173
171
|
getValue(pageData.fieldMap[subItem.sourceId], subItem.title)?.label :
|
|
174
|
-
getValue(pageData.fieldMap[subItem.sourceId], subItem.title)
|
|
172
|
+
getValue(pageData.fieldMap[subItem.sourceId], subItem.title)">
|
|
173
|
+
|
|
175
174
|
</view>
|
|
176
175
|
|
|
177
176
|
</view>
|
|
@@ -44,6 +44,13 @@
|
|
|
44
44
|
:file-list="modelValue" :disabled="subItem.disabled" :action="`${baseUrl}/v3/upload`"
|
|
45
45
|
@success="success"></wd-upload>
|
|
46
46
|
</wd-cell>
|
|
47
|
+
<wd-cell v-else-if="subItem.extControlType === 'html'"
|
|
48
|
+
:rules="[{ required: subItem.required, message: `请输入${subItem.title}` }]" :title="subItem.title"
|
|
49
|
+
title-width="100px" :prop="subItem.id">
|
|
50
|
+
<editor id="editor" class="ql-container" :placeholder="`请输入${subItem.title}`" show-img-size show-img-toolbar
|
|
51
|
+
show-img-resize :read-only="false" @input="({html, text, delta}) => { change({value:html}) }">
|
|
52
|
+
</editor>
|
|
53
|
+
</wd-cell>
|
|
47
54
|
<wd-input v-else :disabled="subItem.disabled" :label="subItem.title" label-width="100px" :prop="subItem.id"
|
|
48
55
|
clearable :modelValue="modelValue" :placeholder="subItem.disabled ? '无需输入' : `请输入${subItem.title}`"
|
|
49
56
|
:rules="[{ required: subItem.required, message: `请填写${subItem.title}` }]" @input="(e) => { change(e) }"
|
package/w-search/w-search.vue
CHANGED
|
@@ -22,11 +22,19 @@
|
|
|
22
22
|
</view>
|
|
23
23
|
|
|
24
24
|
<view v-else-if="item.controlType === 'datetime'">
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
<wd-calendar v-else-if="item.extControlType === 'daterange'" :type="item.extControlType"
|
|
25
|
+
|
|
26
|
+
<wd-calendar v-if="item.extControlType === 'daterange'" :type="item.extControlType"
|
|
28
27
|
:label="item.title" v-model="searchData[item.sourceId]" clearable />
|
|
28
|
+
<wd-calendar v-else :label="item.title"
|
|
29
|
+
v-model="searchData[item.sourceId]" clearable type="datetime" />
|
|
29
30
|
</view>
|
|
31
|
+
|
|
32
|
+
<view v-else-if="item.controlType === 'date'">
|
|
33
|
+
<wd-calendar v-if="item.extControlType === 'daterange'" :type="item.extControlType"
|
|
34
|
+
:label="item.title" v-model="searchData[item.sourceId]" clearable />
|
|
35
|
+
<wd-calendar v-else :type="item.extControlType"
|
|
36
|
+
:label="item.title" v-model="searchData[item.sourceId]" clearable />
|
|
37
|
+
</view>
|
|
30
38
|
|
|
31
39
|
<wd-input v-else type="text" :label="item.title" v-model="searchData[item.sourceId]"
|
|
32
40
|
:placeholder="`请输入${item.title}`" clearable />
|