feat(navigation): hard-switch to Zibll navigation and Font Awesome 5
This commit is contained in:
1 parent
3c3ddac8be
commit
a0b84977a2
630 files changed
+101647
-11293
No files matched your search
@@ -12,7 +12,7 @@
|
||||
<template #header>
|
||||
<div class="aksrt-card-header-row">
|
||||
<div class="aksrt-card-header-row__left">
|
||||
<span class="header-icon"><i class="fas fa-cog"></i></span>
|
||||
<span class="header-icon"><i class="fa fas fa-cog"></i></span>
|
||||
<strong class="aksrt-card-header-row__title">基础设置</strong>
|
||||
</div>
|
||||
</div>
|
||||
@@ -46,11 +46,11 @@
|
||||
<template #header>
|
||||
<div class="aksrt-card-header-row">
|
||||
<div class="aksrt-card-header-row__left">
|
||||
<span class="header-icon"><i class="fas fa-list-ul"></i></span>
|
||||
<span class="header-icon"><i class="fa fas fa-list-ul"></i></span>
|
||||
<strong class="aksrt-card-header-row__title">Tab按钮配置 ({{ form.items.length }})</strong>
|
||||
</div>
|
||||
<n-button type="primary" size="small" @click="addItem">
|
||||
<template #icon><i class="fas fa-plus"></i></template>
|
||||
<template #icon><i class="fa fas fa-plus"></i></template>
|
||||
添加按钮
|
||||
</n-button>
|
||||
</div>
|
||||
@@ -72,7 +72,7 @@
|
||||
<div class="tabbar-sort__item">
|
||||
<div class="tabbar-sort__main">
|
||||
<button type="button" class="tabbar-sort__handle" aria-label="拖拽排序">
|
||||
<i class="fas fa-grip-vertical"></i>
|
||||
<i class="fa fas fa-bars"></i>
|
||||
</button>
|
||||
<span class="tabbar-sort__icon">
|
||||
<i v-if="element.icon" :class="element.icon"></i>
|
||||
@@ -90,11 +90,11 @@
|
||||
</div>
|
||||
<div class="tabbar-sort__actions">
|
||||
<n-button size="tiny" quaternary type="primary" @click="editItem(index)">
|
||||
<template #icon><i class="fas fa-edit" style="font-size:12px;" /></template>
|
||||
<template #icon><i class="fa fas fa-edit" style="font-size:12px;" /></template>
|
||||
编辑
|
||||
</n-button>
|
||||
<n-button size="tiny" quaternary type="error" @click="deleteItem(index)">
|
||||
<template #icon><i class="fas fa-trash-alt" style="font-size:12px;" /></template>
|
||||
<template #icon><i class="fa fas fa-trash-alt" style="font-size:12px;" /></template>
|
||||
删除
|
||||
</n-button>
|
||||
</div>
|
||||
@@ -129,14 +129,14 @@
|
||||
</n-form-item>
|
||||
|
||||
<n-form-item label="图标 (Font Awesome)">
|
||||
<n-input v-model:value="editingItem.icon" placeholder="例如: fas fa-home" />
|
||||
<n-input v-model:value="editingItem.icon" placeholder="例如: fa fas fa-home" />
|
||||
<template #feedback>
|
||||
<div class="icon-preview-row">
|
||||
<span>预览:</span>
|
||||
<i v-if="editingItem.icon" :class="editingItem.icon" style="font-size: 20px;"></i>
|
||||
<span v-else class="muted-text">无图标</span>
|
||||
<a href="https://fontawesome.com/search?m=free" target="_blank" rel="noopener" style="margin-left: 12px;">
|
||||
<i class="fas fa-external-link-alt"></i> Font Awesome 图标库
|
||||
<i class="fa fas fa-external-link-alt"></i> Font Awesome 图标库
|
||||
</a>
|
||||
</div>
|
||||
</template>
|
||||
@@ -198,7 +198,7 @@
|
||||
<div class="add-items-editor__head">
|
||||
<strong>发布菜单项</strong>
|
||||
<n-button size="small" type="primary" @click="appendAddItem">
|
||||
<template #icon><i class="fas fa-plus" /></template>
|
||||
<template #icon><i class="fa fas fa-plus" /></template>
|
||||
添加子项
|
||||
</n-button>
|
||||
</div>
|
||||
@@ -227,13 +227,13 @@
|
||||
<template #item="{ element, index: subIndex }">
|
||||
<div class="add-items-editor__row">
|
||||
<button type="button" class="add-items-editor__drag" aria-label="拖拽排序">
|
||||
<i class="fas fa-grip-vertical"></i>
|
||||
<i class="fa fas fa-bars"></i>
|
||||
</button>
|
||||
<n-input v-model:value="element.label" placeholder="名称,例如:写文章" />
|
||||
<n-input v-model:value="element.icon" placeholder="图标,例如:fas fa-pen" />
|
||||
<n-input v-model:value="element.icon" placeholder="图标,例如:fa fas fa-pen" />
|
||||
<n-input v-model:value="element.url" placeholder="链接,例如:/wp-admin/post-new.php" />
|
||||
<n-button quaternary type="error" @click="removeAddItem(subIndex)">
|
||||
<template #icon><i class="fas fa-trash-alt" /></template>
|
||||
<template #icon><i class="fa fas fa-trash-alt" /></template>
|
||||
</n-button>
|
||||
</div>
|
||||
</template>
|
||||
@@ -327,15 +327,15 @@ const typeLabelMap = {
|
||||
}
|
||||
|
||||
const typeDefaults = {
|
||||
home: { icon: 'fas fa-home', text: '首页' },
|
||||
category: { icon: 'fas fa-th-large', text: '分类' },
|
||||
link: { icon: 'fas fa-link', text: '链接' },
|
||||
add: { icon: 'fas fa-plus', text: '发布' },
|
||||
user: { icon: 'fas fa-user', text: '用户中心' },
|
||||
auth: { icon: 'fas fa-user', text: '我的' },
|
||||
search: { icon: 'fas fa-search', text: '搜索' },
|
||||
msg: { icon: 'fas fa-bell', text: '消息' },
|
||||
pay_vip: { icon: 'fas fa-crown', text: '会员' },
|
||||
home: { icon: 'fa fas fa-home', text: '首页' },
|
||||
category: { icon: 'fa fas fa-th-large', text: '分类' },
|
||||
link: { icon: 'fa fas fa-link', text: '链接' },
|
||||
add: { icon: 'fa fas fa-plus', text: '发布' },
|
||||
user: { icon: 'fa fas fa-user', text: '用户中心' },
|
||||
auth: { icon: 'fa fas fa-user', text: '我的' },
|
||||
search: { icon: 'fa fas fa-search', text: '搜索' },
|
||||
msg: { icon: 'fa fas fa-bell', text: '消息' },
|
||||
pay_vip: { icon: 'fa fas fa-gem', text: '会员' },
|
||||
}
|
||||
|
||||
const enabledPreviewItems = computed(() => form.items.filter((item) => item.enabled))
|
||||
@@ -361,10 +361,10 @@ function getItemSummary(item) {
|
||||
}
|
||||
|
||||
const addPresets = [
|
||||
{ label: '写文章', icon: 'fas fa-pen-fancy', url: '/submit' },
|
||||
{ label: '投稿页', icon: 'fas fa-file-alt', url: '/submit' },
|
||||
{ label: '发布资源', icon: 'fas fa-cloud-upload-alt', url: '/resource-new' },
|
||||
{ label: '创作中心', icon: 'fas fa-palette', url: '/creator' },
|
||||
{ label: '写文章', icon: 'fa fas fa-pen', url: '/submit' },
|
||||
{ label: '投稿页', icon: 'fa fas fa-file-alt', url: '/submit' },
|
||||
{ label: '发布资源', icon: 'fa fas fa-cloud-upload-alt', url: '/resource-new' },
|
||||
{ label: '创作中心', icon: 'fa fas fa-paint-brush', url: '/creator' },
|
||||
]
|
||||
|
||||
function appendAddPreset(preset) {
|
||||
@@ -381,7 +381,7 @@ function appendAddItem() {
|
||||
editingItem.add_items.push({
|
||||
id: `add_${Date.now()}_${editingItem.add_items.length}`,
|
||||
label: '',
|
||||
icon: 'fas fa-pen',
|
||||
icon: 'fa fas fa-pen',
|
||||
url: '',
|
||||
})
|
||||
}
|
||||
@@ -421,7 +421,7 @@ function addItem() {
|
||||
Object.assign(editingItem, {
|
||||
id: `tab_${Date.now()}`,
|
||||
type: 'link',
|
||||
icon: 'fas fa-link',
|
||||
icon: 'fa fas fa-link',
|
||||
text: '链接',
|
||||
link: '',
|
||||
badge: '',
|
||||
@@ -489,7 +489,7 @@ function saveItem() {
|
||||
? editingItem.add_items.filter((sub) => sub.label && sub.url).map((sub) => ({
|
||||
id: sub.id || `add_${Date.now()}`,
|
||||
label: sub.label,
|
||||
icon: sub.icon || 'fas fa-pen',
|
||||
icon: sub.icon || 'fa fas fa-pen',
|
||||
url: sub.url,
|
||||
}))
|
||||
: [],
|
||||
|
||||
Reference in new issue
Block a user