wui-components-v2 1.1.50 → 1.1.51
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.
|
@@ -191,6 +191,7 @@ defineExpose({
|
|
|
191
191
|
:readonly="item.disabled || item.rowEditType === 'readonly'"
|
|
192
192
|
:clearable="!item.disabled"
|
|
193
193
|
:placeholder="`请输入${item.title}`"
|
|
194
|
+
:class="{ 'disabled-input': item.disabled || item.rowEditType === 'readonly'}"
|
|
194
195
|
/>
|
|
195
196
|
</wd-form-item>
|
|
196
197
|
<wd-form-item
|
|
@@ -413,4 +414,7 @@ defineExpose({
|
|
|
413
414
|
border-top: none;
|
|
414
415
|
}
|
|
415
416
|
}
|
|
417
|
+
:deep(.disabled-input) {
|
|
418
|
+
background-color: #e8e8e8 !important;
|
|
419
|
+
}
|
|
416
420
|
</style>
|
|
@@ -11,6 +11,7 @@ import navbar from './components/navbar.vue'
|
|
|
11
11
|
import quickPanel from './components/quick-panel.vue'
|
|
12
12
|
import bannerCarousel from './components/banner-carousel.vue'
|
|
13
13
|
import searchBar from './components/search-bar.vue'
|
|
14
|
+
import '../../static/iconfont/iconfont.css'
|
|
14
15
|
|
|
15
16
|
defineOptions({
|
|
16
17
|
name: 'WuiMenus1',
|
|
@@ -63,7 +64,7 @@ const {
|
|
|
63
64
|
<!-- 统计 -->
|
|
64
65
|
<quickPanel />
|
|
65
66
|
<!-- 消息 -->
|
|
66
|
-
<wuiNotifyInfo />
|
|
67
|
+
<!-- <wuiNotifyInfo /> -->
|
|
67
68
|
|
|
68
69
|
<!-- 菜单卡片列表 -->
|
|
69
70
|
<view class="menu-section">
|
|
@@ -98,7 +99,7 @@ const {
|
|
|
98
99
|
:style="{ background: subItem.color }"
|
|
99
100
|
>
|
|
100
101
|
<text
|
|
101
|
-
class="menu-icon text-xl"
|
|
102
|
+
class="menu-icon !text-xl iconfont"
|
|
102
103
|
:class="[subItem.appIcon || 'i-carbon:grid']"
|
|
103
104
|
/>
|
|
104
105
|
<view class="icon-shine" />
|
|
@@ -23,22 +23,31 @@ export function useCompanyFieldFilter(
|
|
|
23
23
|
{ deep: true, immediate: true },
|
|
24
24
|
)
|
|
25
25
|
|
|
26
|
+
// 直接监听 model 中对应字段的值变化
|
|
27
|
+
// 使用计算属性做中间层,确保 deliveryCompanySourceId 变化时重新建立依赖
|
|
28
|
+
const companyFieldValue = computed(() => {
|
|
29
|
+
const sourceId = deliveryCompanySourceId.value
|
|
30
|
+
if (!sourceId) return undefined
|
|
31
|
+
return model.value[sourceId]
|
|
32
|
+
})
|
|
33
|
+
|
|
26
34
|
watch(
|
|
27
|
-
|
|
35
|
+
companyFieldValue,
|
|
28
36
|
(newValue) => {
|
|
29
|
-
selectedCompany.value = newValue ? newValue.substring(0, 2) : ''
|
|
37
|
+
selectedCompany.value = newValue ? String(newValue).substring(0, 2) : ''
|
|
30
38
|
},
|
|
31
39
|
{ immediate: true },
|
|
32
40
|
)
|
|
33
41
|
}
|
|
34
42
|
|
|
35
43
|
const filteredFields = computed(() => {
|
|
44
|
+
const company = selectedCompany.value
|
|
36
45
|
const allFields = fieldGroup()?.fields
|
|
37
46
|
if (!allFields)
|
|
38
47
|
return []
|
|
39
48
|
return allFields.filter((item: any) => {
|
|
40
49
|
// 如果没有选中公司,所有字段都显示
|
|
41
|
-
if (!
|
|
50
|
+
if (!company) {
|
|
42
51
|
return true
|
|
43
52
|
}
|
|
44
53
|
// 检查 usableRuleCriterias 是否存在且有值
|
|
@@ -49,11 +58,15 @@ export function useCompanyFieldFilter(
|
|
|
49
58
|
const transDefaultValue = item.usableRuleCriterias[0]?.transDefaultValue
|
|
50
59
|
if (typeof transDefaultValue === 'string') {
|
|
51
60
|
const values = transDefaultValue.split(',').map(v => v.trim())
|
|
52
|
-
|
|
61
|
+
// console.log('transDefaultValue', company, 'values', values,values.includes(company))
|
|
62
|
+
return values.some(v => v.includes(company) )
|
|
53
63
|
}
|
|
54
64
|
return true
|
|
55
65
|
})
|
|
56
66
|
})
|
|
67
|
+
watch(filteredFields, (val) => {
|
|
68
|
+
// console.log('filteredFields变化了', val, 'selectedCompany:', selectedCompany.value)
|
|
69
|
+
}, { immediate: true })
|
|
57
70
|
|
|
58
71
|
return { filteredFields, selectedCompany }
|
|
59
72
|
}
|
package/index.ts
CHANGED
|
@@ -27,6 +27,7 @@ import WuiAutoUpdateComponent from './components/wui-auto-update-component/wui-a
|
|
|
27
27
|
import iData from './utils/idata-scan'// PAD扫描
|
|
28
28
|
import wuiSearchHistoryBabbar from './components/wui-search-history-babbar/wui-search-history-babbar.vue'
|
|
29
29
|
import wuienumeSelectControl from './components/wui-enume-select-control/wui-enume-select-control.vue'
|
|
30
|
+
import './static/iconfont/iconfont.css'
|
|
30
31
|
// 组件列表
|
|
31
32
|
const coms: Array<{ name: string }> = [
|
|
32
33
|
WuiSystemSettings,
|
package/package.json
CHANGED
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@font-face {
|
|
2
|
+
font-family: "iconfont"; /* Project id 5037136 */
|
|
3
|
+
src: url('//at.alicdn.com/t/c/font_5037136_thr8wd358sl.woff2?t=1779959533840') format('woff2'),
|
|
4
|
+
url('//at.alicdn.com/t/c/font_5037136_thr8wd358sl.woff?t=1779959533840') format('woff'),
|
|
5
|
+
url('//at.alicdn.com/t/c/font_5037136_thr8wd358sl.ttf?t=1779959533840') format('truetype');
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
.iconfont {
|
|
9
|
+
font-family: "iconfont" !important;
|
|
10
|
+
font-size: 16px;
|
|
11
|
+
font-style: normal;
|
|
12
|
+
-webkit-font-smoothing: antialiased;
|
|
13
|
+
-moz-osx-font-smoothing: grayscale;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.icon-tingchewei:before {
|
|
17
|
+
content: "\e664";
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
.icon-quanxian:before {
|
|
21
|
+
content: "\e63f";
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
.icon-gongwei:before {
|
|
25
|
+
content: "\e641";
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
.icon-weixiu:before {
|
|
29
|
+
content: "\e690";
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
.icon-bumen:before {
|
|
33
|
+
content: "\e686";
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
.icon-shengchanjidi:before {
|
|
37
|
+
content: "\e63b";
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
.icon-shouye:before {
|
|
41
|
+
content: "\e63c";
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
.icon-renyuan:before {
|
|
45
|
+
content: "\e66c";
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
.icon-apply:before {
|
|
49
|
+
content: "\e61c";
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
.icon-changquguanli:before {
|
|
53
|
+
content: "\e607";
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
.icon-kuaidi:before {
|
|
57
|
+
content: "\e6c0";
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
.icon-menu:before {
|
|
61
|
+
content: "\e677";
|
|
62
|
+
}
|
|
63
|
+
|