-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: vue-cli-plugin-h-run-devtools 插件新增
vue-cli-plugin-h-run-devtools 插件新增
- Loading branch information
Showing
36 changed files
with
2,439 additions
and
1,914 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 |
---|---|---|
@@ -1,3 +1,11 @@ | ||
/node_modules | ||
/.vitepress/cache | ||
/dist | ||
|
||
/for-vue2/babel.config.js | ||
/for-vue2/postcss.config.js | ||
/for-vue2/shime-uni.d.ts | ||
/for-vue2/shime-vue.d.ts | ||
/for-vue2/src/static | ||
|
||
/for-vue3/dist |
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 |
---|---|---|
|
@@ -8,3 +8,5 @@ dist/npm/* | |
|
||
cli/storage/index.json | ||
.vitepress/cache | ||
|
||
yarn-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,98 @@ | ||
<template> | ||
<table class="table"> | ||
<tr> | ||
<td>平台</td> | ||
<td>APP</td> | ||
<td>H5</td> | ||
<td>微信</td> | ||
<td>支付宝</td> | ||
<td>百度</td> | ||
<td>头条</td> | ||
<td>QQ</td> | ||
<td>快手</td> | ||
<td>京东</td> | ||
</tr> | ||
<tr> | ||
<td>支持性</td> | ||
<td>{{ dd('APP') }}</td> | ||
<td>{{ dd('H5') }}</td> | ||
<td>{{ dd('WEIXIN') }}</td> | ||
<td>{{ dd('ALIPAY') }}</td> | ||
<td>{{ dd('BAIDU') }}</td> | ||
<td>{{ dd('TOUTIAO') }}</td> | ||
<td>{{ dd('QQ') }}</td> | ||
<td>{{ dd('KUAISHOU') }}</td> | ||
<td>{{ dd('JD') }}</td> | ||
</tr> | ||
<tr> | ||
<td colspan="5">for-vue2</td> | ||
<td colspan="5">for-vue3</td> | ||
</tr> | ||
<tr> | ||
<td colspan="5">{{ dd('VUE2') }}</td> | ||
<td colspan="5">{{ dd('VUE3') }}</td> | ||
</tr> | ||
</table> | ||
<div class="info "> | ||
<div class="warning custom-block" v-if="typeof props.APP==='string'">APP:{{ ddd('APP') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.H5==='string'">H5:{{ ddd('H5') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.WEIXIN==='string'">微信:{{ ddd('WEIXIN') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.ALIPAY==='string'">支付宝:{{ ddd('ALIPAY') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.BAIDU==='string'">百度:{{ ddd('BAIDU') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.TOUTIAO==='string'">头条:{{ ddd('TOUTIAO') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.QQ==='string'">QQ:{{ ddd('QQ') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.KUAISHOU==='string'">快手:{{ ddd('KUAISHOU') }}</div> | ||
<div class="warning custom-block" v-if="typeof props.JD==='string'">京东:{{ ddd('JD') }}</div> | ||
</div> | ||
</template> | ||
|
||
<script setup> | ||
/** | ||
* @description 兼容性展示表格 | ||
* @property {Boolean||String} APP | ||
* @value {Boolean} true 支持 | ||
* @value {Boolean} false 未知、不支持 | ||
* @value {String} 不完全支持,底部会显示此描述 | ||
* @event | ||
* @slot | ||
*/ | ||
import { onMounted } from 'vue' | ||
const props = defineProps({ | ||
APP: [Boolean, String], | ||
H5: [Boolean, String], | ||
WEIXIN: [Boolean, String], | ||
ALIPAY: [Boolean, String], | ||
BAIDU: [Boolean, String], | ||
TOUTIAO: [Boolean, String], | ||
QQ: [Boolean, String], | ||
KUAISHOU: [Boolean, String], | ||
JD: [Boolean, String], | ||
VUE2: [Boolean, String], | ||
VUE3: [Boolean, String], | ||
}); | ||
const dd = (platForm) => { | ||
const state = props[platForm] | ||
if (state === false) { | ||
return '⚪' | ||
} | ||
if (state === true) { | ||
return '✅' | ||
} | ||
return '❌' | ||
} | ||
const ddd=(platForm) => { | ||
return props[platForm]; | ||
} | ||
</script> | ||
|
||
<style scoped> | ||
.table { | ||
text-align: center; | ||
} | ||
.info .custom-block{ | ||
padding-top: 8px; | ||
} | ||
</style> |
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 @@ | ||
export { default as SupportTable } from './SupportTable.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,85 +1,76 @@ | ||
import path from "path"; | ||
import { defineConfig } from "vitepress"; | ||
import { fileURLToPath } from "url"; | ||
import components from "./sidebar/components"; | ||
import utils from "./sidebar/utils"; | ||
|
||
const CurrentPath = path.dirname(fileURLToPath(import.meta.url)); | ||
export default defineConfig({ | ||
lang: 'zh-CN', | ||
outDir: path.resolve(CurrentPath, '../dist/doc'), | ||
srcExclude: ['dist/npm/**/*'], | ||
lang: "zh-CN", | ||
outDir: path.resolve(CurrentPath, "../dist/doc"), | ||
srcExclude: ["dist/npm/**/*"], | ||
title: "h-uni", | ||
lastUpdated: true, | ||
// Vite config options | ||
vite: { | ||
resolve: { | ||
alias: { | ||
"@": path.resolve(CurrentPath), | ||
}, | ||
}, | ||
}, | ||
// 路径重写 | ||
rewrites: { | ||
':for/src/packages/:type/:dd/:dd.md': ':for/:type/:dd.md', | ||
":for/src/packages/:type/:dd/:dd.md": ":for/:type/:dd.md", | ||
}, | ||
themeConfig: { | ||
search: { | ||
provider: 'local' | ||
}, | ||
//顶部导航栏 | ||
nav: [ | ||
{ text: "主页", link: "/" }, | ||
{ text: "开始", link: "/README" }, | ||
{ text: "组件", link: "/for-vue2/components/HButton" }, | ||
{ text: "工具", link: "/for-vue2/utils/Hhttp" }, | ||
{ text: "组件", link: "/for-vue2/components/HButton",activeMatch:'/components' }, | ||
{ text: "工具", link: "/for-vue2/utils/Hhttp",activeMatch:'/utils' }, | ||
{ text: "更新记录", link: "/CHANGELOG" }, | ||
{ | ||
text: "切换文档", | ||
items: [ | ||
{ text: "for-vue2", link: "/for-vue2/components/HButton" }, | ||
{ text: "for-vue3", link: "/for-vue3/components/HButton" }, | ||
], | ||
}, | ||
{ | ||
text: "网站导航", | ||
items: [ | ||
{ text: "暂无!", link: "/item-1" }, | ||
{ text: "暂无!!", link: "/item-2" }, | ||
{ text: "暂无!!!", link: "/item-3" }, | ||
{ text: "uniapp 官网", link: "https://uniapp.dcloud.net.cn/" }, | ||
{ text: "hewxing.cn", link: "http://hewxing.cn" }, | ||
{ text: "3D 示例", link: "http://3d.hewxing.cn" }, | ||
], | ||
}, | ||
], | ||
// 侧边栏 | ||
sidebar: { | ||
'/for-vue2/': [ | ||
"/for-vue2/components/": [ | ||
{ | ||
text: "for-vue2", | ||
items: [ | ||
{ | ||
text: "组件", | ||
collapsed: false, | ||
items: [ | ||
{ text: '按钮 button', link: '/for-vue2/components/HButton' }, | ||
] | ||
}, | ||
{ | ||
text: "工具", | ||
collapsed: false, | ||
items: [ | ||
{ text: '网络请求 Hhttp', link: '/for-vue2/utils/Hhttp' } | ||
] | ||
}, | ||
], | ||
text: "组件库", | ||
items: components, | ||
}, | ||
], | ||
'/for-vue3/': [ | ||
"/for-vue3/components/": [ | ||
{ | ||
text: "for-vue3", | ||
items: [ | ||
{ | ||
text: "组件", | ||
collapsed: false, | ||
items: [ | ||
{ text: '按钮 HButton', link: '/for-vue3/components/HButton' } | ||
] | ||
}, | ||
{ | ||
text: "工具", | ||
collapsed: false, | ||
items: [ | ||
{ text: '网络请求 Hhttp', link: '/for-vue3/utils/Hhttp' } | ||
] | ||
}, | ||
], | ||
text: "组件库", | ||
items: components, | ||
}, | ||
] | ||
], | ||
"/for-vue2/utils/": [ | ||
{ | ||
text: "工具库", | ||
items: utils, | ||
}, | ||
], | ||
"/for-vue3/utils/": [ | ||
{ | ||
text: "工具库", | ||
items: utils, | ||
}, | ||
], | ||
}, | ||
// 链接图标 | ||
socialLinks: [{ icon: "github", link: "https://github.com/hewx815/h-uni" }], | ||
}, | ||
}); |
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,16 @@ | ||
export default [ | ||
{ | ||
text: "for-vue2", | ||
collapsed: false, | ||
items: [ | ||
{ text: '按钮 button', link: '/for-vue2/components/HButton' }, | ||
] | ||
}, | ||
{ | ||
text: "for-vue3", | ||
collapsed: false, | ||
items: [ | ||
{ text: '按钮 button', link: '/for-vue3/components/HButton' }, | ||
] | ||
}, | ||
] |
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,17 @@ | ||
export default [ | ||
{ | ||
text: "for-vue2", | ||
collapsed: false, | ||
items: [ | ||
{ text: '网络请求 Hhttp', link: '/for-vue2/utils/Hhttp' }, | ||
{ text: '开发者工具启动 h-run-devtools', link: '/for-vue2/utils/vue-cli-plugin-h-run-devtools' }, | ||
] | ||
}, | ||
{ | ||
text: "for-vue3", | ||
collapsed: false, | ||
items: [ | ||
{ text: '网络请求 Hhttp', link: '/for-vue3/utils/Hhttp' } | ||
] | ||
}, | ||
] |
This file was deleted.
Oops, something went wrong.
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,13 @@ | ||
import DefaultTheme from "vitepress/theme"; | ||
import "./custom.css"; | ||
import * as components from "../components"; | ||
|
||
export default { | ||
extends: DefaultTheme, | ||
enhanceApp(ctx) { | ||
// register global components | ||
Object.keys(components).forEach((key) => { | ||
ctx.app.component(key, components[key]); | ||
}); | ||
}, | ||
}; |
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
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,3 +1,41 @@ | ||
--- | ||
aside: false | ||
--- | ||
|
||
# h-uni | ||
|
||
暂无 | ||
## 介绍 | ||
|
||
内含各种 uniapp的组件库、工具库,您可以根据需要按需导入,或者直接去[github](https://github.com/hewx815/h-uni)复制代码 | ||
|
||
## 安装 | ||
|
||
运行以下命令: | ||
|
||
::: code-group | ||
```shell[yarn] | ||
yarn add h-uni | ||
``` | ||
```shell[npm] | ||
npm install h-uni | ||
``` | ||
::: | ||
|
||
安装成功后运行以下命令来查看版本以查看是否安装成功: | ||
|
||
::: code-group | ||
```shell[yarn] | ||
yarn h-uni | ||
``` | ||
```shell[npm] | ||
npm run h-uni | ||
``` | ||
::: | ||
|
||
如果您看到了正确的版本号证明已经成功安装 | ||
|
||
## 使用 | ||
|
||
### `vue2` + `vue-cli` + `javascript` 项目 [查看详情]() | ||
|
||
### `vue3` + `vite` + `typescript` 项目 [查看详情]() |
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,2 @@ | ||
// eslint-disable-next-line import/prefer-default-export | ||
export { default as initHOpenDevtools } from './init-h-open-devtools.js'; |
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 { execSync } from 'child_process'; | ||
|
||
export default { | ||
description: '初始化h-open-devtools', | ||
fn: () => { | ||
execSync('yarn add file:node_modules/h-uni/dist/npm/for-vue2/utils/vue-cli-plugin-h-run-devtools'); | ||
console.log('[h-uni]:vue-cli-plugin-h-run-devtools 初始化成功!'); | ||
}, | ||
}; |
Oops, something went wrong.