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

teld-approval-flow-mobile

v0.0.15

Published

build a npm pack for teld-approval-flow-moblie

Downloads

116

Readme

teld-approval-flow-mobile

see teld-approval-flow

TELD 流程图组件的删减化版本,仅提供一种模式:运行时流程实例的查看,同时将原 PC 端组件替换为移动端组件。

Usage

用于 TELD 内部 ToC 框架中

  1. 组件准备

/plugins/components/mobile.js文件中注册项目中用到的组件
确保如下注册组件:

// import Vue from 'vue';
import { install } from '@teld/component-proxy/export/mobile.js';
import {
  Button,
  Popup,
  // ...
} from '@teld/component-proxy/mobile.js';

const components = [
  Button,
  Popup,
  // ...
];

// van-xx 组件注册为 tm-xx
install(components);

/assets/custom-mobile.less文件中,为用到的组件引入样式文件

@import '~@teld/component-proxy/style/mobile/button/index.less';
@import '~@teld/component-proxy/style/mobile/popup/index.less';

(如果还有其它组件,缺少样式的话,按照上面的方式进行引入即可)

  1. plugins下新建teld-approval-flow-mobile.js文件
import Vue form 'vue'
import * as TAF from 'teld-approval-flow-mobile'
import 'teld-approval-flow-mobile/lib/teld-approval-flow-mobile.css'
Vue.use(TAF, {
  scaleButtons: {
    visible: true,
    initScale: 60,
    position: 'top right',
    spaceX: '10px',
    spaceY: '20px',
  },
  designer: {
    useButtonToggleAll: true, // 【全展开|全收起】
  }
})
  1. nuxt.config.js中引入teld-approval-flow-mobile.jsssr: false即可
{
  //...
  plugins: [
    {
      src: '@@/plugins/teld-approval-flow-mobile.js',
      ssr: false,
    },
  ];
  //...
}
  1. 引入flow数据管理模块

store/下新建flow.js文件

注:nuxtjs 会按文件名做子模块引入,无需手动在store/index.js中引入子模块

import { flowStore } from 'teld-approval-flow-mobile'
export default flowStore
// 或者
// import * as TAF
// export default TAF.flowStore

// 或
const { flowStore } =
  require('teld-approval-flow-mobile').default || require('teld-approval-flow-mobile');
export default flowStore;
  1. 引入完成,使用组件

运行时查看用组件: ApprovalFlowRuntime

运行时:查看流程实例带流转状态的流程图

<approval-flow-runtime :flow-info="flowInfo">

Changelog

changelog

Development

npm install

Compiles and hot-reloads for development

npm run serve

Compiles and minifies for production

npm run build

Deploy (publish to NMP)

pnpm build
pnpm publish

Customize configuration

See Configuration Reference.