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

@solarains/z-components

v0.0.8

Published

My uni-app components for nx

Downloads

6

Readme

表单小组件使用说明

一、引入

  1. 将组件文件夹zFormItems放入根目录components文件夹中
  2. 将vuex文件夹store放入根目录中
  3. /main.js文件中添加以下代码:
// main.js
import zFormItems from "@/components/zFormItems"; // 表单组件
import store from './store'; //引入vuex
......
Vue.use(zFormItems);
......
const app = new Vue({
	...App,
	store, // Vue实例中添加store
})
// pages.json
"easycom": {
	"autoscan": true,
	"^z-(.*)": "@/components/zFormItems/components/z-$1/index.vue"
}
  1. !!! 在需要使用表单小组件的页面引入mixins:[uni.$pageMixins]
export default {
	mixins:[uni.$pageMixins], // 加入此行
	data() {...},
    methods:{...}
}

二、页面通用属性

组件成功引入后,会将组件的属性通过vuex和mixin的方式放入页面中,直接使用即可。(每日进入页面,将初始化通用属性)

  1. 通用属性(通过computed方式引入)

    {
     // 客户对象
     customerNo: "",
     customerName: "",
     customerPhoneNo: "",
     customerType: "",
    
     amount: null, // 数量
    
     feeTypeName: "",
     feeRules: [], // 收费规则列表
     feeRuleIndex: 0, // 收费规则当前选择index
    
     discountNum: 100, // 打折的折扣,如:100为不打折,90为打9折
    
     remarkStr: "", // 备注
    	
     choosenBumen: [], // 选择的部门列表
    	
     choosenProperty: [], // 选择的摊位列表
    	
     // 司机对象
     driverNo: "",
     driverName: "",
     driverId: "",
     driverPhone: "",
    	
     temporaryFeeType: "", // 临时服务费收费类型,从数据字典中获取数据
     temporaryFeeName: "", // 临时服务费收费类型名称
    }
  2. 手动设置通用属性(methods)

设置通用属性,只需要

将属性名字段首字母大写

-> 在字段前添加set

-> 以函数的形式调用

-> 函数传入新的值即可

如,我想手动设置amount的值为3,则只需要使用this.setAmount(3)

  1. 几乎每个组件都可以设置 @change