mirror of
https://github.com/pure-admin/vue-pure-admin.git
synced 2025-12-09 14:40:27 +08:00
Merge branch 'main' into gitee
This commit is contained in:
@@ -31,6 +31,7 @@ import Links from "@iconify-icons/ri/links-fill";
|
||||
import Search from "@iconify-icons/ri/search-line";
|
||||
import FlUser from "@iconify-icons/ri/admin-line";
|
||||
import Setting from "@iconify-icons/ri/settings-3-line";
|
||||
import MindMap from "@iconify-icons/ri/mind-map";
|
||||
import BarChart from "@iconify-icons/ri/bar-chart-horizontal-line";
|
||||
import LoginLog from "@iconify-icons/ri/window-line";
|
||||
import Artboard from "@iconify-icons/ri/artboard-line";
|
||||
@@ -54,6 +55,7 @@ addIcon("ri:table-line", Table);
|
||||
addIcon("ri:search-line", Search);
|
||||
addIcon("ri:admin-line", FlUser);
|
||||
addIcon("ri:settings-3-line", Setting);
|
||||
addIcon("ri:mind-map", MindMap);
|
||||
addIcon("ri:bar-chart-horizontal-line", BarChart);
|
||||
addIcon("ri:window-line", LoginLog);
|
||||
addIcon("ri:file-search-line", SystemLog);
|
||||
|
||||
@@ -34,9 +34,14 @@ const props = {
|
||||
type: Boolean,
|
||||
default: false
|
||||
},
|
||||
/** 控件尺寸 */
|
||||
/** 控件尺寸 */
|
||||
size: {
|
||||
type: String as PropType<"small" | "default" | "large">
|
||||
},
|
||||
/** 是否全局禁用,默认 `false` */
|
||||
disabled: {
|
||||
type: Boolean,
|
||||
default: false
|
||||
}
|
||||
};
|
||||
|
||||
@@ -57,7 +62,7 @@ export default defineComponent({
|
||||
: ref(0);
|
||||
|
||||
function handleChange({ option, index }, event: Event) {
|
||||
if (option.disabled) return;
|
||||
if (props.disabled || option.disabled) return;
|
||||
event.preventDefault();
|
||||
isNumber(props.modelValue)
|
||||
? emit("update:modelValue", index)
|
||||
@@ -67,6 +72,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function handleMouseenter({ option, index }, event: Event) {
|
||||
if (props.disabled) return;
|
||||
event.preventDefault();
|
||||
curMouseActive.value = index;
|
||||
if (option.disabled || curIndex.value === index) {
|
||||
@@ -79,6 +85,7 @@ export default defineComponent({
|
||||
}
|
||||
|
||||
function handleMouseleave(_, event: Event) {
|
||||
if (props.disabled) return;
|
||||
event.preventDefault();
|
||||
curMouseActive.value = -1;
|
||||
}
|
||||
@@ -124,14 +131,16 @@ export default defineComponent({
|
||||
ref={`labelRef${index}`}
|
||||
class={[
|
||||
"pure-segmented-item",
|
||||
option?.disabled && "pure-segmented-item-disabled"
|
||||
(props.disabled || option?.disabled) &&
|
||||
"pure-segmented-item-disabled"
|
||||
]}
|
||||
style={{
|
||||
background:
|
||||
curMouseActive.value === index ? segmentedItembg.value : "",
|
||||
color:
|
||||
!option.disabled &&
|
||||
(curIndex.value === index || curMouseActive.value === index)
|
||||
color: props.disabled
|
||||
? null
|
||||
: !option.disabled &&
|
||||
(curIndex.value === index || curMouseActive.value === index)
|
||||
? isDark.value
|
||||
? "rgba(255, 255, 255, 0.85)"
|
||||
: "rgba(0,0,0,.88)"
|
||||
|
||||
@@ -22,8 +22,9 @@ const home = 0, // 平台规定只有 home 路由的 rank 才能为 0 ,所以
|
||||
formdesign = 19,
|
||||
board = 20,
|
||||
ppt = 21,
|
||||
guide = 22,
|
||||
menuoverflow = 23;
|
||||
mind = 22,
|
||||
guide = 23,
|
||||
menuoverflow = 24;
|
||||
|
||||
export {
|
||||
home,
|
||||
@@ -48,6 +49,7 @@ export {
|
||||
formdesign,
|
||||
board,
|
||||
ppt,
|
||||
mind,
|
||||
guide,
|
||||
menuoverflow
|
||||
};
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
component: IFrame,
|
||||
meta: {
|
||||
title: $t("menus.pureBoard"),
|
||||
keepAlive: true,
|
||||
frameSrc: "https://songlh.top/paint-board/"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@ export default {
|
||||
component: IFrame,
|
||||
meta: {
|
||||
title: $t("menus.pureFormDesign"),
|
||||
keepAlive: true,
|
||||
frameSrc:
|
||||
"https://haixin-fang.github.io/vue-form-design/playground/index.html",
|
||||
frameLoading: false
|
||||
|
||||
25
src/router/modules/mind.ts
Normal file
25
src/router/modules/mind.ts
Normal file
@@ -0,0 +1,25 @@
|
||||
import { $t } from "@/plugins/i18n";
|
||||
import { mind } from "@/router/enums";
|
||||
const IFrame = () => import("@/layout/frameView.vue");
|
||||
|
||||
export default {
|
||||
path: "/mind-map",
|
||||
redirect: "/mind-map/index",
|
||||
meta: {
|
||||
icon: "ri:mind-map",
|
||||
title: $t("menus.pureMindMap"),
|
||||
rank: mind
|
||||
},
|
||||
children: [
|
||||
{
|
||||
path: "/mind-map/index",
|
||||
name: "FrameMindMap",
|
||||
component: IFrame,
|
||||
meta: {
|
||||
title: $t("menus.pureMindMap"),
|
||||
keepAlive: true,
|
||||
frameSrc: "https://wanglin2.github.io/mind-map/#/"
|
||||
}
|
||||
}
|
||||
]
|
||||
} satisfies RouteConfigsTable;
|
||||
@@ -16,6 +16,7 @@ export default {
|
||||
component: IFrame,
|
||||
meta: {
|
||||
title: "PPT",
|
||||
keepAlive: true,
|
||||
frameSrc: "https://pipipi-pikachu.github.io/PPTist/",
|
||||
frameLoading: false
|
||||
}
|
||||
|
||||
@@ -240,6 +240,9 @@ watch(size, val => (dynamicSize.value = size.value));
|
||||
<p class="mb-2">禁用</p>
|
||||
<Segmented :options="optionsDisabled" :size="dynamicSize" />
|
||||
<el-divider />
|
||||
<p class="mb-2">全局禁用</p>
|
||||
<Segmented :options="optionsBasis" :size="dynamicSize" disabled />
|
||||
<el-divider />
|
||||
<p class="mb-2">block 属性(将宽度调整为父元素宽度)</p>
|
||||
<Segmented :options="optionsBlock" block :size="dynamicSize" />
|
||||
<el-divider />
|
||||
|
||||
Reference in New Issue
Block a user