-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
50 changed files
with
1,699 additions
and
799 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ dist | |
dist-ssr | ||
*.local | ||
.vscode | ||
*-old | ||
|
||
yarn-* | ||
*-lock.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
node_modules | ||
.temp | ||
.cache | ||
cache | ||
dist | ||
|
||
*-error.log |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
import { postcssIsolateStyles } from 'vitepress'; | ||
|
||
export default { | ||
plugins: [ | ||
postcssIsolateStyles({ | ||
includeFiles: [/vp-doc\.css/] // 默认为 /base\.css/ | ||
}) | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<template> | ||
<div | ||
class="x-button" | ||
:class="{ [`x-button--${type}`]: type, 'x-button--default': !type }" | ||
> | ||
<slot></slot> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
defineProps({ | ||
type: String // 'primary' | 'danger' | 'warning' | 'success' | ||
}); | ||
</script> | ||
|
||
<style scoped lang="scss"> | ||
.x-button { | ||
display: inline-block; | ||
background-color: transparent; | ||
padding: 6px 12px; | ||
border-radius: 4px; | ||
font-size: 14px; | ||
font-weight: 500; | ||
line-height: 20px; | ||
cursor: pointer; | ||
user-select: none; | ||
transition: background-color 0.2s; | ||
border: 1px solid #d9d9d9; | ||
& + & { | ||
margin-left: 8px; | ||
} | ||
&--default { | ||
transition: background-color 0.2s, color 0.2s, border-color 0.2s; | ||
&:hover { | ||
color: #eca710; | ||
border-color: #eca710; | ||
} | ||
&:active { | ||
background-color: #eca7103a; | ||
} | ||
} | ||
&--primary { | ||
background-color: #eca710; | ||
color: #fff; | ||
&:hover { | ||
background-color: #f0b429; | ||
} | ||
&:active { | ||
background-color: #d89e0e; | ||
} | ||
} | ||
&--danger { | ||
background-color: #f5222d; | ||
color: #fff; | ||
&:hover { | ||
background-color: #f44c4c; | ||
} | ||
&:active { | ||
background-color: #d93636; | ||
} | ||
} | ||
&--warning { | ||
background-color: #fd6e0f; | ||
color: #fff; | ||
&:hover { | ||
background-color: #ff7b2f; | ||
} | ||
&:active { | ||
background-color: #e65c0f; | ||
} | ||
} | ||
&--success { | ||
background-color: #52c41a; | ||
color: #fff; | ||
&:hover { | ||
background-color: #73d13d; | ||
} | ||
&:active { | ||
background-color: #3baa1e; | ||
} | ||
} | ||
} | ||
</style> |
124 changes: 62 additions & 62 deletions
124
...cs/.vuepress/components/DataParameter.vue → ...s/.vitepress/components/DataParameter.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,62 @@ | ||
<template> | ||
<div class="param-root"> | ||
<span class="param-span"> | ||
<span v-if="r"> | ||
<!-- 下面两个 span 不要换行 --> | ||
<span class="param-required">*required*</span><span>, </span> | ||
</span> | ||
<!-- 下面两个 span 不要换行 --> | ||
<span v-if="t">type: {{ t }}</span | ||
><span v-if="d">, </span> | ||
<span v-if="d">default: {{ d }}</span> | ||
<span v-if="f">{{ f }}</span> | ||
</span> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from "vue"; | ||
export default defineComponent({ | ||
name: "DataParameter", | ||
props: { | ||
// required | ||
r: { | ||
type: Boolean | ||
}, | ||
// type | ||
t: { | ||
type: String | ||
}, | ||
// default | ||
d: { | ||
type: String | ||
}, | ||
// function | ||
f: { | ||
type: String | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.param-root { | ||
margin-top: 5px; | ||
.param-span { | ||
font-weight: 500; | ||
background-color: var(--c-details-bg); | ||
padding: 0 5px 4px 5px; | ||
border-radius: 2px; | ||
.param-required { | ||
color: red; | ||
} | ||
} | ||
} | ||
</style> | ||
<template> | ||
<div class="param-root"> | ||
<span class="param-span"> | ||
<span v-if="r"> | ||
<!-- 下面两个 span 不要换行 --> | ||
<span class="param-required">*required*</span><span>, </span> | ||
</span> | ||
<!-- 下面两个 span 不要换行 --> | ||
<span v-if="t">type: {{ t }}</span | ||
><span v-if="d">, </span> | ||
<span v-if="d">default: {{ d }}</span> | ||
<span v-if="f">{{ f }}</span> | ||
</span> | ||
</div> | ||
</template> | ||
|
||
<script lang="ts"> | ||
import { defineComponent } from "vue"; | ||
export default defineComponent({ | ||
name: "DataParameter", | ||
props: { | ||
// required | ||
r: { | ||
type: Boolean | ||
}, | ||
// type | ||
t: { | ||
type: String | ||
}, | ||
// default | ||
d: { | ||
type: String | ||
}, | ||
// function | ||
f: { | ||
type: String | ||
} | ||
} | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.param-root { | ||
margin-top: 5px; | ||
.param-span { | ||
font-weight: 500; | ||
background-color: var(--c-details-bg); | ||
padding: 0 5px 4px 5px; | ||
border-radius: 2px; | ||
.param-required { | ||
color: red; | ||
} | ||
} | ||
} | ||
</style> |
69 changes: 37 additions & 32 deletions
69
...docs/.vuepress/components/Description.vue → ...ocs/.vitepress/components/Description.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,37 @@ | ||
<template> | ||
<div> | ||
<p v-if="author" class="td-text">作者:{{ author }}</p> | ||
<p v-if="date" class="td-text">日期:{{ date }}</p> | ||
<p v-if="version" class="td-text">版本:{{ version }}</p> | ||
<p v-if="copyright" class="td-text">版权:{{ copyright }}</p> | ||
|
||
<hr class="td-hr" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { defineProps } from "vue"; | ||
defineProps({ | ||
author: String, | ||
date: String, | ||
version: String, | ||
copyright: String | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.td-text { | ||
line-height: 1; | ||
margin: 5px 0; | ||
font-weight: bold; | ||
} | ||
.td-hr { | ||
margin: 20px 0; | ||
} | ||
</style> | ||
<template> | ||
<div> | ||
<p v-if="author" class="td-text">作者:{{ author }}</p> | ||
<p v-if="date" class="td-text">日期:{{ date }}</p> | ||
<p v-if="version" class="td-text"> | ||
版本:<img | ||
style="vertical-align: text-bottom" | ||
src="https://shields.io/github/v/release/xpyjs/gantt?display_name=tag&color=eca710&label=" | ||
/> | ||
</p> | ||
<p v-if="copyright" class="td-text">版权:{{ copyright }}</p> | ||
|
||
<hr class="td-hr" /> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { defineProps } from 'vue'; | ||
defineProps({ | ||
author: String, | ||
date: String, | ||
version: String, | ||
copyright: String | ||
}); | ||
</script> | ||
|
||
<style lang="scss" scoped> | ||
.td-text { | ||
line-height: 1; | ||
margin: 5px 0; | ||
font-weight: bold; | ||
} | ||
.td-hr { | ||
margin: 20px 0; | ||
} | ||
</style> |
Oops, something went wrong.