1
This commit is contained in:
1
package/component/es/pageHeader/index.css
Normal file
1
package/component/es/pageHeader/index.css
Normal file
@@ -0,0 +1 @@
|
||||
.lay-page-header{display:flex;line-height:24px}.lay-page-header__left{display:flex;cursor:pointer;margin-right:40px;position:relative;color:var(--global-neutral-color-8)}.lay-page-header__left:after{content:"";position:absolute;width:1px;height:16px;right:-20px;top:50%;transform:translateY(-50%);background-color:var(--global-neutral-color-8)}.lay-page-header__left:hover .layui-icon-return,.lay-page-header__left:hover .lay-page-header__title{color:var(--global-checked-color)!important}.lay-page-header__left .layui-icon-return{font-size:14px;margin-right:6px;align-self:center}.lay-page-header__title{font-size:14px}.lay-page-header__content{font-size:18px;color:#393d49}
|
||||
43
package/component/es/pageHeader/index.js
Normal file
43
package/component/es/pageHeader/index.js
Normal file
@@ -0,0 +1,43 @@
|
||||
import { w as withInstall } from "../badge/index2.js";
|
||||
import { defineComponent, useSlots, openBlock, createElementBlock, createElementVNode, renderSlot, normalizeClass, toDisplayString, unref, Fragment, createTextVNode } from "vue";
|
||||
var index = /* @__PURE__ */ (() => '.lay-page-header{display:flex;line-height:24px}.lay-page-header__left{display:flex;cursor:pointer;margin-right:40px;position:relative;color:var(--global-neutral-color-8)}.lay-page-header__left:after{content:"";position:absolute;width:1px;height:16px;right:-20px;top:50%;transform:translateY(-50%);background-color:var(--global-neutral-color-8)}.lay-page-header__left:hover .layui-icon-return,.lay-page-header__left:hover .lay-page-header__title{color:var(--global-checked-color)!important}.lay-page-header__left .layui-icon-return{font-size:14px;margin-right:6px;align-self:center}.lay-page-header__title{font-size:14px}.lay-page-header__content{font-size:18px;color:#393d49}\n')();
|
||||
const _hoisted_1 = { class: "lay-page-header" };
|
||||
const _hoisted_2 = { class: "lay-page-header__title" };
|
||||
const _hoisted_3 = { class: "lay-page-header__content" };
|
||||
const __default__ = {
|
||||
name: "LayPageHeader"
|
||||
};
|
||||
const _sfc_main = defineComponent({
|
||||
...__default__,
|
||||
props: {
|
||||
content: { default: "" },
|
||||
backText: { default: "\u8FD4\u56DE" },
|
||||
backIcon: { default: "layui-icon-return" }
|
||||
},
|
||||
emits: ["back"],
|
||||
setup(__props, { emit: emits }) {
|
||||
const slots = useSlots();
|
||||
return (_ctx, _cache) => {
|
||||
return openBlock(), createElementBlock("div", _hoisted_1, [
|
||||
createElementVNode("div", {
|
||||
class: "lay-page-header__left",
|
||||
onClick: _cache[0] || (_cache[0] = ($event) => emits("back"))
|
||||
}, [
|
||||
renderSlot(_ctx.$slots, "backIcon", {}, () => [
|
||||
createElementVNode("i", {
|
||||
class: normalizeClass(["layui-icon", [__props.backIcon]])
|
||||
}, null, 2)
|
||||
]),
|
||||
createElementVNode("div", _hoisted_2, toDisplayString(__props.backText), 1)
|
||||
]),
|
||||
createElementVNode("div", _hoisted_3, [
|
||||
unref(slots).default ? renderSlot(_ctx.$slots, "default", { key: 0 }) : (openBlock(), createElementBlock(Fragment, { key: 1 }, [
|
||||
createTextVNode(toDisplayString(__props.content), 1)
|
||||
], 64))
|
||||
])
|
||||
]);
|
||||
};
|
||||
}
|
||||
});
|
||||
const component = withInstall(_sfc_main);
|
||||
export { component as default };
|
||||
Reference in New Issue
Block a user