npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

yyuap-historylog

v1.0.12

Published

业务历史变更组件

Downloads

2

Readme

欢迎使用 业务历史变更组件

** 组件能力 **

提供业务日志历史查看与比较能力 提供json查看与对比能力

使用方法

组件形式

import historyLog,{jsonViewer,jsonViewerCompare} from "yyuap-historylog"
import "yyuap-historylog/dist/main.css" // 记得引样式 ^_^
<div>
    <button onClick={()=>historyLog({locale:'zh_CN',record})}>
     查看业务历史
    </button>
    <button onClick={()=>jsonViewer({locale:'en_US',title,json})}>
      查看JSON
    </button> 
    <button onClick={()=>jsonViewerCompare({locale:'zh_CN',leftTitle,leftJson,rightTitle,rightJson })}>
      比较JSON
    </button> 
</div>

script 前端组件形式

<script src="https://unpkg.com/yyuap-historylog/lib/lib.js"></script>
<link href="https://unpkg.com/yyuap-historylog/lib/lib.css" ></link>

全局绑定对象HistoryLog 内部能力对应为以下三个参数

  1. HistoryLog.historyLog
  2. HistoryLog.jsonViewer
  3. HistoryLog.jsonViewerCompare

script 集成服务

<script src="http://workbench.yyuap.com/diwork-log/business/showLogPanel"></script>
<!-- 不同环境
(迭代)http://yonsuite-iter.yyuap.com
(测试)http://workbench.yyuap.com
(日常)https://u8c3ec-daily.yyuap.com
(预发)https://3ec-y3me-pre.diwork.com
(生产)https://ms.diwork.com 
-->
<script>
  /***
   * historyLog已经绑定到全局变量 对HistoryLog.historyLog进行了包装
   * /
  historyLog(locale,record) // 直接调用 内部已经封装url
</script>

参数说明

HistoryLog.historyLog

|是否必需| 参数对象属性 | 对应值 | 说明 | |----| -------- | -----: | :----: | || locale | String | ["zh_CN","en_US","zh_TW"] | || url | String | 请求地址覆写 | |√| record | Object | 传递待查询节点属性 |

// record 参数示例
{
  busiObjId: "1234567890123456",// * 查询用
  busiObjCode: "2",// 查询用
  busiObjName: "示例操作",// * 展示用
  operationDate: "2019-12-09T08:01:49.725+0000",
  busiObjTypeCode: "oper_quicktype",// 查询用
  busiObjTypeName: "示例操作类型",
  businessId: "c6a8b585-aa69-43e6-8cea-53514e3789e0",
  detail: "发生了一些",// 无id时展现此reecord值
  mdId: null,
  mdUri: null,
  newBusiObj: "{\"test\":1}",// 无id时展现此reecord的json
  operCode: "update",
  operationDate: "2019-12-09T08:01:49.725+0000",// 无id时展现此reecord的时间
  operationName: "Update",
  operator: "3c8a4587-ee13-4740-be79-dff184bd9501",
  operatorName: "操作人", // 无id时展现此reecord的操作人
}

HistoryLog.jsonViewer(查看json)

|是否必需| 参数对象属性 | 对应值 | 说明 | 示例 | |----| -------- | -----: | :----: | :----: | || locale | String | ["zh_CN","en_US","zh_TW"] |"zh_CN" |√| leftTitle | Object | 左侧标题 |{name:"name",time:"2019-12-09 16:01:49"} |√| leftJson | JSON | 左侧JSON |{} |√| rightTitle | Object | 右侧标题 |{name:"name",time:"2019-12-09 16:01:49"} |√| rightJson | JSON | 右侧JSON |{}

title属性为对象 非字符串 请注意

HistoryLog.jsonViewerCompare(比较json)

|是否必需| 参数对象属性 | 对应值 | 说明 | 示例 | |----| -------- | -----: | :----: | || locale | String | ["zh_CN","en_US","zh_TW"] |"zh_CN" |√| title | Object | 标题 |{name:"name",time:"2019-12-09 16:01:49"} |√| json | JSON | JSON |{}

title属性为对象 非字符串 请注意

版本说明

1.0.0 提供基本功能 支持服务端渲染 1.0.1 提供lib文件 支持script直接调用 1.0.2 打包图标资源文件 1.0.3 跨域请求cookie携带 1.0.4 增加script 提供黑盒服务 删除未引用包 1.0.5 支持json对象为null 调整ue风格 1.0.7 fix: edge 浏览器报错:接口返回格式不是application/json格式 1.0.8 fix: json value 中 null 不替换成字符串 1.0.9 fix: React DOM tree root should always have a node reference 错误 1.0.10 fix: json value 中 null 不替换成字符串 1.0.11 log-pub/business/rest/search/history请求使用axios 1.0.12 url 为空时,域名使用 window._YMSHOST_

End`