@waline/client 2.1.2 → 2.2.0

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@waline/client",
3
- "version": "2.1.2",
3
+ "version": "2.2.0",
4
4
  "description": "client for waline comment system",
5
5
  "keywords": [
6
6
  "valine",
@@ -41,6 +41,7 @@
41
41
  </button>
42
42
  </div>
43
43
  <div class="wl-meta" aria-hidden="true">
44
+ <span v-if="comment.addr" v-text="comment.addr" />
44
45
  <span v-if="comment.browser" v-text="comment.browser" />
45
46
  <span v-if="comment.os" v-text="comment.os" />
46
47
  </div>
package/src/init.ts CHANGED
@@ -28,7 +28,7 @@ export interface WalineInstance {
28
28
  *
29
29
  * @description when not setting `path` option, it will be reset to `window.location.pathname`
30
30
  */
31
- update: (newOptions: Partial<Omit<WalineInitOptions, 'el'>>) => void;
31
+ update: (newOptions?: Partial<Omit<WalineInitOptions, 'el'>>) => void;
32
32
 
33
33
  /**
34
34
  * 取消挂载并摧毁 Waline 实例
@@ -96,7 +96,7 @@ export const init = ({
96
96
  pageview,
97
97
  path = window.location.pathname,
98
98
  ...newProps
99
- }: Partial<Omit<WalineInitOptions, 'el'>>): void => {
99
+ }: Partial<Omit<WalineInitOptions, 'el'>> = {}): void => {
100
100
  Object.entries(newProps).forEach(([key, value]) => {
101
101
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
102
102
  // @ts-ignore
@@ -23,4 +23,5 @@ export interface WalineComment extends Exclude<WalineCommentData, 'ua'> {
23
23
  browser?: string;
24
24
  os?: string;
25
25
  level?: number;
26
+ addr?: string;
26
27
  }