UNPKG

uv-ui

Version:

基于vue3的移动端组件库

2 lines (1 loc) 1.87 kB
"use strict";const e=require("vue"),n=require("../icon/index.cjs");require("./nav-bar.vue_vue_type_style_index_0_lang.cjs");const i={key:0,class:"uv-nav-bar-placeholder"},c={class:"uv-nav-bar-center"},d={name:"UvNavBar"},s=Object.assign(d,{props:{title:{type:String},bgColor:{type:String,default:"#fff"},leftTitle:{type:String},leftColor:{type:String,default:"#419dfb"},rightTitle:{type:String},leftArrow:{type:Boolean,default:!1},arrowProps:{type:Object},border:{type:Boolean,default:!0},zIndex:{type:[Number,String],default:1},fixed:{type:Boolean,default:!1},placeholder:{type:Boolean,default:!1}},emits:["click-left","click-right"],setup(t,{emit:r}){const o=()=>{r("click-left")},a=()=>{r("click-right")};return(l,f)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["uv-nav-bar",t.fixed?"uv-nav-bar-fixed":""]),style:e.normalizeStyle({border:t.border?"1px solid #f7f8fa":"",zIndex:t.zIndex})},[t.placeholder&&t.fixed?(e.openBlock(),e.createElementBlock("div",i)):e.createCommentVNode("",!0),e.createElementVNode("div",{class:"uv-nav-bar-content",style:e.normalizeStyle({backgroundColor:t.bgColor})},[e.createElementVNode("div",{class:"uv-nav-bar-left",onClick:o},[e.renderSlot(l.$slots,"left",{},()=>[t.leftArrow?(e.openBlock(),e.createBlock(e.unref(n),e.mergeProps({key:0,name:"arrow-left-bold",size:"18",color:t.leftColor},t.arrowProps),null,16,["color"])):e.createCommentVNode("",!0),e.createElementVNode("div",{style:e.normalizeStyle({color:t.leftColor}),class:"uv-nav-bar-left-text"},e.toDisplayString(t.leftTitle),5)])]),e.createElementVNode("div",c,[e.renderSlot(l.$slots,"title",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)])]),e.createElementVNode("div",{class:"uv-nav-bar-right",onClick:a},[e.renderSlot(l.$slots,"right",{},()=>[e.createElementVNode("div",null,e.toDisplayString(t.rightTitle),1)])])],4)],6))}});module.exports=s;