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

@hsdata/warrenq-components-news

v0.0.33

Published

列出依赖哪些微服务,可以通过配置参数去掉哪些引入的微服务内容。

Downloads

16

Readme

微服务相关信息

列出依赖哪些微服务,可以通过配置参数去掉哪些引入的微服务内容。

组件功能清单

新闻资讯 列表

组件具体使用说明

使用说明

注:新闻组件在恒生私库中,npm 公共库只提供文档说明

私库引入组件方法参考如下文档中的第五点: 业务组件迁移内网注意事项(补充文档)

使用方法

<template>
  <news-module
    @openRead="openRead"
    :activePage="activePage"
    :searchKeyWords="searchKeyWords"
    :sourceData="sourceData"
    @handleScrollTop="handleScrollTop"
    @changeNewsTab="changeNewsTab"
  />
</template>
<script>
import { newsModule, newsConfig, tokenConfig } from '@hsdata/warrenq-components-news'

export default {
  components: {
    newsModule
  },
  data() {
    return {
      activePage: '', // 进入新闻组件,是在新闻资讯tab(newsInfo)还是在行业政策tab(industryRule),两个tab的值固定
      searchKeyWords: '', // 若不使用组件内部关键词筛选项,可将外部关键词传入
      sourceData: Object, // 第一页的数据,如果传入,则第一页数据则不在发请求
      // sourceData使用场景:比如云投研综合页,需先发请求拿数据进来排序,使用此变量,避免后续重复发请求
      // 结构:sourceData = {
      //   recordCount: 100, // 总数,Number
      //   recordList: [...] //
      // }
    }
  },
  created(){
    // 需要传的一些配置项,以下是一些默认值
    newsConfig({
      showNewsTab: true, // boolean, 是否展示tabs
      newsTabType: 'big', // big: 大的tab 效果;small 小的tabs 效果    必须showNewsTab 为true时才有效
      showKeywords: true, // 是否展示关键词筛选项
      showFilterInput: true, // 是否展示筛选条件
      showPagination: true, // 是否展示分页
      newsPageSize: 20, // 每页展示的条数
      withSourceData: false, // 和sourceData一起用,有sourceData时是否需要再次发请求,warrenq搜索结果综合页特性,其他场景使用时可忽略此配置
      newsInfo: true, // 展示新闻资讯tab
      industryRule: true, // 展示行业政策tab
      hasPolicyParams: true, // 是否有政策policyFlag参数。易方达没有
    }),
    tokenConfig(this.getToken), // 外部配置 token

    this.$nextTick(() => { // 需要从外部触发数据的初始化请求,触发之后就会有数据展示(因为需要兼容云投研搜索结果页)
      this.$refs.newsModuleRef.indexInit()
    })
  },
  methods: {
    openRead(item) {
      // 阅读器预览
    },
    // 获取token函数
    getToken(){
      ……
      return 'token'
    },
    // 组件内部切换页面时,需要触发的操作,比如:回到页面顶部
    handleScrollTop() {

    },
    // 组件内tab切换时,需要触发的操作
    // 传出的参数为 newsInfo(代表新闻资讯tab),industryRule(代表行业政策tab)
    changeNewsTab(v) {
      
    }
  }
}
</script>