Skip to content

Commit 43afa98

Browse files
committed
[@FOXONE/FINANCE-UI]: 0.1.0-alpha.2
1 parent 50471e9 commit 43afa98

File tree

23 files changed

+893
-668
lines changed

23 files changed

+893
-668
lines changed

@types/global.d.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,5 @@ declare module '*.vue' {
2525
import Vue from 'vue';
2626
export default Vue;
2727
}
28+
29+
declare module '@foxone/uikit';

DEV.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Dev
2+
3+
### Install dependencies
4+
```shell
5+
yarn
6+
```
7+
8+
### Run project
9+
```shell
10+
yarn start
11+
```
12+
or
13+
```shell
14+
yarn dev
15+
```
16+
17+
### Create a Component
18+
```shell
19+
yarn new
20+
```
21+
22+
*Create a functional Component which name is Button👇*
23+
```shell
24+
yarn new Button -f
25+
```
26+
27+
---
28+
29+
## Build and Release
30+
### Build
31+
```shell
32+
yarn build
33+
```
34+
35+
*Bypass all pre-check before building👇*
36+
```shell
37+
yarn build -n
38+
```
39+
40+
### Release
41+
```shell
42+
yarn release
43+
```
44+
45+
*Ignoring version of iteration👇*
46+
```shell
47+
yarn release -i
48+
```
49+
50+
*Manual specify version of iteration to 0.3.25👇*
51+
```shell
52+
yarn release -m 0.3.25
53+
```
54+
55+
*Bypass all pre-check before release👇*
56+
```shell
57+
yarn release -n
58+
```
59+
60+
**More powerful customizations is in [omni.config.js](https://github.com/omni-door/cli/blob/master/docs/OMNI.md)**

DEV.zh-CN.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# 开发
2+
3+
### 安装依赖
4+
```shell
5+
yarn
6+
```
7+
8+
### 启动项目
9+
```shell
10+
yarn start
11+
```
12+
or
13+
```shell
14+
yarn dev
15+
```
16+
17+
### 新建组件
18+
```shell
19+
yarn new
20+
```
21+
22+
*新建一个名为 Button 的函数组件👇*
23+
```shell
24+
yarn new Button -f
25+
```
26+
27+
---
28+
29+
## 构建和发布
30+
### 构建
31+
```shell
32+
yarn build
33+
```
34+
35+
*构建项目时绕过所有检查👇*
36+
```shell
37+
yarn build -n
38+
```
39+
40+
### 发布
41+
```shell
42+
yarn release
43+
```
44+
45+
*发布项目时忽略版本迭代👇*
46+
```shell
47+
yarn release -i
48+
```
49+
50+
*发布项目时指定迭代的版本为 0.3.25 👇*
51+
```shell
52+
yarn release -m 0.3.25
53+
```
54+
55+
*发布项目时绕过所有检查👇*
56+
```shell
57+
yarn release -n
58+
```
59+
60+
**更多配置项请在 [omni.config.js](https://github.com/omni-door/cli/blob/master/docs/OMNI.zh-CN.md) 中编辑**

README.md

Lines changed: 106 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,61 +5,127 @@ English | [简体中文](./README.zh-CN.md)
55
[Demo](https://fox-one.github.io/finance-ui/?path=/story)
66

77
## Quick start
8-
### Install dependencies
9-
```shell
10-
yarn
11-
```
8+
### Install
129

13-
### Run project
14-
```shell
15-
yarn start
16-
```
17-
or
1810
```shell
19-
yarn dev
11+
yarn add @foxone/finance-ui
2012
```
2113

22-
### Create a Component
23-
```shell
24-
yarn new
25-
```
14+
### Global Usage
15+
`main.ts`:
16+
```typescript
17+
import Vue from "vue";
18+
import FinanceUI from "@foxone/finance-ui";
2619

27-
*Create a functional Component which name is Button👇*
28-
```shell
29-
yarn new Button -f
20+
Vue.use(FinanceUI);
21+
22+
// ……
3023
```
3124

32-
---
25+
`App.vue`:
26+
```vue
27+
<template>
28+
<div>
29+
My Vue App With FinanceUI
30+
<asset-range-input
31+
v-model="amount"
32+
@input="onInput"
33+
:max="max"
34+
:inputTips="inputTips"
35+
:asset="asset"
36+
:selectable="false"
37+
/>
38+
</div>
39+
</template>
3340
34-
## Build and Release
35-
### Build
36-
```shell
37-
yarn build
38-
```
41+
<script lang="ts">
42+
import { Component, Vue } from 'vue-property-decorator';
3943
40-
*Bypass all pre-check before building👇*
41-
```shell
42-
yarn build -n
43-
```
44+
@Component
45+
export default class App extends Vue {
46+
max = 50;
47+
asset = {
48+
chain: {
49+
chain: null,
50+
chain_id: "43d61dcd-e413-450d-80b8-101d5e903357",
51+
id: "43d61dcd-e413-450d-80b8-101d5e903357",
52+
logo: "https://mixin-images.zeromesh.net/zVDjOxNTQvVsA8h2B4ZVxuHoCF3DJszufYKWpd9duXUSbSapoZadC7_13cnWBqg0EmwmRcKGbJaUpA8wFfpgZA=s128",
53+
name: "Ether",
54+
price: "2167.89",
55+
symbol: "ETH"
56+
},
57+
chain_id: "43d61dcd-e413-450d-80b8-101d5e903357",
58+
id: "965e5c6e-434c-3fa9-b780-c50f43cd955c",
59+
logo: "https://mixin-images.zeromesh.net/0sQY63dDMkWTURkJVjowWY6Le4ICjAFuu3ANVyZA4uI3UdkbuOT5fjJUT82ArNYmZvVcxDXyNjxoOv0TAYbQTNKS=s128",
60+
name: "Chui Niu Bi",
61+
price: "0",
62+
symbol: "CNB"
63+
};
64+
inputTips = {
65+
amount: 50,
66+
amountSymbol: 'CNB',
67+
tipLeft: 'Collateral',
68+
tipRight: '≈ $ 6456.54',
69+
};
70+
amount = 30.21;
4471
45-
### Release
46-
```shell
47-
yarn release
72+
onInput() {
73+
console.log('this.amount', this.amount);
74+
}
75+
}
76+
</script>
4877
```
4978

50-
*Ignoring version of iteration👇*
51-
```shell
52-
yarn release -i
53-
```
79+
### Local Usage
80+
`Component.vue`:
81+
```vue
82+
<template>
83+
<div>
84+
It's Risk Slider
85+
<risk-slider
86+
v-model="precent"
87+
:tips="tips"
88+
:scale="scale"
89+
ref="slider"
90+
/>
91+
</div>
92+
</template>
5493
55-
*Manual specify version of iteration to 0.3.25👇*
56-
```shell
57-
yarn release -m 0.3.25
94+
<script lang="ts">
95+
import { Component, Vue } from 'vue-property-decorator';
96+
import { RiskSlider } from '@foxone/finance-ui';
97+
98+
@Component(
99+
components: {
100+
RiskSlider
101+
}
102+
)
103+
export default class App extends Vue {
104+
precent = 30;
105+
tips = {
106+
tip: 'Collateralization Ration reach',
107+
highlight: `${(30.21 / 50 * 100).toFixed(2)}%, it’s in low-risk now.`
108+
};
109+
scale = {
110+
low: 0.65,
111+
mid: 0.2,
112+
high: 0.15
113+
};
114+
}
115+
</script>
58116
```
59117

60-
*Bypass all pre-check before release👇*
118+
119+
120+
## Dev
121+
For debugging or maintenance, you can clone the whole git repository and run the project.
122+
61123
```shell
62-
yarn release -n
124+
git clone --depth 1 [email protected]:fox-one/finance-ui.git
125+
126+
cd finance-ui
127+
128+
yarn && yarn dev
63129
```
64130

65-
**More powerful customizations is in [omni.config.js](https://github.com/omni-door/cli/blob/master/docs/OMNI.md)**
131+
[More Detials](./DEV.md)

0 commit comments

Comments
 (0)