You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
10 KiB

1 week ago
  1. import{H as e,J as t,K as l,L as a,M as i,N as s,O as n,o,c,P as r,i as d,Q as u,b as p,w as h,d as m,k as y,R as f,m as g,e as b,t as _,j as k,T as S,U as v,V as x,W as $,X as I}from"./index-IX2tYR8R.js";import{_ as w}from"./u-icon.sW6sruaF.js";import{r as B}from"./uni-app.es.Bc5t55A8.js";import{_ as D}from"./_plugin-vue_export-helper.BCo6x5W8.js";const z=D({name:"u-line",mixins:[l,a,e({props:{color:{type:String,default:()=>t.line.color},length:{type:[String,Number],default:()=>t.line.length},direction:{type:String,default:()=>t.line.direction},hairline:{type:Boolean,default:()=>t.line.hairline},margin:{type:[String,Number],default:()=>t.line.margin},dashed:{type:Boolean,default:()=>t.line.dashed}}})],computed:{lineStyle(){const e={};return e.margin=this.margin,"row"===this.direction?(e.borderBottomWidth="1px",e.borderBottomStyle=this.dashed?"dashed":"solid",e.width=i(this.length),this.hairline&&(e.transform="scaleY(0.5)")):(e.borderLeftWidth="1px",e.borderLeftStyle=this.dashed?"dashed":"solid",e.height=i(this.length),this.hairline&&(e.transform="scaleX(0.5)")),e.borderColor=this.color,s(e,n(this.customStyle))}}},[["render",function(e,t,l,a,i,s){const n=d;return o(),c(n,{class:"u-line",style:r([s.lineStyle])},null,8,["style"])}],["__scopeId","data-v-e76fbe42"]]);const C=D({name:"u-cell",data:()=>({}),mixins:[l,a,e({props:{title:{type:[String,Number],default:()=>t.cell.title},label:{type:[String,Number],default:()=>t.cell.label},value:{type:[String,Number],default:()=>t.cell.value},icon:{type:String,default:()=>t.cell.icon},disabled:{type:Boolean,default:()=>t.cell.disabled},border:{type:Boolean,default:()=>t.cell.border},center:{type:Boolean,default:()=>t.cell.center},url:{type:String,default:()=>t.cell.url},linkType:{type:String,default:()=>t.cell.linkType},clickable:{type:Boolean,default:()=>t.cell.clickable},isLink:{type:Boolean,default:()=>t.cell.isLink},required:{type:Boolean,default:()=>t.cell.required},rightIcon:{type:String,default:()=>t.cell.rightIcon},arrowDirection:{type:String,default:()=>t.cell.arrowDirection},iconStyle:{type:[Object,String],default:()=>t.cell.iconStyle},rightIconStyle:{type:[Object,String],default:()=>t.cell.rightIconStyle},titleStyle:{type:[Object,String],default:()=>t.cell.titleStyle},size:{type:String,default:()=>t.cell.size},stop:{type:Boolean,default:()=>t.cell.stop},name:{type:[Number,String],default:()=>t.cell.name}}})],computed:{titleTextStyle(){return n(this.titleStyle)}},emits:["click"],methods:{addStyle:n,testEmpty:u.empty,clickHandler(e){this.disabled||(this.$emit("click",{name:this.name}),this.openPage(),this.stop&&this.preventEvent(e))}}},[["render",function(e,t,l,a,i,s){const n=B(p("u-icon"),w),u=d,S=k,v=B(p("u-line"),z);return o(),c(u,{class:y(["u-cell",[e.customClass]]),style:r([s.addStyle(e.customStyle)]),"hover-class":e.disabled||!e.clickable&&!e.isLink?"":"u-cell--clickable","hover-stay-time":250,onClick:s.clickHandler},{default:h((()=>[m(u,{class:y(["u-cell__body",[e.center&&"u-cell--center","large"===e.size&&"u-cell__body--large"]])},{default:h((()=>[m(u,{class:"u-cell__body__content"},{default:h((()=>[e.$slots.icon||e.icon?(o(),c(u,{key:0,class:"u-cell__left-icon-wrap"},{default:h((()=>[e.$slots.icon?f(e.$slots,"icon",{key:0},void 0,!0):(o(),c(n,{key:1,name:e.icon,"custom-style":e.iconStyle,size:"large"===e.size?22:18},null,8,["name","custom-style","size"]))])),_:3})):g("",!0),m(u,{class:"u-cell__title"},{default:h((()=>[e.$slots.title||!e.title?f(e.$slots,"title",{key:0},void 0,!0):(o(),c(S,{key:1,class:y(["u-cell__title-text",[e.disabled&&"u-cell--disabled","large"===e.size&&"u-cell__title-text--large"]]),style:r([s.titleTextStyle])},{default:h((()=>[b(_(e.title),1)])),_:1},8,["style","class"])),f(e.$slots,"label",{},(()=>[e.label?(o(),c(S,{key:0,class:y(["u-cell__label",[e.disabled&&"u-cell--disabled","large"===e.size&&"u-cell__label--large"]])},{default:h((()=>[b(_(e.label),1)])),_:1},8,["class"])):g("",!0)]),!0)])),_:3})])),_:3}),f(e.$slots,"value",{},(()=>[s.testEmpty(e.value)?g("",!0):(o(),c(S,{key:0,class:y(["u-cell__value",[e.disabled&&"u-cell--disabled","l