mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
Merge remote-tracking branch 'main/dev' into dev
This commit is contained in:
commit
68f7bfd2c5
18
Makefile
18
Makefile
@ -1,18 +0,0 @@
|
||||
.PHONY: test
|
||||
usage = "\
|
||||
Usage: make <option> \n\n\
|
||||
init componentname 初始化一个新组件,请忽视makefile的报错 \n\n\
|
||||
\n"
|
||||
|
||||
|
||||
default:
|
||||
@echo $(usage)
|
||||
|
||||
init:
|
||||
node build/bin/init.js $(filter-out $@,$(MAKECMDGOALS))
|
||||
|
||||
dev:
|
||||
npm run dev
|
||||
|
||||
test:
|
||||
npm run test
|
@ -57,14 +57,6 @@ Vue.use(vant);
|
||||
|
||||
## Development
|
||||
|
||||
### Add a new component
|
||||
|
||||
```shell
|
||||
make init componentName
|
||||
```
|
||||
|
||||
### Start coding
|
||||
|
||||
Start development mode:
|
||||
|
||||
```shell
|
||||
|
@ -55,15 +55,7 @@ Vue.use(vant);
|
||||
|
||||
## 三、开发
|
||||
|
||||
### 1. 新建一个组件
|
||||
|
||||
```shell
|
||||
make init componentName
|
||||
```
|
||||
|
||||
### 2. 示例预览
|
||||
|
||||
在`docs/nav.config.json`文件里合适的地方写入组件声明,根据组件类型(JS组件,CSS组件,Form等)进行区分 在`docs/examples-docs`目录里新建同名的md文件,如`waterfall.md`,在项目的根目录下执行以下命令,启动server:
|
||||
在`docs/src/doc.config.js`文件里合适的地方写入组件声明,根据组件类型(JS组件,CSS组件,Form等)进行区分,在`docs/examples-docs`目录里新建同名的 md 文件,如`waterfall.md`,在项目的根目录下执行以下命令,启动 server:
|
||||
|
||||
```shell
|
||||
npm run dev
|
||||
|
@ -3,6 +3,6 @@ const path = require('path');
|
||||
|
||||
module.exports = function() {
|
||||
const dirs = fs.readdirSync(path.resolve(__dirname, '../../packages'));
|
||||
const excludes = ['index.js', 'vant-css', 'mixins', 'utils'];
|
||||
const excludes = ['index.js', 'vant-css', 'mixins', 'utils', '.DS_Store'];
|
||||
return dirs.filter(dirName => excludes.indexOf(dirName) === -1)
|
||||
}
|
||||
|
@ -1,31 +0,0 @@
|
||||
#!/usr/bin/env node
|
||||
const ch = require('child_process');
|
||||
const gulp = require('gulp');
|
||||
const runSequence = require('run-sequence');
|
||||
const gutil = require('gulp-util');
|
||||
const fileSave = require('file-save');
|
||||
const path = require('path');
|
||||
const exec = ch.exec;
|
||||
|
||||
if (!process.argv[2]) {
|
||||
console.error('[组件名]必填.');
|
||||
process.exit(1);
|
||||
}
|
||||
|
||||
const name = process.argv[2];
|
||||
|
||||
|
||||
// 项目规范文件拷贝
|
||||
gulp.task('copy', function(callback) {
|
||||
gutil.log(gutil.colors.yellow('-------> 开始初始化'));
|
||||
|
||||
exec('cd packages && git clone git@gitlab.qima-inc.com:fe/vue-seed.git ' + name, function(err, stdout, stderr) {
|
||||
gutil.log('-------> 拉取 vue-seed');
|
||||
exec('rm -rf ./packages/' + name + '/.git', function(err, stdout, stderr) {
|
||||
gutil.log('-------> ' + name + '组件初始化成功');
|
||||
callback();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
runSequence('copy');
|
@ -15,13 +15,16 @@
|
||||
&::before {
|
||||
content: " ";
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
opacity: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border: inherit;
|
||||
border-color: $black;
|
||||
background-color: $black;
|
||||
border-radius: inherit; /* inherit parent's border radius */
|
||||
border-radius: inherit;/* inherit parent's border radius */
|
||||
transform: translate3d(-50%, -50%, 0);
|
||||
}
|
||||
|
||||
&:not([disabled]):active::before {
|
||||
|
Loading…
x
Reference in New Issue
Block a user