0.0.2 • Published 6 years ago
@cyingy/tree-select v0.0.2
TreeSelect
基于 element-ui 和 vue-treeselect 的树选择框
Usage
Installation
npm i @cyingy/tree-select -S
or
yarn add @cyingy/tree-select
Import
import TreeSelect from "@cyingy/tree-select";
import "@cyingy/tree-select/dist/tree-select.css";
// Vue SFCs
export default {
components: {
TreeSelect
}
};
// register in main.js
Vue.component("tree-select", TreeSelect.TreeSelect);
Project setup
yarn install
Compiles and hot-reloads for development
yarn run serve
Compiles and minifies for docs
yarn run build:docs
Compiles and minifies for bundle
yarn run build:bundle
Run your tests
yarn run test
Lints and fixes files
yarn run lint
Run your unit tests
yarn run test:unit
Customize configuration
Tips
由于基于 vue-cli@3.x 搭建的框架,
yarn lint
的文件范围是:// node_modules\@vue\cli-plugin-eslint\lint.js#L55 const defaultFilesToLint = [ "src", "tests", // root config files "*.js", ".*.js" ]; // 需要添加 docs 文件夹 const defaultFilesToLint = [ "docs", // add `docs` directory "src", "tests", // root config files "*.js", ".*.js" ];
更新 npm 包时, 会刷新 lint 文件注意更新~~