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

my-xg

v1.0.0

Published

MY前端基础框架核心组件库

Downloads

16

Readme

1 修改 my-map 配置覆盖问题

@xdh/ui/lib/map/packages/my-map/Map.js

init() { const { center, projection, zoom, minZoom, maxZoom } = this.$props const layer = createLayer(this.adapter) // 标识图层 layer.MY_LAYER = true const view = new View({ projection, center, zoom, minZoom, maxZoom, ...(this.viewOptions || {}) }) this.map = new Map({ layers: [].concat(layer), view: view, target: this.$el, // 删除默认的控件 controls: [], interactions: [ new DragPan(), new MouseWheelZoom(), new PointerInteraction({ handleEvent: this.handleEvent }) ], ...(this.mapOptions || {}) }) this.setActive(DragPan, this.dragPan) this.setActive(MouseWheelZoom, this.mouseWheelZoom) this.bindMapEvents() /** _ 地图初始化完成时触发 _ @event ready _ @param {Map} map ol/Map 实例 _ @param {VueComponent} vm Vue 实例 */ this.$emit('ready', this.map, this) addResizeListener(this.$el, this.setViewSize) this.setCanvasFilter() }

2 修改 echarts 为高版本导入方式

@xdh/ui/lib/charts/packages/my-chart/Chart.js

import echarts from 'echarts/lib/echarts' import 'echarts/lib/component/tooltip' import 'echarts/lib/component/legend' import 'echarts/lib/component/title'

改为 import echarts from 'echarts';

3 修改 echarts 默认颜色

@xdh/ui/lib/charts/utils/constant.js

export const DEFAULT_THEME = { color: ['#333333', '#1976d2', '#ffcb2f', '#6a9955', '#007acc', '#eb1c27', '#fb7293', '#0101ff', '#c57b14', '#e7bcf3', '#9d96f5', '#8378EA', '#96BFFF' ] }

4 添加全局事件总线

my/ui/lib/index.js

export function appRender({ el, store, router, access }) {
return new Vue({
components: {
MyMasterApp
},
el: el,
store,
router,
access,
// 全局事件总线
beforeCreate() {
Vue.prototype.$bus = this
},
render(h) {
const props = { ...uiConfig.scale }
return h('my-master-app', { props })
}
})
}

5 关闭进度条

node_modules@xdh\my\ui\lib\enhance.js // 进度条自动每次递增 20% // progress.inc(0.2)

6 chalk 打包报错

node_modules@xdh\my\core\utils.js log(msg, type = 'primary') { const colors = { success: chalk.green, warning: chalk.bold.yellow, error: chalk.bold.red, primary: chalk.blue } console.log(colorstype) },

7(gojs 打包问题)

node_modules@xdh\my\ui\lib\gojs\utils\lib.js

const go = process.env.NODE_ENV === 'production' ? require('gojs/release/go') : require('gojs/release/go-debug') 改成 const go = require('gojs/release/go-debug')