Skip to content

Commit

Permalink
refactor(site): optimize sidebar scroll
Browse files Browse the repository at this point in the history
  • Loading branch information
haoziqaq committed Mar 4, 2022
1 parent 4ea3105 commit ce938c5
Show file tree
Hide file tree
Showing 7 changed files with 170 additions and 28 deletions.
65 changes: 65 additions & 0 deletions README.en-US.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
<div align="center">
<a href="https://artsdt.github.io/meve/">
<img src="https://artsdt.github.io/meve/logo_1.svg" width="150">
</a>
<h1>MEVE UI</h1>
<p>Vue2 UI Lib Referenced Argon Design System</p>
<p>
<a href="https://artsdt.github.io/meve/">Documentation</a>
</p>
</div>

---

### Quickstart

#### CDN

```html
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/@meve/ui/umd/meve.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@meve/touch-emulator/iife.js"></script>
<script>
Vue.use(Meve)
new Vue({
template: '<m-button>Meve</m-button>'
}).$mount('#app')
</script>
```

#### Webpack / Vite

```shell
# Install with npm or yarn or pnpm

# npm
npm i @meve/ui @meve/touch-emulator -S

# yarn
yarn add @meve/ui @meve/touch-emulator

# pnpm
pnpm add @meve/ui @meve/touch-emulator
```

```js
import Vue from 'vue'
import App from './App.vue'
import Meve from '@meve/ui'
import '@meve/ui/es/style.js'
import '@meve/touch-emulator'

Vue.use(Meve)

new Vue({
render: (h) => h(App)
}).$mount('#app')
```

### Repo Status WIP!

Currently in development, do not use in production environment.

Documentation currently only supports Chinese
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,31 @@
<img src="https://artsdt.github.io/meve/logo_1.svg" width="150">
</a>
<h1>MEVE UI</h1>
<p>Vue2 UI Lib Referenced Argon Design System</p>
<p>基于Vue2的 Argon Design 风格组件库</p>
<p>
<a href="https://artsdt.github.io/meve/">Documentation</a>
<a href="https://artsdt.github.io/meve/">文档站点</a>
</p>
</div>

---

### Quick Start
### 快速开始

#### CDN

```html
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/@meve/ui/umd/meve.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@meve/touch-emulator/iife.js"></script>
<script>
Vue.use(Meve)
new Vue({
template: '<m-button>Meve</m-button>'
}).$mount('#app')
</script>
```

#### Webpack / Vite

Expand Down Expand Up @@ -42,8 +58,6 @@ new Vue({
}).$mount('#app')
```

### Repo Status WIP!

Currently in development, do not use in production environment.
### 仓库当前处于开发阶段!

Documentation currently only supports Chinese
当前处于开发阶段, 暂不推荐在生产环境中使用.
12 changes: 12 additions & 0 deletions packages/meve-cli/site/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,18 @@ tbody {
border-top: 1px dashed #eee;
}
.meve-site-introduce {
display: flex;
flex-direction: column;
align-items: center;
background: #fff;
border-radius: 6px;
box-shadow: 0 8px 26px -4px hsla(0, 0%, 8%, .15), 0 8px 9px -5px hsla(0, 0%, 8%, .06);
padding: 34px 24px;
overflow: auto;
margin-top: 20px;
}
.meve-site-card {
background: #fff;
border-radius: 6px;
Expand Down
12 changes: 8 additions & 4 deletions packages/meve-cli/site/components/AppSidebar.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<div
class="app-site-sidebar-scroller"
class="app-site-sidebar-container"
:class="{
'app-site-sidebar-fixed': fixed,
'app-site-sidebar-hidden': inSmallScreen
Expand All @@ -11,6 +11,7 @@
<img class="app-site-sidebar-logo" :src="logo" alt="">
</div>
<m-menu
class="app-site-menu"
accordion
:expanded-names.sync="expandedNames"
:selected-names.sync="selectedNames"
Expand Down Expand Up @@ -85,13 +86,16 @@ export default {
</script>

<style lang="less" scoped>
.app-site-sidebar-scroller {
.app-site-sidebar-container {
width: 245px;
padding: 14px;
height: 100vh;
transition: transform .25s;
background: #fff;
transition: all .25s;
box-shadow: 0 10px 30px -12px rgb(0 0 0 / 42%), 0 4px 25px 0px rgb(0 0 0 / 12%), 0 8px 10px -5px rgb(0 0 0 / 20%);
}
.app-site-menu {
height: calc(100vh - 80px);
overflow-y: auto;
}
Expand Down
22 changes: 5 additions & 17 deletions packages/meve-ui/docs/home.zh-CN.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,5 @@
# 基本介绍

### 介绍

编个故事...

### 特性

聊点故事...

### 设计系统

强行分析...

### 社区/贡献

找点观众...
<div class="meve-site-introduce">
<img src="https://artsdt.github.io/meve/logo_1.svg" width="165">
<h1>MEVE UI</h1>
<p>基于Vue2的 Argon Design 风格组件库</p>
</div>
54 changes: 54 additions & 0 deletions packages/meve-ui/docs/quickstart.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# 快速开始

### CDN

单页面使用CDN的方式使用组件库

```html
<div id="app"></div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]"></script>
<script src="https://cdn.jsdelivr.net/npm/@meve/ui/umd/meve.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@meve/touch-emulator/iife.js"></script>
<script>
Vue.use(Meve)
new Vue({
template: '<m-button>Meve</m-button>'
}).$mount('#app')
</script>
```

### Webpack / Vite

在构建工具中使用组件库,支持`Webpack``Vite`

```shell
# Install with npm or yarn or pnpm

# npm
npm i @meve/ui @meve/touch-emulator -S

# yarn
yarn add @meve/ui @meve/touch-emulator

# pnpm
pnpm add @meve/ui @meve/touch-emulator
```

```js
import Vue from 'vue'
import App from './App.vue'
import Meve from '@meve/ui'
import '@meve/ui/es/style.js'
import '@meve/touch-emulator'

Vue.use(Meve)

new Vue({
render: (h) => h(App)
}).$mount('#app')
```

### 仓库当前处于开发阶段!

当前处于开发阶段, 暂不推荐在生产环境中使用.
5 changes: 5 additions & 0 deletions packages/meve-ui/meve.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ module.exports = {
labelCN: '基本介绍',
labelUS: 'Basic Introduce',
},
{
name: 'quickstart',
labelCN: '快速开始',
labelUS: 'Quickstart',
},
],
},
{
Expand Down

0 comments on commit ce938c5

Please sign in to comment.