Skip to content

Commit 7786994

Browse files
committed
🔀 Replace lodash with lodash-es
1 parent f683491 commit 7786994

36 files changed

+135
-508
lines changed

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,9 @@ https://github.com/rtugeek/clock
196196

197197
![png](https://raw.githubusercontent.com/rtugeek/clock/master/public/images/preview_glitch_clock.png)
198198

199+
#### 米奇时钟
200+
201+
![png](https://raw.githubusercontent.com/rtugeek/clock/master/public/images/preview_micky_clock.png)
199202
#### 歌词小说
200203

201204
![歌词小说](public/images/preview_lyric_book.png)

eslint.config.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import antfu from '@antfu/eslint-config'
22

33
export default antfu({
4-
ignores: ['**/*.md', '**/*.md/*.*', 'dist/', '**/dist/**/', 'node_modules', '**/node_modules/**', 'node_modules/', '**/node_modules/**/', 'patches/', '**/patches/**/', 'types/', '**/types/**/', 'cache/', '**/cache/**/', '!packages/.vitepress', '!packages/.vitepress/**', '!.eslintrc.js', '!.eslintrc.js/**', '!rollup.config.js', '!rollup.config.js/**', '!.test', '!**/.test/**', '.temp', '**/.temp/**'],
4+
ignores: ['**/*.md', '**/*.md/*.*', 'dist/', 'public/', '**/dist/**/', 'node_modules', '**/node_modules/**', 'node_modules/', '**/node_modules/**/', 'patches/', '**/patches/**/', 'types/', '**/types/**/', 'cache/', '**/cache/**/', '!packages/.vitepress', '!packages/.vitepress/**', '!.eslintrc.js', '!.eslintrc.js/**', '!rollup.config.js', '!rollup.config.js/**', '!.test', '!**/.test/**', '.temp', '**/.temp/**'],
55
}, {
66
rules: {
77
'vue/no-deprecated-functional-template': 'off',

package.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"dayjs": "^1.11.6",
3333
"driver.js": "^0.9.8",
3434
"element-plus": "^2.2.26",
35-
"lodash": "^4.17.21",
35+
"lodash-es": "^4.17.21",
3636
"lunar-typescript": "^1.6.6",
3737
"lyric-resolver": "^0.1.6",
3838
"nanoid": "^4.0.2",
@@ -49,7 +49,7 @@
4949
"@antfu/eslint-config": "^2.6.1",
5050
"@antfu/ni": "^0.21.4",
5151
"@types/color": "^3.0.3",
52-
"@types/lodash": "^4.14.186",
52+
"@types/lodash-es": "^4.17.12",
5353
"@typescript-eslint/eslint-plugin": "^6.16.0",
5454
"@typescript-eslint/parser": "^6.16.0",
5555
"@vitejs/plugin-vue": "^4.0.0",

public/images/preview_micky_clock.png

-27.5 KB
Binary file not shown.

public/widget.json

+73-104
Original file line numberDiff line numberDiff line change
@@ -110,12 +110,12 @@
110110
"routes": []
111111
},
112112
{
113-
"name": "cn.widgetjs.widgets.sit_reminder",
113+
"name": "cn.widgetjs.widgets.time_progress",
114114
"title": {
115-
"zh-CN": "久坐提醒"
115+
"zh-CN": "时间进度"
116116
},
117117
"description": {
118-
"zh-CN": "设置间隔,定时提醒,适合长期久坐的人群"
118+
"zh-CN": "年、月、周、日进度剩余百分比"
119119
},
120120
"keywords": [
121121
"recommend"
@@ -128,26 +128,26 @@
128128
"maxWidth": 4,
129129
"webviewTag": false,
130130
"maxHeight": 2,
131-
"minWidth": 4,
131+
"minWidth": 2,
132132
"minHeight": 2,
133133
"movable": true,
134134
"singleton": false,
135135
"resizable": true,
136-
"path": "/widget/sit_reminder",
136+
"path": "/widget/time_progress",
137137
"meta": {},
138-
"backgroundThrottling": false,
139-
"previewImage": "/images/preview_sit_reminder.png",
140-
"supportDeployMode": 65536,
141-
"configPagePath": "/widget/config/sit_reminder",
138+
"backgroundThrottling": true,
139+
"previewImage": "/images/preview_time_progress.png",
140+
"supportDeployMode": 17,
141+
"configPagePath": "/widget/config/time_progress",
142142
"routes": []
143143
},
144144
{
145-
"name": "cn.widgetjs.widgets.time_progress",
145+
"name": "cn.widgetjs.widgets.sit_reminder",
146146
"title": {
147-
"zh-CN": "时间进度"
147+
"zh-CN": "久坐提醒"
148148
},
149149
"description": {
150-
"zh-CN": "年、月、周、日进度剩余百分比"
150+
"zh-CN": "设置间隔,定时提醒,适合长期久坐的人群"
151151
},
152152
"keywords": [
153153
"recommend"
@@ -160,17 +160,17 @@
160160
"maxWidth": 4,
161161
"webviewTag": false,
162162
"maxHeight": 2,
163-
"minWidth": 2,
163+
"minWidth": 4,
164164
"minHeight": 2,
165165
"movable": true,
166166
"singleton": false,
167167
"resizable": true,
168-
"path": "/widget/time_progress",
168+
"path": "/widget/sit_reminder",
169169
"meta": {},
170-
"backgroundThrottling": true,
171-
"previewImage": "/images/preview_time_progress.png",
172-
"supportDeployMode": 17,
173-
"configPagePath": "/widget/config/time_progress",
170+
"backgroundThrottling": false,
171+
"previewImage": "/images/preview_sit_reminder.png",
172+
"supportDeployMode": 65536,
173+
"configPagePath": "/widget/config/sit_reminder",
174174
"routes": []
175175
},
176176
{
@@ -237,37 +237,6 @@
237237
"configPagePath": "/widget/config/phone_reminder",
238238
"routes": []
239239
},
240-
{
241-
"name": "cn.widgetjs.widgets.mickey_clock",
242-
"title": {
243-
"zh-CN": "米奇表盘"
244-
},
245-
"description": {
246-
"zh-CN": "Apple Watch米奇表盘"
247-
},
248-
"keywords": [
249-
"recommend"
250-
],
251-
"security": false,
252-
"permissions": [],
253-
"lang": "zh-CN",
254-
"width": 2,
255-
"height": 2,
256-
"maxWidth": 3,
257-
"webviewTag": false,
258-
"maxHeight": 3,
259-
"minWidth": 2,
260-
"minHeight": 2,
261-
"movable": true,
262-
"singleton": false,
263-
"resizable": true,
264-
"path": "/widget/mickey_clock",
265-
"meta": {},
266-
"backgroundThrottling": true,
267-
"previewImage": "/images/preview_micky_clock.png",
268-
"supportDeployMode": 17,
269-
"routes": []
270-
},
271240
{
272241
"name": "cn.widgetjs.widgets.labor_progress",
273242
"title": {
@@ -366,135 +335,135 @@
366335
"routes": []
367336
},
368337
{
369-
"name": "cn.widgetjs.widgets.clipboard",
338+
"name": "cn.widgetjs.widgets.countdown2",
370339
"title": {
371-
"zh-CN": "剪切板搜索"
340+
"zh-CN": "倒计时"
372341
},
373342
"description": {
374-
"zh-CN": "在屏幕上方显示剪切板快捷搜索"
343+
"zh-CN": "简单的倒计时组件,支持农历"
375344
},
376345
"keywords": [
377346
"recommend"
378347
],
379348
"security": false,
380-
"permissions": [
381-
"clipboard"
382-
],
349+
"permissions": [],
383350
"lang": "zh-CN",
384-
"width": 6,
385-
"height": 1,
386-
"maxWidth": 6,
351+
"width": 2,
352+
"height": 2,
353+
"maxWidth": 4,
387354
"webviewTag": false,
388-
"maxHeight": 1,
389-
"minWidth": 6,
390-
"minHeight": 1,
355+
"maxHeight": 4,
356+
"minWidth": 2,
357+
"minHeight": 2,
391358
"movable": true,
392359
"singleton": false,
393360
"resizable": true,
394-
"path": "/widget/clipboard",
361+
"path": "/widget/countdown2",
395362
"meta": {},
396-
"backgroundThrottling": false,
397-
"previewImage": "/images/preview_clipboard.png",
398-
"supportDeployMode": 65536,
399-
"configPagePath": "/widget/config/clipboard",
363+
"backgroundThrottling": true,
364+
"previewImage": "/images/preview_countdown2.png",
365+
"supportDeployMode": 17,
366+
"configPagePath": "/widget/config/countdown2",
400367
"routes": []
401368
},
402369
{
403-
"name": "cn.widgetjs.widgets.birthday_list",
370+
"name": "cn.widgetjs.widgets.countdown",
404371
"title": {
405-
"zh-CN": "生日列表"
372+
"zh-CN": "倒计时"
406373
},
407374
"description": {
408-
"zh-CN": "自动倒计时的生日列表"
375+
"zh-CN": "简单的倒计时组件,支持农历"
409376
},
410377
"keywords": [
411378
"recommend"
412379
],
413380
"security": false,
414381
"permissions": [],
415382
"lang": "zh-CN",
416-
"width": 4,
417-
"height": 4,
383+
"width": 2,
384+
"height": 2,
418385
"maxWidth": 4,
419386
"webviewTag": false,
420-
"maxHeight": 6,
421-
"minWidth": 3,
422-
"minHeight": 3,
387+
"maxHeight": 4,
388+
"minWidth": 2,
389+
"minHeight": 2,
423390
"movable": true,
424391
"singleton": false,
425392
"resizable": true,
426-
"path": "/widget/birthday_list",
393+
"path": "/widget/countdown",
427394
"meta": {},
428395
"backgroundThrottling": true,
429-
"previewImage": "/images/preview_birthday_list.png",
396+
"previewImage": "/images/preview_countdown.png",
430397
"supportDeployMode": 17,
431-
"configPagePath": "/widget/config/birthday_list",
398+
"configPagePath": "/widget/config/countdown",
432399
"routes": []
433400
},
434401
{
435-
"name": "cn.widgetjs.widgets.countdown2",
402+
"name": "cn.widgetjs.widgets.clipboard",
436403
"title": {
437-
"zh-CN": "倒计时"
404+
"zh-CN": "剪切板搜索"
438405
},
439406
"description": {
440-
"zh-CN": "简单的倒计时组件,支持农历"
407+
"zh-CN": "在屏幕上方显示剪切板快捷搜索"
441408
},
442409
"keywords": [
443410
"recommend"
444411
],
445412
"security": false,
446-
"permissions": [],
413+
"permissions": [
414+
"clipboard"
415+
],
447416
"lang": "zh-CN",
448-
"width": 2,
449-
"height": 2,
450-
"maxWidth": 4,
417+
"width": 6,
418+
"height": 1,
419+
"maxWidth": 6,
451420
"webviewTag": false,
452-
"maxHeight": 4,
453-
"minWidth": 2,
454-
"minHeight": 2,
421+
"maxHeight": 1,
422+
"minWidth": 6,
423+
"minHeight": 1,
455424
"movable": true,
456425
"singleton": false,
457426
"resizable": true,
458-
"path": "/widget/countdown2",
427+
"path": "/widget/clipboard",
459428
"meta": {},
460-
"backgroundThrottling": true,
461-
"previewImage": "/images/preview_countdown2.png",
462-
"supportDeployMode": 17,
463-
"configPagePath": "/widget/config/countdown2",
429+
"backgroundThrottling": false,
430+
"previewImage": "/images/preview_clipboard.png",
431+
"supportDeployMode": 65536,
432+
"configPagePath": "/widget/config/clipboard",
464433
"routes": []
465434
},
466435
{
467-
"name": "cn.widgetjs.widgets.countdown",
436+
"name": "cn.widgetjs.widgets.birthday_list",
468437
"title": {
469-
"zh-CN": "倒计时"
438+
"zh-CN": "生日列表"
470439
},
471440
"description": {
472-
"zh-CN": "简单的倒计时组件,支持农历"
441+
"zh-CN": "自动倒计时的生日列表"
473442
},
474443
"keywords": [
475444
"recommend"
476445
],
477446
"security": false,
478447
"permissions": [],
479448
"lang": "zh-CN",
480-
"width": 2,
481-
"height": 2,
449+
"width": 4,
450+
"height": 4,
482451
"maxWidth": 4,
483452
"webviewTag": false,
484-
"maxHeight": 4,
485-
"minWidth": 2,
486-
"minHeight": 2,
453+
"maxHeight": 6,
454+
"minWidth": 3,
455+
"minHeight": 3,
487456
"movable": true,
488457
"singleton": false,
489458
"resizable": true,
490-
"path": "/widget/countdown",
459+
"path": "/widget/birthday_list",
491460
"meta": {},
492461
"backgroundThrottling": true,
493-
"previewImage": "/images/preview_countdown.png",
462+
"previewImage": "/images/preview_birthday_list.png",
494463
"supportDeployMode": 17,
495-
"configPagePath": "/widget/config/countdown",
464+
"configPagePath": "/widget/config/birthday_list",
496465
"routes": []
497466
}
498467
],
499468
"pages": []
500-
}
469+
}

src/main.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import { createApp } from 'vue'
22
import dayjs from 'dayjs'
3+
import 'element-plus/dist/index.css'
34
import 'animate.css'
45
import { WidgetJsPlugin } from '@widget-js/vue3'
56
import '@widget-js/vue3/dist/style.css'
@@ -8,7 +9,6 @@ import { createPinia } from 'pinia'
89
import { MotionPlugin } from '@vueuse/motion'
910
import ElementPlus from 'element-plus'
1011
import './index.css'
11-
import 'element-plus/dist/index.css'
1212
import router from './router'
1313
import 'dayjs/locale/zh-cn.js'
1414
import App from './App.vue'

src/widgets/birthday-list/BirthdayListWidget.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ export default {
7979
<template>
8080
<div
8181
class="birthday-list-container" :style="{
82-
backgroundColor: birthdayListData?.backgroundColor,
82+
backgroundColor: birthdayListData?.theme.backgroundColor,
8383
}"
8484
>
8585
<img class="image" src="./images/balloon.png">

src/widgets/birthday-list/BirthdayListWidgetView.vue

-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const {
1818
async function add() {
1919
const url = await WidgetApi.getWidgetConfigUrl(widgetData.value.name, widgetParams)
2020
if (url) {
21-
// DeployedWidgetApi.openConfigRoute()
2221
await BrowserWindowApi.openUrl(url)
2322
}
2423
}

src/widgets/birthday-list/model/BirthdayListData.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { WidgetData } from '@widget-js/core'
2+
import BirthdayListWidgetDefine from '@/widgets/birthday-list/BirthdayList.widget'
23

34
export interface BirthdayPeople {
45
name: string
@@ -14,6 +15,10 @@ export interface BirthdayPeople {
1415

1516
export default class BirthdayListData extends WidgetData {
1617
peopleList: BirthdayPeople[] = []
17-
backgroundColor = '#FB604B'
1818
title = '生日列表'
19+
20+
constructor() {
21+
super(BirthdayListWidgetDefine.name)
22+
this.theme.backgroundColor = '#FB604B'
23+
}
1924
}

0 commit comments

Comments
 (0)