Skip to content

Commit c7f4ad7

Browse files
committed
Merge branch 'master' of github.com:JSON-Drived-Configurable-Platform/form-generator-iview
2 parents 353530e + 9718a56 commit c7f4ad7

File tree

22 files changed

+643
-89
lines changed

22 files changed

+643
-89
lines changed

.github/workflows/main.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# This is a basic workflow to help you get started with Actions
2+
3+
name: CI
4+
5+
# Controls when the action will run. Triggers the workflow on push or pull request
6+
# events but only for the master branch
7+
on:
8+
push:
9+
branches: [ master ]
10+
11+
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
12+
jobs:
13+
# This workflow contains a single job called "build"
14+
build:
15+
# The type of runner that the job will run on
16+
runs-on: ubuntu-latest
17+
18+
# Steps represent a sequence of tasks that will be executed as part of the job
19+
steps:
20+
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
21+
- uses: actions/checkout@v2
22+
with:
23+
persist-credentials: false
24+
25+
# Runs a set of commands using the runners shell
26+
- name: Run a multi-line script
27+
run: |
28+
npm install --dev
29+
npm run build-website
30+
31+
# The project is then uploaded as an artifact named 'site'.
32+
- name: Upload Artifacts
33+
uses: actions/upload-artifact@v1
34+
with:
35+
name: site
36+
path: gh-pages
37+
38+
deploy:
39+
needs: [build]
40+
runs-on: ubuntu-latest
41+
steps:
42+
- name: Checkout 🛎️
43+
uses: actions/checkout@v2
44+
with:
45+
persist-credentials: false
46+
47+
# The built project is downloaded into the 'site' folder.
48+
- name: Download Artifacts
49+
uses: actions/download-artifact@v1
50+
with:
51+
name: site
52+
53+
# Deploy
54+
- name: Deploy to GitHub Pages
55+
uses: JamesIves/github-pages-deploy-action@3.5.2
56+
with:
57+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
BRANCH: gh-pages # The branch the action should deploy to.
59+
FOLDER: "site" # The folder the action should deploy.

.travis.yml

Lines changed: 0 additions & 9 deletions
This file was deleted.

README.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,15 @@ A form generator with json schema based on iview ui.
2626

2727
`yarn run dev`
2828

29+
## deploy github page
30+
31+
提交PR之前需要提供demo以供验证,需要部署到github page上
32+
github page需要设置为gh-pages分支
33+
目前使用了github action来自动部署,需要fork后开启actions
34+
35+
36+
`yarn run deployDoc remoteName`
37+
2938
## production
3039

3140
`yarn run build`

deploy.sh

Lines changed: 0 additions & 25 deletions
This file was deleted.

manualDeploy.sh

Lines changed: 0 additions & 37 deletions
This file was deleted.

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "form-generator-iview",
3-
"version": "0.1.1-beta",
3+
"version": "0.1.4-beta",
44
"title": "formGeneratorIView",
55
"description": "A form generator with json schema based on iview ui",
66
"keywords": [
@@ -25,8 +25,7 @@
2525
"build-prod": "webpack --color --progress --config build/webpack.dist.prod.config.js",
2626
"build": "npm run build-dev && npm run build-prod",
2727
"lint": "eslint --fix --ext .js,.vue,.json src --fix --ext .json docs/website-data-api",
28-
"deploy": "fis3 release --root=./website/dist/ --file=./deploy-baidu/config.js",
29-
"deployDoc": "bash ./manualDeploy.sh"
28+
"deploy": "fis3 release --root=./website/dist/ --file=./deploy-baidu/config.js"
3029
},
3130
"repository": {
3231
"type": "git",

src/fieldGenerator.vue

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@
4747
@on-http-request="handleHttpRequest($event)"
4848
@on-reset-click="handleResetClick"
4949
@on-button-event="handleButtonClick"
50+
@on-button-cancel="handleButtonCancel"
5051
@on-checkboxCard-click="handelCheckboxCardClick"
5152
@on-list-item-click="handelListItemClick"
5253
/>
@@ -275,6 +276,9 @@ export default {
275276
handleButtonClick($event) {
276277
this.$emit('on-button-event', $event);
277278
},
279+
handleButtonCancel($event) {
280+
this.$emit('on-button-cancel', $event);
281+
},
278282
handleIconClick() {
279283
this.$emit('on-label-tip-click',{
280284
field: this.field

src/fields/fieldButton.vue

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,10 @@
55
:title="field.confirmPoptip.title"
66
:placement="field.confirmPoptip.placement"
77
:class="classes"
8+
:ok-text="field.confirmPoptip.okText"
9+
:cancel-text="field.confirmPoptip.cancelText"
810
@on-ok="handleClick"
11+
@on-cancel="handelCancel"
912
>
1013
<Button
1114
:type="field.subtype || 'default'"
@@ -83,6 +86,9 @@ export default {
8386
break;
8487
}
8588
},
89+
handelCancel() {
90+
this.$emit('on-button-cancel', this);
91+
}
8692
},
8793
};
8894
</script>

src/fields/fieldCarousel.vue

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<Carousel
44
:value="currentIndex"
55
:loop="field.loop"
6+
:arrow="computedArrow"
67
@on-change="handleChange"
78
>
89
<CarouselItem
@@ -63,6 +64,12 @@ export default {
6364
}
6465
return this.options.length > 0 ? this.options : fieldOptions;
6566
},
67+
computedArrow() {
68+
if (this.computedOptions.length > 1) {
69+
return this.field.arrow || 'hover';
70+
}
71+
return 'never';
72+
},
6673
optionsApi() {
6774
return !Array.isArray(this.field.options) ? this.field.options : '';
6875
},

0 commit comments

Comments
 (0)