router hash --> web 完善 utterances 集成
This commit is contained in:
parent
9e828af4ed
commit
d2ae215227
@ -19,6 +19,7 @@
|
||||
<li>[新增] tooltip 组件, 便捷的信息提示</li>
|
||||
<li>[新增] input-number 组件, 数字输入框, 方便数字录入。</li>
|
||||
<li>[加强] layer 组件 area 属性, 支持 字符串 与 数组 类型, 默认为 auto 宽高自适应。</li>
|
||||
<li>[集成] utteranc.es 文档评论。</li>
|
||||
<li>[升级] layer-vue 1.1.7。</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
@ -4,18 +4,12 @@
|
||||
<script>
|
||||
export default {
|
||||
name: 'Utterances',
|
||||
props: {
|
||||
id: {
|
||||
type: Number,
|
||||
default: 6
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
initValine () {
|
||||
const utterances = document.createElement('script');
|
||||
utterances.type = 'text/javascript';
|
||||
utterances.async = true;
|
||||
utterances.setAttribute('issue-number', this.id)
|
||||
utterances.setAttribute('issue-term', 'pathname')
|
||||
utterances.setAttribute('theme','github-light')
|
||||
utterances.setAttribute('repo',`layui-vue/layui-vue`)
|
||||
utterances.crossorigin = 'anonymous';
|
||||
|
@ -14,9 +14,7 @@ export function createApp(): {
|
||||
router: Router
|
||||
} {
|
||||
const app =
|
||||
import.meta.env.MODE === 'production'
|
||||
? createSSRApp(Layout)
|
||||
: _createApp(Layout)
|
||||
import.meta.env.MODE === 'production' ? createSSRApp(Layout) : _createApp(Layout)
|
||||
const router = createRouter()
|
||||
|
||||
app
|
||||
|
@ -1,6 +1,7 @@
|
||||
import {
|
||||
createRouter as _createRouter,
|
||||
createWebHashHistory,
|
||||
createWebHistory,
|
||||
Router,
|
||||
} from 'vue-router'
|
||||
import zhCN from './zh-CN'
|
||||
@ -10,7 +11,7 @@ const routes = [...zhCN]
|
||||
export function createRouter(): Router {
|
||||
const baseUrl = import.meta.env.BASE_URL
|
||||
return _createRouter({
|
||||
history: createWebHashHistory(baseUrl),
|
||||
history: createWebHistory(baseUrl),
|
||||
routes: routes,
|
||||
})
|
||||
}
|
@ -49,9 +49,9 @@ const zhCN = [
|
||||
meta: { title: '问题' },
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/guide/contribution',
|
||||
path: '/zh-CN/guide/team',
|
||||
component: () => import('../../docs/zh-CN/guide/contribution.md'),
|
||||
meta: { title: '贡献' },
|
||||
meta: { title: '团队' },
|
||||
},
|
||||
{
|
||||
path: '/zh-CN/guide/norms',
|
||||
|
@ -100,9 +100,9 @@ export default {
|
||||
},
|
||||
{
|
||||
id: 6,
|
||||
title: '贡献',
|
||||
subTitle: 'contribution',
|
||||
path: '/zh-CN/guide/contribution',
|
||||
title: '团队',
|
||||
subTitle: 'team',
|
||||
path: '/zh-CN/guide/team',
|
||||
}
|
||||
],
|
||||
},
|
||||
|
@ -44,7 +44,7 @@ const allLeftChange = function (checked: any) {
|
||||
|
||||
watch(
|
||||
leftSelectedKeys,
|
||||
function () {
|
||||
() => {
|
||||
if (
|
||||
leftDataSource.value.length === leftSelectedKeys.value.length &&
|
||||
leftDataSource.value.length != 0
|
||||
@ -70,7 +70,7 @@ const allRightChange = function (checked: any) {
|
||||
|
||||
watch(
|
||||
rightSelectedKeys,
|
||||
function () {
|
||||
() => {
|
||||
if (
|
||||
rightDataSource.value.length === rightSelectedKeys.value.length &&
|
||||
rightDataSource.value.length != 0
|
||||
|
Loading…
Reference in New Issue
Block a user