Skip to content

Commit 02ddf07

Browse files
author
Dipak Sarkar
committed
updated docs
1 parent 7ed9078 commit 02ddf07

File tree

12 files changed

+1896
-2390
lines changed

12 files changed

+1896
-2390
lines changed

docs/.vuepress/clientAppEnhance.js

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
1-
/**
2-
* Client app enhancement file.
3-
*
4-
* https://v2.vuepress.vuejs.org/reference/client-api.html#helpers
5-
*/
6-
71
import number from "../../src";
8-
import { Quasar } from "quasar";
9-
// import "quasar/dist/quasar.css";
10-
112
import { defineClientAppEnhance } from "@vuepress/client";
123

134
export default defineClientAppEnhance(({ app }) => {
14-
app.use(Quasar, {
15-
config: {
16-
dark: false
17-
}
18-
});
195
app.use(number);
206
});

docs/.vuepress/components/Example.vue

Lines changed: 0 additions & 146 deletions
This file was deleted.
Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
<template>
2+
<div class="q-gutter-y-sm">
3+
<div class="column">
4+
<div class="text-h6">Component</div>
5+
<number
6+
@update:model-value="(val) => (price = val)"
7+
class="q-field__input"
8+
:model-value="price"
9+
v-bind="config"
10+
/>
11+
<div>
12+
Model value: <span class="text-bold">{{ price }}</span>
13+
</div>
14+
</div>
15+
<div class="column">
16+
<div class="text-h6">Reverse Fill</div>
17+
<number
18+
@update:model-value="(val) => (price = val)"
19+
class="q-field__input"
20+
:model-value="reverseFill"
21+
v-bind="configReverseFill"
22+
/>
23+
<div>
24+
Model value: <span class="text-bold">{{ reverseFill }}</span>
25+
</div>
26+
</div>
27+
<div class="column">
28+
<div class="text-h6">Directive</div>
29+
<input
30+
type="text"
31+
class="q-field__input"
32+
v-number="config"
33+
:value="priceDirective"
34+
@change="({ target }) => (priceDirective = target.value)"
35+
/>
36+
<div>masking doesn't work with directive</div>
37+
<div>
38+
Model value: <span class="text-bold">{{ priceDirective }}</span>
39+
</div>
40+
</div>
41+
</div>
42+
</template>
43+
44+
<script>
45+
export default {
46+
data() {
47+
return {
48+
price: 154.52,
49+
priceDirective: 6789.1,
50+
priceUnmasked: 6789.1,
51+
config: {
52+
decimal: ".",
53+
separator: ",",
54+
prefix: "$",
55+
suffix: " %",
56+
precision: 2,
57+
nullValue: "",
58+
masked: false,
59+
reverseFill: false,
60+
},
61+
reverseFill: 6789.1,
62+
configReverseFill: {
63+
reverseFill: true,
64+
suffix: "",
65+
},
66+
};
67+
},
68+
methods: {
69+
onChange(args) {
70+
console.log("args", args);
71+
},
72+
},
73+
};
74+
</script>

docs/.vuepress/config.js

100755100644
Lines changed: 18 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -2,53 +2,33 @@ const { description } = require("../../package");
22
const { path } = require("@vuepress/utils");
33

44
module.exports = {
5-
/**
6-
* Ref:https://v2.vuepress.vuejs.org/reference/config.html#title
7-
*/
5+
port: 8081,
6+
// site config
7+
lang: "en-US",
88
title: "Vue Number Format",
9-
/**
10-
* Ref:https://v2.vuepress.vuejs.org/reference/config.html#description
11-
*/
129
description: description,
13-
14-
/**
15-
* Extra tags to be injected to the page HTML `<head>`
16-
*
17-
* ref:https://v2.vuepress.vuejs.org/reference/config.html#head
18-
*/
1910
head: [
2011
["meta", { name: "theme-color", content: "#3eaf7c" }],
2112
["meta", { name: "apple-mobile-web-app-capable", content: "yes" }],
2213
[
2314
"meta",
24-
{ name: "apple-mobile-web-app-status-bar-style", content: "black" }
15+
{ name: "apple-mobile-web-app-status-bar-style", content: "black" },
2516
],
2617
[
2718
"meta",
2819
{
2920
name: "google-site-verification",
30-
content: "Tf6UVeu-ZmZtGqB5tdcYymZ79101gyGKcpzqwWhDb1U"
31-
}
32-
]
21+
content: "Tf6UVeu-ZmZtGqB5tdcYymZ79101gyGKcpzqwWhDb1U",
22+
},
23+
],
3324
],
3425

35-
// Specify the port to use for the dev server.
36-
port: 8081,
37-
38-
/**
39-
* Theme configuration, here is the default theme configuration for VuePress.
40-
*
41-
* ref:https://v2.vuepress.vuejs.org/reference/config.html#themeconfig
42-
*/
43-
// base: '/vue-number-format/',
44-
4526
// theme and its config
4627
theme: "@vuepress/theme-default",
4728
themeConfig: {
4829
logo: "/favicon.png",
4930
editLinks: false,
5031
repo: "coders-tm/vue-number-format",
51-
docsDir: "docs",
5232
lastUpdated: true,
5333
sidebar: {
5434
"/guide/": [
@@ -58,28 +38,25 @@ module.exports = {
5838
children: [
5939
"/guide/README.md",
6040
"/guide/config.md",
61-
"/guide/example.md"
62-
]
63-
}
64-
]
65-
}
41+
"/guide/play-ground.md",
42+
],
43+
},
44+
],
45+
},
6646
},
6747
darkMode: false,
68-
/**
69-
* Apply plugins,ref:https://v2.vuepress.vuejs.org/reference/config.html#plugins
70-
*/
7148
plugins: [
7249
[
7350
"@vuepress/register-components",
7451
{
75-
componentsDir: path.resolve(__dirname, "./components")
76-
}
52+
componentsDir: path.resolve(__dirname, "./components"),
53+
},
7754
],
7855
[
7956
"@vuepress/plugin-google-analytics",
8057
{
81-
id: "UA-76508942-4"
82-
}
83-
]
84-
]
58+
id: "UA-76508942-4",
59+
},
60+
],
61+
],
8562
};

docs/.vuepress/styles/index.styl

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

docs/.vuepress/styles/palette.styl

Lines changed: 0 additions & 10 deletions
This file was deleted.
File renamed without changes.

docs/guide/example.md

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

docs/guide/play-ground.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Play Ground
2+
3+
<PlayGround/>

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
],
1616
"scripts": {
1717
"build": "rollup --c rollup.config.js",
18-
"docs:build": "vuepress build docs",
1918
"docs:dev": "vuepress dev docs",
19+
"docs:build": "vuepress build docs",
2020
"test": "jest tests/*",
2121
"lint": "eslint 'src/**/*.{js,vue}'",
2222
"push": "clear && git config core.ignorecase false && branch=\"$(git symbolic-ref -q HEAD)\" || \"dev\" && branch=${branch##refs/heads/} && branch=${branch:-HEAD} && echo Pushing to Branch \"$branch\" && echo Please type your commit message && read msg && clear && git add . && git commit -m \"$msg\" && git push origin \"$branch\""

0 commit comments

Comments
 (0)