zydx-plus 1.32.305 → 1.32.307
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/src/components/biz_header/src/button_name.js +100 -28
- package/src/components/biz_taskInfo/src/bizTaskInfo.vue +9 -5
- package/src/components/choice/src/choice.vue +7 -3
- package/src/components/menu/index.js +7 -0
- package/src/components/menu/src/menu.vue +140 -0
- package/src/components/menu/src/menuList.vue +35 -0
- package/src/components/seek/src/word.css +3 -0
- package/src/index.js +1 -1
package/package.json
CHANGED
|
@@ -1927,7 +1927,10 @@ let buttonNames = {
|
|
|
1927
1927
|
},
|
|
1928
1928
|
lowLevel: {
|
|
1929
1929
|
default: "singletonClass",
|
|
1930
|
-
singletonClass: this.getCurrentPrefix(item) + '试题',
|
|
1930
|
+
// singletonClass: this.getCurrentPrefix(item) + '试题',
|
|
1931
|
+
createResource: '创建资源',
|
|
1932
|
+
viewResource: '查看资源',
|
|
1933
|
+
batchDelResource: '批量删除',
|
|
1931
1934
|
}
|
|
1932
1935
|
}
|
|
1933
1936
|
}
|
|
@@ -1950,7 +1953,10 @@ let buttonNames = {
|
|
|
1950
1953
|
},
|
|
1951
1954
|
lowLevel: {
|
|
1952
1955
|
default: "singletonClass",
|
|
1953
|
-
singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
1956
|
+
// singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
1957
|
+
createResource: '创建资源',
|
|
1958
|
+
viewResource: '查看资源',
|
|
1959
|
+
batchDelResource: '批量删除',
|
|
1954
1960
|
}
|
|
1955
1961
|
}
|
|
1956
1962
|
}
|
|
@@ -1974,7 +1980,10 @@ let buttonNames = {
|
|
|
1974
1980
|
},
|
|
1975
1981
|
lowLevel: {
|
|
1976
1982
|
default: "singletonClass",
|
|
1977
|
-
singletonClass: this.getCurrentPrefix(item) + '主题'
|
|
1983
|
+
// singletonClass: this.getCurrentPrefix(item) + '主题'
|
|
1984
|
+
createResource: '创建主题',
|
|
1985
|
+
viewResource: '主题列表',
|
|
1986
|
+
selectResource: '查找资源',
|
|
1978
1987
|
}
|
|
1979
1988
|
}
|
|
1980
1989
|
}
|
|
@@ -2012,7 +2021,10 @@ let buttonNames = {
|
|
|
2012
2021
|
},
|
|
2013
2022
|
lowLevel: {
|
|
2014
2023
|
default: "singletonClass",
|
|
2015
|
-
singletonClass: this.getCurrentPrefix(item) + '问题'
|
|
2024
|
+
// singletonClass: this.getCurrentPrefix(item) + '问题'
|
|
2025
|
+
createResource: '创建提问',
|
|
2026
|
+
viewResource: '提问列表',
|
|
2027
|
+
selectResource: '查找资源',
|
|
2016
2028
|
}
|
|
2017
2029
|
}
|
|
2018
2030
|
}
|
|
@@ -2036,7 +2048,10 @@ let buttonNames = {
|
|
|
2036
2048
|
},
|
|
2037
2049
|
lowLevel: {
|
|
2038
2050
|
default: "singletonClass",
|
|
2039
|
-
singletonClass: this.getCurrentPrefix(item) + '提问'
|
|
2051
|
+
// singletonClass: this.getCurrentPrefix(item) + '提问'
|
|
2052
|
+
createResource: '创建提问',
|
|
2053
|
+
viewResource: '提问列表',
|
|
2054
|
+
selectResource: '查找资源',
|
|
2040
2055
|
}
|
|
2041
2056
|
}
|
|
2042
2057
|
}
|
|
@@ -2074,7 +2089,10 @@ let buttonNames = {
|
|
|
2074
2089
|
},
|
|
2075
2090
|
lowLevel: {
|
|
2076
2091
|
default: "singletonClass",
|
|
2077
|
-
singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2092
|
+
// singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2093
|
+
createResource: '创建题目',
|
|
2094
|
+
viewResource: '题目列表',
|
|
2095
|
+
selectResource: '查找资源',
|
|
2078
2096
|
}
|
|
2079
2097
|
}
|
|
2080
2098
|
}
|
|
@@ -2098,7 +2116,10 @@ let buttonNames = {
|
|
|
2098
2116
|
},
|
|
2099
2117
|
lowLevel: {
|
|
2100
2118
|
default: "singletonClass",
|
|
2101
|
-
singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2119
|
+
// singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2120
|
+
createResource: '创建题目',
|
|
2121
|
+
viewResource: '题目列表',
|
|
2122
|
+
selectResource: '查找资源',
|
|
2102
2123
|
}
|
|
2103
2124
|
}
|
|
2104
2125
|
}
|
|
@@ -2122,7 +2143,10 @@ let buttonNames = {
|
|
|
2122
2143
|
},
|
|
2123
2144
|
lowLevel: {
|
|
2124
2145
|
default: "singletonClass",
|
|
2125
|
-
singletonClass: this.getCurrentPrefix(item) + '主题'
|
|
2146
|
+
// singletonClass: this.getCurrentPrefix(item) + '主题'
|
|
2147
|
+
createResource: '创建主题',
|
|
2148
|
+
viewResource: '主题列表',
|
|
2149
|
+
selectResource: '查找资源',
|
|
2126
2150
|
}
|
|
2127
2151
|
}
|
|
2128
2152
|
}
|
|
@@ -2145,7 +2169,10 @@ let buttonNames = {
|
|
|
2145
2169
|
},
|
|
2146
2170
|
lowLevel: {
|
|
2147
2171
|
default: "singletonClass",
|
|
2148
|
-
singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
2172
|
+
// singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
2173
|
+
createResource: '创建资源',
|
|
2174
|
+
viewResource: '查看资源',
|
|
2175
|
+
batchDelResource: '批量删除',
|
|
2149
2176
|
}
|
|
2150
2177
|
}
|
|
2151
2178
|
}
|
|
@@ -2169,7 +2196,10 @@ let buttonNames = {
|
|
|
2169
2196
|
},
|
|
2170
2197
|
lowLevel: {
|
|
2171
2198
|
default: "singletonClass",
|
|
2172
|
-
singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2199
|
+
// singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2200
|
+
createResource: '创建题目',
|
|
2201
|
+
viewResource: '题目列表',
|
|
2202
|
+
selectResource: '查找资源',
|
|
2173
2203
|
}
|
|
2174
2204
|
}
|
|
2175
2205
|
}
|
|
@@ -2193,7 +2223,10 @@ let buttonNames = {
|
|
|
2193
2223
|
},
|
|
2194
2224
|
lowLevel: {
|
|
2195
2225
|
default: "singletonClass",
|
|
2196
|
-
singletonClass: this.getCurrentPrefix(item) + '任务'
|
|
2226
|
+
// singletonClass: this.getCurrentPrefix(item) + '任务'
|
|
2227
|
+
createResource: '创建任务',
|
|
2228
|
+
viewResource: '任务列表',
|
|
2229
|
+
selectResource: '查找任务',
|
|
2197
2230
|
}
|
|
2198
2231
|
}
|
|
2199
2232
|
}
|
|
@@ -2231,7 +2264,10 @@ let buttonNames = {
|
|
|
2231
2264
|
},
|
|
2232
2265
|
lowLevel: {
|
|
2233
2266
|
default: "singletonClass",
|
|
2234
|
-
singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2267
|
+
// singletonClass: this.getCurrentPrefix(item) + '题目'
|
|
2268
|
+
createResource: '创建题目',
|
|
2269
|
+
viewResource: '题目列表',
|
|
2270
|
+
selectResource: '查找题目',
|
|
2235
2271
|
}
|
|
2236
2272
|
}
|
|
2237
2273
|
}
|
|
@@ -2255,7 +2291,10 @@ let buttonNames = {
|
|
|
2255
2291
|
},
|
|
2256
2292
|
lowLevel: {
|
|
2257
2293
|
default: "singletonClass",
|
|
2258
|
-
singletonClass: this.getCurrentPrefix(item) + '报告'
|
|
2294
|
+
// singletonClass: this.getCurrentPrefix(item) + '报告'
|
|
2295
|
+
createResource: '创建题目',
|
|
2296
|
+
viewResource: '题目列表',
|
|
2297
|
+
selectResource: '查找题目',
|
|
2259
2298
|
}
|
|
2260
2299
|
}
|
|
2261
2300
|
}
|
|
@@ -2309,7 +2348,10 @@ let buttonNames = {
|
|
|
2309
2348
|
},
|
|
2310
2349
|
lowLevel: {
|
|
2311
2350
|
default: "singletonClass",
|
|
2312
|
-
singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2351
|
+
// singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2352
|
+
createResource: '创建项目',
|
|
2353
|
+
viewResource: '项目列表',
|
|
2354
|
+
selectResource: '查找项目',
|
|
2313
2355
|
}
|
|
2314
2356
|
}
|
|
2315
2357
|
}
|
|
@@ -2334,7 +2376,10 @@ let buttonNames = {
|
|
|
2334
2376
|
},
|
|
2335
2377
|
lowLevel: {
|
|
2336
2378
|
default: "singletonClass",
|
|
2337
|
-
singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2379
|
+
// singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2380
|
+
createResource: '创建项目',
|
|
2381
|
+
viewResource: '项目列表',
|
|
2382
|
+
selectResource: '查找项目',
|
|
2338
2383
|
}
|
|
2339
2384
|
}
|
|
2340
2385
|
}
|
|
@@ -2346,7 +2391,7 @@ let buttonNames = {
|
|
|
2346
2391
|
headLevel: {
|
|
2347
2392
|
default: "demand",
|
|
2348
2393
|
demand: '项目要求',
|
|
2349
|
-
resourceIndex: '
|
|
2394
|
+
resourceIndex: '学习项目',
|
|
2350
2395
|
guideIndex: '指导意见',
|
|
2351
2396
|
review: '项目点评',
|
|
2352
2397
|
analyse: '项目分析',
|
|
@@ -2359,7 +2404,10 @@ let buttonNames = {
|
|
|
2359
2404
|
},
|
|
2360
2405
|
lowLevel: {
|
|
2361
2406
|
default: "singletonClass",
|
|
2362
|
-
singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2407
|
+
// singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2408
|
+
createResource: '创建项目',
|
|
2409
|
+
viewResource: '项目列表',
|
|
2410
|
+
selectResource: '查找项目',
|
|
2363
2411
|
}
|
|
2364
2412
|
}
|
|
2365
2413
|
}
|
|
@@ -2371,7 +2419,7 @@ let buttonNames = {
|
|
|
2371
2419
|
headLevel: {
|
|
2372
2420
|
default: "demand",
|
|
2373
2421
|
demand: '创新要求',
|
|
2374
|
-
resourceIndex: '
|
|
2422
|
+
resourceIndex: '创新主题',
|
|
2375
2423
|
guideIndex: '指导意见',
|
|
2376
2424
|
review: '创新点评',
|
|
2377
2425
|
analyse: '创新分析',
|
|
@@ -2379,12 +2427,15 @@ let buttonNames = {
|
|
|
2379
2427
|
},
|
|
2380
2428
|
otherLevel: {
|
|
2381
2429
|
default: "singletonClass",
|
|
2382
|
-
singletonClass: this.getCurrentPrefix(item) + '
|
|
2383
|
-
allClass: this.getPrefix(item) + '
|
|
2430
|
+
singletonClass: this.getCurrentPrefix(item) + '主题',
|
|
2431
|
+
allClass: this.getPrefix(item) + '主题'
|
|
2384
2432
|
},
|
|
2385
2433
|
lowLevel: {
|
|
2386
2434
|
default: "singletonClass",
|
|
2387
|
-
singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2435
|
+
// singletonClass: this.getCurrentPrefix(item) + '项目'
|
|
2436
|
+
createResource: '创建主题',
|
|
2437
|
+
viewResource: '主题列表',
|
|
2438
|
+
selectResource: '查找主题',
|
|
2388
2439
|
}
|
|
2389
2440
|
}
|
|
2390
2441
|
}
|
|
@@ -2407,7 +2458,10 @@ let buttonNames = {
|
|
|
2407
2458
|
},
|
|
2408
2459
|
lowLevel: {
|
|
2409
2460
|
default: "singletonClass",
|
|
2410
|
-
singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
2461
|
+
// singletonClass: this.getCurrentPrefix(item) + '试题'
|
|
2462
|
+
createResource: '创建资源',
|
|
2463
|
+
viewResource: '查看资源',
|
|
2464
|
+
batchDelResource: '批量删除',
|
|
2411
2465
|
}
|
|
2412
2466
|
}
|
|
2413
2467
|
}
|
|
@@ -2447,7 +2501,10 @@ let buttonNames = {
|
|
|
2447
2501
|
},
|
|
2448
2502
|
lowLevel: {
|
|
2449
2503
|
default: "btnIndex1",
|
|
2450
|
-
btnIndex1: this.getCurrentPrefix(item) + '图谱',
|
|
2504
|
+
// btnIndex1: this.getCurrentPrefix(item) + '图谱',
|
|
2505
|
+
createResource: '创建图谱',
|
|
2506
|
+
viewResource: '图谱列表',
|
|
2507
|
+
selectResource: '查找资源',
|
|
2451
2508
|
}
|
|
2452
2509
|
}
|
|
2453
2510
|
}
|
|
@@ -2468,7 +2525,10 @@ let buttonNames = {
|
|
|
2468
2525
|
},
|
|
2469
2526
|
lowLevel: {
|
|
2470
2527
|
default: "btnIndex1",
|
|
2471
|
-
btnIndex1: this.getCurrentPrefix(item) + '课件',
|
|
2528
|
+
// btnIndex1: this.getCurrentPrefix(item) + '课件',
|
|
2529
|
+
importResource: '导入课件',
|
|
2530
|
+
viewResource: '课件列表',
|
|
2531
|
+
selectResource: '查找资源',
|
|
2472
2532
|
}
|
|
2473
2533
|
}
|
|
2474
2534
|
}
|
|
@@ -2489,7 +2549,10 @@ let buttonNames = {
|
|
|
2489
2549
|
},
|
|
2490
2550
|
lowLevel: {
|
|
2491
2551
|
default: "btnIndex1",
|
|
2492
|
-
btnIndex1: this.getCurrentPrefix(item) + '视频',
|
|
2552
|
+
// btnIndex1: this.getCurrentPrefix(item) + '视频',
|
|
2553
|
+
importResource: '导入视频',
|
|
2554
|
+
viewResource: '视频列表',
|
|
2555
|
+
selectResource: '查找资源',
|
|
2493
2556
|
}
|
|
2494
2557
|
}
|
|
2495
2558
|
}
|
|
@@ -2510,7 +2573,10 @@ let buttonNames = {
|
|
|
2510
2573
|
},
|
|
2511
2574
|
lowLevel: {
|
|
2512
2575
|
default: "btnIndex1",
|
|
2513
|
-
btnIndex1: this.getCurrentPrefix(item) + '视频',
|
|
2576
|
+
// btnIndex1: this.getCurrentPrefix(item) + '视频',
|
|
2577
|
+
importResource: '导入视频',
|
|
2578
|
+
viewResource: '视频列表',
|
|
2579
|
+
selectResource: '查找资源',
|
|
2514
2580
|
}
|
|
2515
2581
|
}
|
|
2516
2582
|
}
|
|
@@ -2531,7 +2597,10 @@ let buttonNames = {
|
|
|
2531
2597
|
},
|
|
2532
2598
|
lowLevel: {
|
|
2533
2599
|
default: "btnIndex1",
|
|
2534
|
-
btnIndex1: this.getCurrentPrefix(item) + '数据',
|
|
2600
|
+
// btnIndex1: this.getCurrentPrefix(item) + '数据',
|
|
2601
|
+
importResource: '导入数据',
|
|
2602
|
+
viewResource: '数据列表',
|
|
2603
|
+
selectResource: '查找资源',
|
|
2535
2604
|
}
|
|
2536
2605
|
}
|
|
2537
2606
|
}
|
|
@@ -2552,7 +2621,10 @@ let buttonNames = {
|
|
|
2552
2621
|
},
|
|
2553
2622
|
lowLevel: {
|
|
2554
2623
|
default: "btnIndex1",
|
|
2555
|
-
btnIndex1: this.getCurrentPrefix(item) + '歌诀',
|
|
2624
|
+
// btnIndex1: this.getCurrentPrefix(item) + '歌诀',
|
|
2625
|
+
createResource: '创建歌诀',
|
|
2626
|
+
viewResource: '歌诀列表',
|
|
2627
|
+
selectResource: '查找资源',
|
|
2556
2628
|
}
|
|
2557
2629
|
}
|
|
2558
2630
|
}
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
<template v-if="!readonly">
|
|
16
16
|
<zydx-input v-model:value="info.examJoinTime"
|
|
17
17
|
:readonly="readonly"
|
|
18
|
-
:placeholder="'
|
|
18
|
+
:placeholder="'请输入时长'"
|
|
19
19
|
:border="!readonly"
|
|
20
20
|
:type="'number'">
|
|
21
21
|
<template #suffix>
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
</template>
|
|
44
44
|
<template v-else>
|
|
45
45
|
<zydx-input :value="dateFormat(info.endTime)"
|
|
46
|
-
:placeholder="'
|
|
46
|
+
:placeholder="'请选择日期'"
|
|
47
47
|
:readonly="readonly"
|
|
48
48
|
:border="!readonly"
|
|
49
49
|
:key="JSON.stringify(info.endTime)"
|
|
@@ -92,8 +92,8 @@
|
|
|
92
92
|
</div>
|
|
93
93
|
<div v-if="actionConfig[actionId].isShowVirtualScore" class="task_item_main" style="z-index: 1">
|
|
94
94
|
<div class="task_text_desc">虚仿成绩:</div>
|
|
95
|
-
<div class="width250">
|
|
96
|
-
<zydxSelect :color="'#000000'" :readonly="readonly" :options="virtualScoreOptions" v-model:value="virtualScore"></zydxSelect>
|
|
95
|
+
<div class="width250" title="操作虚仿软件所得成绩在该题总得分占比">
|
|
96
|
+
<zydxSelect :color="'#000000'" :readonly="readonly" :placeholder="'操作虚仿软件所得成绩在该题...'" :options="virtualScoreOptions" v-model:value="virtualScore"></zydxSelect>
|
|
97
97
|
</div>
|
|
98
98
|
</div>
|
|
99
99
|
<div class="default_item_main width100" >
|
|
@@ -765,7 +765,7 @@
|
|
|
765
765
|
screenLimit: '0',
|
|
766
766
|
funDisable: '0',
|
|
767
767
|
round: 1,
|
|
768
|
-
virtualScore: '
|
|
768
|
+
virtualScore: ''
|
|
769
769
|
}
|
|
770
770
|
]
|
|
771
771
|
}
|
|
@@ -818,6 +818,10 @@
|
|
|
818
818
|
if(item.endTime != null) {
|
|
819
819
|
item.endTime = new Date(item.endTime);
|
|
820
820
|
}
|
|
821
|
+
// 设置虚仿默认值
|
|
822
|
+
if(item.virtualScore == '') {
|
|
823
|
+
item.virtualScore = "0";
|
|
824
|
+
}
|
|
821
825
|
Object.keys(item).forEach(key=>{
|
|
822
826
|
if(!that.keysArr.includes(key) || item[key] == null) {
|
|
823
827
|
delete item[key];
|
|
@@ -30,8 +30,8 @@
|
|
|
30
30
|
<div v-else>
|
|
31
31
|
<div class="choice-list">
|
|
32
32
|
<div class="list-title">
|
|
33
|
-
|
|
34
|
-
|
|
33
|
+
<span>试题选项:<em>(必选项)</em></span>
|
|
34
|
+
<button class="but" @click="addOption">增加选项</button>
|
|
35
35
|
</div>
|
|
36
36
|
<div class="list-cont">
|
|
37
37
|
<div class="list-cont-li" v-for="(item,index) in list">
|
|
@@ -249,7 +249,7 @@ export default {
|
|
|
249
249
|
line-height: 30px;
|
|
250
250
|
}
|
|
251
251
|
.list-cont{
|
|
252
|
-
padding: 0 0 8px
|
|
252
|
+
padding: 0 0 8px 0;
|
|
253
253
|
}
|
|
254
254
|
.lv-color span{
|
|
255
255
|
color: #13BF6C;
|
|
@@ -272,6 +272,10 @@ export default {
|
|
|
272
272
|
margin-right: 2px;
|
|
273
273
|
font-style: normal;
|
|
274
274
|
}
|
|
275
|
+
.list-title em{
|
|
276
|
+
font-weight: normal;
|
|
277
|
+
font-style: normal;
|
|
278
|
+
}
|
|
275
279
|
.choice-title{
|
|
276
280
|
display: flex;
|
|
277
281
|
justify-content: center;
|
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="menu-container">
|
|
3
|
+
<menu-list-item
|
|
4
|
+
v-for="(value, idx) in list"
|
|
5
|
+
:key="idx"
|
|
6
|
+
:value="value"
|
|
7
|
+
@trigger:click="click"
|
|
8
|
+
>
|
|
9
|
+
<template #default="{ item }">
|
|
10
|
+
<div
|
|
11
|
+
class="title"
|
|
12
|
+
:class="{
|
|
13
|
+
green: handleActive(item, 'green'),
|
|
14
|
+
red: handleActive(item, 'red'),
|
|
15
|
+
}"
|
|
16
|
+
:title="item.title"
|
|
17
|
+
>
|
|
18
|
+
{{ idx + 1 }}.{{ item.title }}
|
|
19
|
+
</div>
|
|
20
|
+
<div
|
|
21
|
+
class="detail"
|
|
22
|
+
:class="{
|
|
23
|
+
green: handleActive(item, 'green'),
|
|
24
|
+
red: handleActive(item, 'red'),
|
|
25
|
+
}"
|
|
26
|
+
>
|
|
27
|
+
<div
|
|
28
|
+
class="detail-item"
|
|
29
|
+
:title="item.detail[idx].value"
|
|
30
|
+
v-for="({ name, value }, idx) in item.detail"
|
|
31
|
+
:key="idx"
|
|
32
|
+
>
|
|
33
|
+
{{ name }}:
|
|
34
|
+
{{ value }}
|
|
35
|
+
</div>
|
|
36
|
+
</div>
|
|
37
|
+
</template>
|
|
38
|
+
</menu-list-item>
|
|
39
|
+
</div>
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<script>
|
|
43
|
+
import menuListItem from "./menuList.vue";
|
|
44
|
+
export default {
|
|
45
|
+
name: "zydx-menu",
|
|
46
|
+
components: {
|
|
47
|
+
menuListItem,
|
|
48
|
+
},
|
|
49
|
+
props: {
|
|
50
|
+
list: {
|
|
51
|
+
type: Array,
|
|
52
|
+
default: () => [],
|
|
53
|
+
},
|
|
54
|
+
styleConfig: {
|
|
55
|
+
type: Object,
|
|
56
|
+
default: () => {
|
|
57
|
+
return {
|
|
58
|
+
activeColor: "green",
|
|
59
|
+
};
|
|
60
|
+
},
|
|
61
|
+
},
|
|
62
|
+
},
|
|
63
|
+
data() {
|
|
64
|
+
return {
|
|
65
|
+
activeIndex: -1,
|
|
66
|
+
};
|
|
67
|
+
},
|
|
68
|
+
methods: {
|
|
69
|
+
click: function (item) {
|
|
70
|
+
const idx = this.list.findIndex(({ id }) => id === item.id);
|
|
71
|
+
this.activeIndex = idx;
|
|
72
|
+
this.$emit("trigger:click", item);
|
|
73
|
+
},
|
|
74
|
+
handleActive: function (item, color) {
|
|
75
|
+
const idx = this.list.findIndex(({ id }) => id === item.id);
|
|
76
|
+
return this.activeIndex === idx
|
|
77
|
+
? this.checkColor(this.styleConfig.activeColor, color)
|
|
78
|
+
? true
|
|
79
|
+
: false
|
|
80
|
+
: false;
|
|
81
|
+
},
|
|
82
|
+
checkColor: function (activeColor, color) {
|
|
83
|
+
switch (color) {
|
|
84
|
+
case "green":
|
|
85
|
+
return activeColor === color;
|
|
86
|
+
case "red":
|
|
87
|
+
return activeColor === color;
|
|
88
|
+
default:
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
},
|
|
92
|
+
},
|
|
93
|
+
computed: {
|
|
94
|
+
activeColor: function () {
|
|
95
|
+
return this.styleConfig.activeColor;
|
|
96
|
+
},
|
|
97
|
+
},
|
|
98
|
+
};
|
|
99
|
+
</script>
|
|
100
|
+
|
|
101
|
+
<style scoped>
|
|
102
|
+
.menu-container {
|
|
103
|
+
width: 100%;
|
|
104
|
+
height: auto;
|
|
105
|
+
margin: 0 auto;
|
|
106
|
+
display: flex;
|
|
107
|
+
flex-direction: column;
|
|
108
|
+
align-items: center;
|
|
109
|
+
justify-content: flex-start;
|
|
110
|
+
gap: 10px;
|
|
111
|
+
padding: 15px;
|
|
112
|
+
font-size: 14px;
|
|
113
|
+
line-height: 30px;
|
|
114
|
+
letter-spacing: 1px;
|
|
115
|
+
}
|
|
116
|
+
.title {
|
|
117
|
+
width: 100%;
|
|
118
|
+
font-size: 16px;
|
|
119
|
+
}
|
|
120
|
+
.title.red {
|
|
121
|
+
color:red
|
|
122
|
+
}
|
|
123
|
+
.title.green {
|
|
124
|
+
color:#00ff00
|
|
125
|
+
}
|
|
126
|
+
.detail {
|
|
127
|
+
width: 100%;
|
|
128
|
+
text-indent: 28px;
|
|
129
|
+
text-overflow: ellipsis;
|
|
130
|
+
white-space: nowrap;
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
}
|
|
133
|
+
.detail.red {
|
|
134
|
+
color:red
|
|
135
|
+
}
|
|
136
|
+
.detail.green {
|
|
137
|
+
color:#00ff00
|
|
138
|
+
}
|
|
139
|
+
</style>
|
|
140
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="menu-list-item" @click="click">
|
|
3
|
+
<slot v-bind="{ item: value }"></slot>
|
|
4
|
+
</div>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
export default {
|
|
9
|
+
name: "menuListItem",
|
|
10
|
+
props: {
|
|
11
|
+
value: {
|
|
12
|
+
type: Object,
|
|
13
|
+
default: () => ({}),
|
|
14
|
+
},
|
|
15
|
+
},
|
|
16
|
+
methods: {
|
|
17
|
+
click() {
|
|
18
|
+
this.$emit("trigger:click", this.value);
|
|
19
|
+
},
|
|
20
|
+
},
|
|
21
|
+
};
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<style scoped>
|
|
25
|
+
.menu-list-item {
|
|
26
|
+
width: 100%;
|
|
27
|
+
height: auto;
|
|
28
|
+
display: flex;
|
|
29
|
+
flex-direction: column;
|
|
30
|
+
align-items: center;
|
|
31
|
+
justify-content: flex-start;
|
|
32
|
+
min-height: 60px;
|
|
33
|
+
cursor: pointer;
|
|
34
|
+
}
|
|
35
|
+
</style>
|