w-ui-v1 1.0.33 → 1.0.35
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/index.ts +1 -1
- package/package.json +1 -1
- package/w-add/w-add.vue +1 -1
- package/w-card/w-card.vue +22 -11
- package/w-edit/w-edit.vue +2 -2
- package/w-login/w-login.vue +50 -26
- package/w-menu/w-menu.vue +16 -2
- /package/{w-table/w-selectTable.vue → w-select-table/w-select-table.vue} +0 -0
package/index.ts
CHANGED
|
@@ -10,7 +10,7 @@ import wAdd from './w-add/w-add.vue'
|
|
|
10
10
|
import WSearch from './w-search/w-search.vue'
|
|
11
11
|
import WUser from './w-user/w-user.vue'
|
|
12
12
|
import wEdit from './w-edit/w-edit.vue'
|
|
13
|
-
import WSelectTable from './w-table/w-
|
|
13
|
+
import WSelectTable from './w-select-table/w-select-table.vue'
|
|
14
14
|
import WFormMessageBox from './w-form-message-box/w-form-message-box.vue'
|
|
15
15
|
import WAudio from './w-audio/w-audio.vue'
|
|
16
16
|
const coms: any[] = [
|
package/package.json
CHANGED
package/w-add/w-add.vue
CHANGED
|
@@ -58,7 +58,7 @@ export default {
|
|
|
58
58
|
</wd-collapse-item>
|
|
59
59
|
</wd-collapse>
|
|
60
60
|
<view class="footer-button">
|
|
61
|
-
<wd-button block @click="handleSubmit" icon="save">保存</wd-button>
|
|
61
|
+
<wd-button :round="false" block @click="handleSubmit" icon="save">保存</wd-button>
|
|
62
62
|
</view>
|
|
63
63
|
</view>
|
|
64
64
|
<wd-message-box />
|
package/w-card/w-card.vue
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
//在自定义组件中使用 Wot Design Uni 组件时,需开启styleIsolation: 'shared'选项覆盖样式
|
|
3
|
+
export default {
|
|
4
|
+
options: {
|
|
5
|
+
styleIsolation: 'shared'//使css :deep()生效
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
1
9
|
<script setup lang="ts">
|
|
2
10
|
import WFormMessageBox from '../w-form-message-box/w-form-message-box.vue'
|
|
3
11
|
import {
|
|
@@ -210,7 +218,7 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
210
218
|
|
|
211
219
|
<template>
|
|
212
220
|
<wd-card
|
|
213
|
-
:title="getTitleValue(visibleItems.find((item) => item.id === page.primaryColumn?.id), page.primaryColumn?.title) || ' '">
|
|
221
|
+
:title="getTitleValue(visibleItems.find((item) => item.id === page.primaryColumn?.id), page.primaryColumn?.title) || ' '" custom-title-class="card-title-class">
|
|
214
222
|
<view class="table_collapse">
|
|
215
223
|
<view v-for="(item, index) in visibleItems" :key="index" class="cloum">
|
|
216
224
|
|
|
@@ -245,7 +253,7 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
245
253
|
item.content }}</view>
|
|
246
254
|
</view>
|
|
247
255
|
|
|
248
|
-
<view v-else-if="Array.isArray(item.content)">
|
|
256
|
+
<view v-else-if="Array.isArray(item.content)" class="value">
|
|
249
257
|
<view v-for="(subItem, subIndex) in item.content" :key="subIndex">
|
|
250
258
|
<text> {{ subItem.label }}</text>
|
|
251
259
|
</view>
|
|
@@ -264,23 +272,23 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
264
272
|
</view>
|
|
265
273
|
<template #footer>
|
|
266
274
|
<view class="btns-box">
|
|
267
|
-
<wd-button size="small" class="btn"
|
|
275
|
+
<wd-button :round="false" size="small" class="btn" v-if="props.page.buttons.includes('detail')" @click="goto('detail')">
|
|
268
276
|
详情
|
|
269
277
|
</wd-button>
|
|
270
|
-
<wd-button type="warning" size="small" class="btn"
|
|
278
|
+
<wd-button :round="false" type="warning" size="small" class="btn" v-if="props.page.buttons.includes('dtmplEdit')"
|
|
271
279
|
@click="goto('edit')">
|
|
272
280
|
编辑
|
|
273
281
|
</wd-button>
|
|
274
|
-
<wd-button size="small" class="btn"
|
|
282
|
+
<wd-button :round="false" size="small" class="btn" type="error" @click="delerelation"
|
|
275
283
|
v-if="props.actionType === 'relation'">
|
|
276
284
|
删除
|
|
277
285
|
</wd-button>
|
|
278
|
-
<wd-button size="small" class="btn"
|
|
286
|
+
<wd-button :round="false" size="small" class="btn" type="error" @click="dele"
|
|
279
287
|
v-else-if="props.page.buttons.includes('singleDelete')">
|
|
280
288
|
删除
|
|
281
289
|
</wd-button>
|
|
282
|
-
<view v-if="moreBtns.length > 0">
|
|
283
|
-
<wd-button type='info' size="small"
|
|
290
|
+
<view :round="false" v-if="moreBtns.length > 0">
|
|
291
|
+
<wd-button :round="false" type='info' size="small" @click="showMoreButns = true">
|
|
284
292
|
更多
|
|
285
293
|
</wd-button>
|
|
286
294
|
</view>
|
|
@@ -307,9 +315,9 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
307
315
|
transition: all 0.3s ease;
|
|
308
316
|
overflow: hidden;
|
|
309
317
|
max-height: 100px;
|
|
310
|
-
color: #
|
|
318
|
+
color: #A6A6A6;
|
|
311
319
|
// border-bottom: 1px solid #e8e5e5;
|
|
312
|
-
padding:
|
|
320
|
+
padding: 8rpx 10rpx;
|
|
313
321
|
|
|
314
322
|
.lable {
|
|
315
323
|
white-space: nowrap;
|
|
@@ -357,9 +365,12 @@ const getTitleValue = (value: any, title: string) => {
|
|
|
357
365
|
.link {
|
|
358
366
|
color: #4d80f0;
|
|
359
367
|
}
|
|
368
|
+
|
|
360
369
|
|
|
361
370
|
}
|
|
362
|
-
|
|
371
|
+
:deep(.card-title-class){
|
|
372
|
+
font-weight: 700 !important;
|
|
373
|
+
}
|
|
363
374
|
.btn {
|
|
364
375
|
margin-left: 10rpx;
|
|
365
376
|
}
|
package/w-edit/w-edit.vue
CHANGED
|
@@ -61,7 +61,7 @@ export default {
|
|
|
61
61
|
</wd-collapse-item>
|
|
62
62
|
</wd-collapse>
|
|
63
63
|
<view class="footer-button">
|
|
64
|
-
<wd-button block @click="handleSubmit" icon="save">保存</wd-button>
|
|
64
|
+
<wd-button block @click="handleSubmit" icon="save" :round="false">保存</wd-button>
|
|
65
65
|
</view>
|
|
66
66
|
</view>
|
|
67
67
|
<wd-message-box />
|
|
@@ -82,7 +82,7 @@ export default {
|
|
|
82
82
|
<script setup lang="ts">
|
|
83
83
|
import wCard from '../w-card/w-card.vue'
|
|
84
84
|
import wFromControl from '../w-form-control/w-form-control.vue'
|
|
85
|
-
import WSelectTable from '../w-table/w-
|
|
85
|
+
import WSelectTable from '../w-select-table/w-select-table.vue';
|
|
86
86
|
import { onLoad, onUnload } from '@dcloudio/uni-app'
|
|
87
87
|
import { ref, defineProps, reactive, watch } from 'vue';
|
|
88
88
|
import {
|
package/w-login/w-login.vue
CHANGED
|
@@ -77,39 +77,54 @@ function handleSubmit() {
|
|
|
77
77
|
|
|
78
78
|
<template>
|
|
79
79
|
<view class="login">
|
|
80
|
-
<
|
|
81
|
-
|
|
82
|
-
<
|
|
83
|
-
<
|
|
84
|
-
<
|
|
85
|
-
<
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
<wd-form ref="form" :model="model">
|
|
92
|
-
<wd-cell-group>
|
|
93
|
-
<wd-input v-model="model.username" label="用户名" label-width="100px" prop="username" clearable
|
|
94
|
-
placeholder="请输入用户名" :rules="[{ required: true, message: '请填写用户名' }]" />
|
|
95
|
-
<wd-input v-model="model.password" label="密码" label-width="100px" prop="password" show-password clearable
|
|
96
|
-
placeholder="请输入密码" :rules="[{ required: true, message: '请填写密码' }]" />
|
|
97
|
-
</wd-cell-group>
|
|
98
|
-
<view class="footer">
|
|
99
|
-
<wd-button type="primary" block @click="handleSubmit">
|
|
100
|
-
登录
|
|
101
|
-
</wd-button>
|
|
80
|
+
<view class="form-box">
|
|
81
|
+
<WSwitchLang v-if="props.langSwitch" />
|
|
82
|
+
<view v-if="props.loginImge" class="avatar">
|
|
83
|
+
<wd-img width="200rpx" height="200rpx" :src="props.loginImge">
|
|
84
|
+
<template #error>
|
|
85
|
+
<view class="error-wrap">
|
|
86
|
+
<wd-icon name="image" size="200rpx" color="#ccc" />
|
|
87
|
+
</view>
|
|
88
|
+
</template>
|
|
89
|
+
</wd-img>
|
|
102
90
|
</view>
|
|
103
|
-
|
|
91
|
+
|
|
92
|
+
<wd-form ref="form" :model="model">
|
|
93
|
+
<wd-cell-group border>
|
|
94
|
+
<wd-input v-model="model.username" label="用户名" label-width="100px" prop="username" clearable
|
|
95
|
+
placeholder="请输入用户名" :rules="[{ required: true, message: '请填写用户名' }]" />
|
|
96
|
+
<wd-input v-model="model.password" label="密码" label-width="100px" prop="password" show-password clearable
|
|
97
|
+
placeholder="请输入密码" :rules="[{ required: true, message: '请填写密码' }]" />
|
|
98
|
+
</wd-cell-group>
|
|
99
|
+
<view class="footer">
|
|
100
|
+
<wd-button type="primary" block :round="false" @click="handleSubmit">
|
|
101
|
+
登录
|
|
102
|
+
</wd-button>
|
|
103
|
+
</view>
|
|
104
|
+
</wd-form>
|
|
105
|
+
</view>
|
|
106
|
+
<image class="footer-img" src="/static/智能12.png" ></image>
|
|
104
107
|
<wd-toast />
|
|
105
108
|
</view>
|
|
106
109
|
</template>
|
|
107
110
|
|
|
108
111
|
<style scoped lang="scss">
|
|
109
112
|
.login {
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
+
height: calc(100vh - 44px);
|
|
114
|
+
position: relative;
|
|
115
|
+
//设置背景颜色#4d80f0 由上到下逐渐变浅
|
|
116
|
+
background: linear-gradient(to bottom, #4d80f0 30%, #2c5def 70%);
|
|
117
|
+
.form-box{
|
|
118
|
+
padding: 20rpx;
|
|
119
|
+
background-color: #fff;
|
|
120
|
+
border-radius: 8px;
|
|
121
|
+
z-index: 1;
|
|
122
|
+
position: absolute;
|
|
123
|
+
left: 50%;
|
|
124
|
+
top: 30%;
|
|
125
|
+
transform: translate(-50%, -50%);
|
|
126
|
+
width: 650rpx;
|
|
127
|
+
.lang {
|
|
113
128
|
display: flex;
|
|
114
129
|
justify-content: flex-end;
|
|
115
130
|
}
|
|
@@ -122,5 +137,14 @@ function handleSubmit() {
|
|
|
122
137
|
.footer {
|
|
123
138
|
padding: 12px;
|
|
124
139
|
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
.footer-img{
|
|
144
|
+
position: absolute;
|
|
145
|
+
bottom: 0;
|
|
146
|
+
left: 50%;
|
|
147
|
+
transform: translateX(-50%);
|
|
148
|
+
}
|
|
125
149
|
}
|
|
126
150
|
</style>
|
package/w-menu/w-menu.vue
CHANGED
|
@@ -1,3 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
//在自定义组件中使用 Wot Design Uni 组件时,需开启styleIsolation: 'shared'选项覆盖样式
|
|
3
|
+
export default {
|
|
4
|
+
options: {
|
|
5
|
+
styleIsolation: 'shared'//使css :deep()生效
|
|
6
|
+
}
|
|
7
|
+
}
|
|
8
|
+
</script>
|
|
1
9
|
<script setup lang="ts">
|
|
2
10
|
import { cloneDeep } from 'lodash-es'
|
|
3
11
|
import {
|
|
@@ -125,7 +133,8 @@ function queryList() {
|
|
|
125
133
|
</template>
|
|
126
134
|
<view>
|
|
127
135
|
<view v-if="filtermenu.length > 0" class="menu-list">
|
|
128
|
-
<wd-card v-for="(item, index) in filtermenu" :key="index" :title="item.title"
|
|
136
|
+
<wd-card v-for="(item, index) in filtermenu" :key="index" :title="item.title"
|
|
137
|
+
custom-title-class="menu-title-class">
|
|
129
138
|
<template #default>
|
|
130
139
|
<wd-grid :column="4" :clickable="true">
|
|
131
140
|
<wd-grid-item use-slot v-for="(subItem, subIndex) in item.items" :key="subIndex"
|
|
@@ -195,8 +204,13 @@ function queryList() {
|
|
|
195
204
|
|
|
196
205
|
}
|
|
197
206
|
|
|
207
|
+
:deep(.menu-title-class) {
|
|
208
|
+
font-weight: 700 !important;
|
|
209
|
+
}
|
|
210
|
+
|
|
198
211
|
.menu-list {
|
|
199
212
|
padding: 12px 0 1px 0;
|
|
200
|
-
background-color: #F6F7FB;
|
|
213
|
+
// background-color: #F6F7FB;
|
|
214
|
+
background: linear-gradient(to top, #F6F7FB 80%, #2c5def 100%);
|
|
201
215
|
}
|
|
202
216
|
</style>
|
|
File without changes
|