| 1 |
- import{_ as e}from"./u-input.cq_N7lcW.js";import{k as a,p as t,m as l,w as n,q as o,t as r,v as d,z as u,E as i,G as s,o as p,B as m,F as h,C as f}from"./index-C9TJPork.js";import{r as c}from"./uni-app.es.CUt9gedF.js";import{_ as g}from"./_plugin-vue_export-helper.BCo6x5W8.js";import{_ as V,a as b}from"./u-radio-group.BjzEj90s.js";const x=g({name:"jnpf-textarea",props:{modelValue:{type:String,default:""},placeholder:{type:String,default:"请输入"},maxlength:{type:[Number,String],default:null},disabled:{type:Boolean,default:!1},clearable:{type:Boolean,default:!1},showCount:{type:Boolean,default:!1}},data:()=>({innerValue:""}),watch:{modelValue:{handler(e){this.innerValue=e},immediate:!0}},methods:{onInput(e){this.$emit("update:modelValue",e),this.$emit("change",e)}}},[["render",function(m,h,f,g,V,b){const x=c(a("u-input"),e),y=s,_=p;return t(),l(_,{class:i(["jnpf-textarea",f.showCount?"jnpf-textarea-count":""])},{default:n((()=>[o(x,{"input-align":"right",border:!1,type:"textarea",modelValue:V.innerValue,"onUpdate:modelValue":h[0]||(h[0]=e=>V.innerValue=e),placeholder:f.placeholder,disabled:f.disabled,onInput:b.onInput,clearable:!f.disabled&&f.clearable,maxlength:f.maxlength||0===f.maxlength?f.maxlength:9999},null,8,["modelValue","placeholder","disabled","onInput","clearable","maxlength"]),f.showCount?(t(),l(_,{key:0,class:"textarea-count"},{default:n((()=>[o(y,null,{default:n((()=>[r(d(V.innerValue?String(V.innerValue).length:0),1)])),_:1}),f.maxlength?(t(),l(y,{key:0},{default:n((()=>[r("/"+d(f.maxlength),1)])),_:1})):u("",!0)])),_:1})):u("",!0)])),_:1},8,["class"])}],["__scopeId","data-v-1b23dd04"]]);const y=g({inheritAttrs:!1,name:"jnpfRadio",props:{modelValue:{type:[String,Number,Boolean]},direction:{type:String,default:"horizontal"},options:{type:Array,default:()=>[]},props:{type:Object,default:()=>({label:"fullName",value:"id"})},disabled:{type:Boolean,default:!1}},data:()=>({innerValue:""}),watch:{modelValue:{handler(e){this.innerValue=e},immediate:!0}},methods:{onChange(e,a){const t=this.options.filter((a=>e==a[this.props.value]))||[];this.$emit("update:modelValue",e),this.$emit("change",e,t[0])}}},[["render",function(e,o,u,i,s,p){const g=c(a("u-radio"),V),x=c(a("u-radio-group"),b);return t(),l(x,{class:"jnpf-radio",modelValue:s.innerValue,"onUpdate:modelValue":o[0]||(o[0]=e=>s.innerValue=e),disabled:u.disabled,wrap:"horizontal"!=u.direction,onChange:p.onChange},{default:n((()=>[(t(!0),m(h,null,f(u.options,((e,a)=>(t(),l(g,{key:a,name:e[u.props.value]},{default:n((()=>[r(d(e[u.props.label]),1)])),_:2},1032,["name"])))),128))])),_:1},8,["modelValue","disabled","wrap","onChange"])}]]);export{y as _,x as a};
|