Skip to content

Commit b933999

Browse files
committed
docs: update README.md
1 parent dc706fe commit b933999

File tree

10 files changed

+170
-20
lines changed

10 files changed

+170
-20
lines changed

README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export interface Options {
219219
customNotificationHTML?: string
220220
/** notificationProps have higher priority than locale */
221221
notificationProps?: NotificationProps
222+
notificationConfig?: NotificationConfig
222223
/**
223224
* preset: zh_CN | zh_TW | en_US
224225
* @default 'zh_CN'
@@ -255,7 +256,22 @@ export interface Options {
255256
injectFileBase?: string
256257
}
257258

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
259+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
260+
261+
export interface NotificationConfig {
262+
/**
263+
* refresh button color
264+
* @default '#1677ff'
265+
*/
266+
primaryColor?: string
267+
/**
268+
* dismiss button color
269+
* @default 'rgba(0,0,0,.25)'
270+
*/
271+
secondaryColor?: string
272+
/** @default 'bottomRight' */
273+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
274+
}
259275

260276
export interface NotificationProps {
261277
title?: string

README.zh-CN.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ module.exports = defineConfig({
194194
## Options
195195

196196
```ts
197-
function webUpdateNotice(options?: Options): Plugin
198-
199197
export interface Options {
200198
/**
201199
* support 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
@@ -219,6 +217,7 @@ export interface Options {
219217
customNotificationHTML?: string
220218
/** notificationProps have higher priority than locale */
221219
notificationProps?: NotificationProps
220+
notificationConfig?: NotificationConfig
222221
/**
223222
* preset: zh_CN | zh_TW | en_US
224223
* @default 'zh_CN'
@@ -255,7 +254,22 @@ export interface Options {
255254
injectFileBase?: string
256255
}
257256

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
257+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
258+
259+
export interface NotificationConfig {
260+
/**
261+
* refresh button color
262+
* @default '#1677ff'
263+
*/
264+
primaryColor?: string
265+
/**
266+
* dismiss button color
267+
* @default 'rgba(0,0,0,.25)'
268+
*/
269+
secondaryColor?: string
270+
/** @default 'bottomRight' */
271+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
272+
}
259273

260274
export interface NotificationProps {
261275
title?: string

packages/core/README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export interface Options {
219219
customNotificationHTML?: string
220220
/** notificationProps have higher priority than locale */
221221
notificationProps?: NotificationProps
222+
notificationConfig?: NotificationConfig
222223
/**
223224
* preset: zh_CN | zh_TW | en_US
224225
* @default 'zh_CN'
@@ -255,7 +256,22 @@ export interface Options {
255256
injectFileBase?: string
256257
}
257258

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
259+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
260+
261+
export interface NotificationConfig {
262+
/**
263+
* refresh button color
264+
* @default '#1677ff'
265+
*/
266+
primaryColor?: string
267+
/**
268+
* dismiss button color
269+
* @default 'rgba(0,0,0,.25)'
270+
*/
271+
secondaryColor?: string
272+
/** @default 'bottomRight' */
273+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
274+
}
259275

260276
export interface NotificationProps {
261277
title?: string

packages/core/README.zh-CN.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ module.exports = defineConfig({
194194
## Options
195195

196196
```ts
197-
function webUpdateNotice(options?: Options): Plugin
198-
199197
export interface Options {
200198
/**
201199
* support 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
@@ -219,6 +217,7 @@ export interface Options {
219217
customNotificationHTML?: string
220218
/** notificationProps have higher priority than locale */
221219
notificationProps?: NotificationProps
220+
notificationConfig?: NotificationConfig
222221
/**
223222
* preset: zh_CN | zh_TW | en_US
224223
* @default 'zh_CN'
@@ -255,7 +254,22 @@ export interface Options {
255254
injectFileBase?: string
256255
}
257256

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
257+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
258+
259+
export interface NotificationConfig {
260+
/**
261+
* refresh button color
262+
* @default '#1677ff'
263+
*/
264+
primaryColor?: string
265+
/**
266+
* dismiss button color
267+
* @default 'rgba(0,0,0,.25)'
268+
*/
269+
secondaryColor?: string
270+
/** @default 'bottomRight' */
271+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
272+
}
259273

260274
export interface NotificationProps {
261275
title?: string

packages/umi-plugin/README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export interface Options {
219219
customNotificationHTML?: string
220220
/** notificationProps have higher priority than locale */
221221
notificationProps?: NotificationProps
222+
notificationConfig?: NotificationConfig
222223
/**
223224
* preset: zh_CN | zh_TW | en_US
224225
* @default 'zh_CN'
@@ -255,7 +256,22 @@ export interface Options {
255256
injectFileBase?: string
256257
}
257258

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
259+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
260+
261+
export interface NotificationConfig {
262+
/**
263+
* refresh button color
264+
* @default '#1677ff'
265+
*/
266+
primaryColor?: string
267+
/**
268+
* dismiss button color
269+
* @default 'rgba(0,0,0,.25)'
270+
*/
271+
secondaryColor?: string
272+
/** @default 'bottomRight' */
273+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
274+
}
259275

260276
export interface NotificationProps {
261277
title?: string

packages/umi-plugin/README.zh-CN.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ module.exports = defineConfig({
194194
## Options
195195

196196
```ts
197-
function webUpdateNotice(options?: Options): Plugin
198-
199197
export interface Options {
200198
/**
201199
* support 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
@@ -219,6 +217,7 @@ export interface Options {
219217
customNotificationHTML?: string
220218
/** notificationProps have higher priority than locale */
221219
notificationProps?: NotificationProps
220+
notificationConfig?: NotificationConfig
222221
/**
223222
* preset: zh_CN | zh_TW | en_US
224223
* @default 'zh_CN'
@@ -255,7 +254,22 @@ export interface Options {
255254
injectFileBase?: string
256255
}
257256

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
257+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
258+
259+
export interface NotificationConfig {
260+
/**
261+
* refresh button color
262+
* @default '#1677ff'
263+
*/
264+
primaryColor?: string
265+
/**
266+
* dismiss button color
267+
* @default 'rgba(0,0,0,.25)'
268+
*/
269+
secondaryColor?: string
270+
/** @default 'bottomRight' */
271+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
272+
}
259273

260274
export interface NotificationProps {
261275
title?: string

packages/vite-plugin/README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export interface Options {
219219
customNotificationHTML?: string
220220
/** notificationProps have higher priority than locale */
221221
notificationProps?: NotificationProps
222+
notificationConfig?: NotificationConfig
222223
/**
223224
* preset: zh_CN | zh_TW | en_US
224225
* @default 'zh_CN'
@@ -255,7 +256,22 @@ export interface Options {
255256
injectFileBase?: string
256257
}
257258

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
259+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
260+
261+
export interface NotificationConfig {
262+
/**
263+
* refresh button color
264+
* @default '#1677ff'
265+
*/
266+
primaryColor?: string
267+
/**
268+
* dismiss button color
269+
* @default 'rgba(0,0,0,.25)'
270+
*/
271+
secondaryColor?: string
272+
/** @default 'bottomRight' */
273+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
274+
}
259275

260276
export interface NotificationProps {
261277
title?: string

packages/vite-plugin/README.zh-CN.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ module.exports = defineConfig({
194194
## Options
195195

196196
```ts
197-
function webUpdateNotice(options?: Options): Plugin
198-
199197
export interface Options {
200198
/**
201199
* support 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
@@ -219,6 +217,7 @@ export interface Options {
219217
customNotificationHTML?: string
220218
/** notificationProps have higher priority than locale */
221219
notificationProps?: NotificationProps
220+
notificationConfig?: NotificationConfig
222221
/**
223222
* preset: zh_CN | zh_TW | en_US
224223
* @default 'zh_CN'
@@ -255,7 +254,22 @@ export interface Options {
255254
injectFileBase?: string
256255
}
257256

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
257+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
258+
259+
export interface NotificationConfig {
260+
/**
261+
* refresh button color
262+
* @default '#1677ff'
263+
*/
264+
primaryColor?: string
265+
/**
266+
* dismiss button color
267+
* @default 'rgba(0,0,0,.25)'
268+
*/
269+
secondaryColor?: string
270+
/** @default 'bottomRight' */
271+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
272+
}
259273

260274
export interface NotificationProps {
261275
title?: string

packages/webpack-plugin/README.md

+17-1
Original file line numberDiff line numberDiff line change
@@ -219,6 +219,7 @@ export interface Options {
219219
customNotificationHTML?: string
220220
/** notificationProps have higher priority than locale */
221221
notificationProps?: NotificationProps
222+
notificationConfig?: NotificationConfig
222223
/**
223224
* preset: zh_CN | zh_TW | en_US
224225
* @default 'zh_CN'
@@ -255,7 +256,22 @@ export interface Options {
255256
injectFileBase?: string
256257
}
257258

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
259+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
260+
261+
export interface NotificationConfig {
262+
/**
263+
* refresh button color
264+
* @default '#1677ff'
265+
*/
266+
primaryColor?: string
267+
/**
268+
* dismiss button color
269+
* @default 'rgba(0,0,0,.25)'
270+
*/
271+
secondaryColor?: string
272+
/** @default 'bottomRight' */
273+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
274+
}
259275

260276
export interface NotificationProps {
261277
title?: string

packages/webpack-plugin/README.zh-CN.md

+17-3
Original file line numberDiff line numberDiff line change
@@ -194,8 +194,6 @@ module.exports = defineConfig({
194194
## Options
195195

196196
```ts
197-
function webUpdateNotice(options?: Options): Plugin
198-
199197
export interface Options {
200198
/**
201199
* support 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
@@ -219,6 +217,7 @@ export interface Options {
219217
customNotificationHTML?: string
220218
/** notificationProps have higher priority than locale */
221219
notificationProps?: NotificationProps
220+
notificationConfig?: NotificationConfig
222221
/**
223222
* preset: zh_CN | zh_TW | en_US
224223
* @default 'zh_CN'
@@ -255,7 +254,22 @@ export interface Options {
255254
injectFileBase?: string
256255
}
257256

258-
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp'
257+
export type VersionType = 'git_commit_hash' | 'pkg_version' | 'build_timestamp' | 'custom'
258+
259+
export interface NotificationConfig {
260+
/**
261+
* refresh button color
262+
* @default '#1677ff'
263+
*/
264+
primaryColor?: string
265+
/**
266+
* dismiss button color
267+
* @default 'rgba(0,0,0,.25)'
268+
*/
269+
secondaryColor?: string
270+
/** @default 'bottomRight' */
271+
placement?: 'topLeft' | 'topRight' | 'bottomLeft' | 'bottomRight'
272+
}
259273

260274
export interface NotificationProps {
261275
title?: string

0 commit comments

Comments
 (0)