layui/example/dist/assets/textarea.4ee5b162.js
dingyongya 5b64cad09c 🐛(component): table
修复table 布局问题
column 新增minWidth和ellipsisTooltip属性

ISSUES CLOSED: https://gitee.com/layui/layui-vue/issues/I58DWF
2022-05-21 17:11:28 +08:00

62 lines
12 KiB
JavaScript

import{b as r,r as p,o as w,h,e as t,d as o,z as c,L as g,f as n,g as a}from"./vendor.e7911ee1.js";const V={class:"markdown-body"},q=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-textarea")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u8BF7\u8F93\u5165\u63CF\u8FF0"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("data1"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-textarea")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" data1 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
data1
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),j=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-textarea")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("Input \u4E8B\u4EF6"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("data2"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"@input"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("input"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-textarea")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" data2 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"const"),a(),n("span",{class:"token function-variable function"},"input"),a(),n("span",{class:"token operator"},"="),a(),n("span",{class:"token keyword"},"function"),n("span",{class:"token punctuation"},"("),a(),n("span",{class:"token parameter"},"val"),a(),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
console`),n("span",{class:"token punctuation"},"."),n("span",{class:"token function"},"log"),n("span",{class:"token punctuation"},"("),a("val"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
data2`),n("span",{class:"token punctuation"},","),a(`
input
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),I=n("pre",null,[n("code",{"v-pre":""},[n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("lay-textarea")]),a(),n("span",{class:"token attr-name"},"placeholder"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("\u7981\u6B62\u8F93\u5165"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},"v-model"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("data3"),n("span",{class:"token punctuation"},'"')]),a(),n("span",{class:"token attr-name"},":disabled"),n("span",{class:"token attr-value"},[n("span",{class:"token punctuation attr-equals"},"="),n("span",{class:"token punctuation"},'"'),a("disabled"),n("span",{class:"token punctuation"},'"')]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("lay-textarea")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("template")]),n("span",{class:"token punctuation"},">")]),a(`
`),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"<"),a("script")]),n("span",{class:"token punctuation"},">")]),n("span",{class:"token script"},[n("span",{class:"token language-javascript"},[a(`
`),n("span",{class:"token keyword"},"import"),a(),n("span",{class:"token punctuation"},"{"),a(" ref "),n("span",{class:"token punctuation"},"}"),a(),n("span",{class:"token keyword"},"from"),a(),n("span",{class:"token string"},"'vue'"),a(`
`),n("span",{class:"token keyword"},"export"),a(),n("span",{class:"token keyword"},"default"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token function"},"setup"),n("span",{class:"token punctuation"},"("),n("span",{class:"token punctuation"},")"),a(),n("span",{class:"token punctuation"},"{"),a(`
`),n("span",{class:"token keyword"},"const"),a(" data3 "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token string"},'""'),n("span",{class:"token punctuation"},")"),n("span",{class:"token punctuation"},";"),a(`
`),n("span",{class:"token keyword"},"const"),a(" disabled "),n("span",{class:"token operator"},"="),a(),n("span",{class:"token function"},"ref"),n("span",{class:"token punctuation"},"("),n("span",{class:"token boolean"},"true"),n("span",{class:"token punctuation"},")"),a(`
`),n("span",{class:"token keyword"},"return"),a(),n("span",{class:"token punctuation"},"{"),a(`
data3`),n("span",{class:"token punctuation"},","),a(`
disabled
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`),n("span",{class:"token punctuation"},"}"),a(`
`)])]),n("span",{class:"token tag"},[n("span",{class:"token tag"},[n("span",{class:"token punctuation"},"</"),a("script")]),n("span",{class:"token punctuation"},">")]),a(`
`)])],-1),B=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u5C5E\u6027"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53EF\u9009\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"name"),n("td",null,"\u539F\u59CB\u5C5E\u6027 name"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"placeholder"),n("td",null,"\u63D0\u793A\u4FE1\u606F"),n("td",null,"\u2013")]),n("tr",null,[n("td",null,"disabled"),n("td",null,"\u7981\u7528"),n("td",null,[n("code",null,"true"),a(),n("code",null,"false")])]),n("tr",null,[n("td",null,"v-model"),n("td",null,"\u503C"),n("td",null,"\u2013")])])],-1),N=n("table",null,[n("thead",null,[n("tr",null,[n("th",null,"\u4E8B\u4EF6"),n("th",null,"\u63CF\u8FF0"),n("th",null,"\u53EF\u9009\u503C")])]),n("tbody",null,[n("tr",null,[n("td",null,"input"),n("td",null,"\u539F\u751F input \u4E8B\u4EF6"),n("td",null,"event : \u4E8B\u4EF6\u5BF9\u8C61")]),n("tr",null,[n("td",null,"foucs"),n("td",null,"\u539F\u751F foucs \u4E8B\u4EF6"),n("td",null,"event : \u4E8B\u4EF6\u5BF9\u8C61")]),n("tr",null,[n("td",null,"blur"),n("td",null,"\u539F\u751F blur \u4E8B\u4EF6"),n("td",null,"\u2013")])])],-1),E={setup(U,{expose:_}){_({frontmatter:{}});let u=r(""),k=r(""),v=function(y){console.log(y)},i=r(""),b=r(!0);return(y,e)=>{const l=p("lay-field"),d=p("lay-textarea"),m=p("lay-code"),f=p("lay-table-box"),x=p("lay-comment");return w(),h("div",V,[t(l,{title:"\u57FA\u7840\u4F7F\u7528",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[q]),default:o(()=>[t(d,{placeholder:"\u8BF7\u8F93\u5165\u63CF\u8FF0",modelValue:c(u),"onUpdate:modelValue":e[0]||(e[0]=s=>g(u)?u.value=s:u=s)},null,8,["modelValue"])]),_:1}),t(l,{title:"\u4E8B\u4EF6\u56DE\u8C03",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[j]),default:o(()=>[t(d,{placeholder:"Input \u4E8B\u4EF6",modelValue:c(k),"onUpdate:modelValue":e[1]||(e[1]=s=>g(k)?k.value=s:k=s),onInput:c(v)},null,8,["modelValue","onInput"])]),_:1}),t(l,{title:"\u7981\u6B62\u8F93\u5165",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(m,null,{code:o(()=>[I]),default:o(()=>[t(d,{placeholder:"\u7981\u6B62\u8F93\u5165",modelValue:c(i),"onUpdate:modelValue":e[2]||(e[2]=s=>g(i)?i.value=s:i=s),disabled:c(b)},null,8,["modelValue","disabled"])]),_:1}),t(l,{title:"\u6587\u672C\u57DF\u5C5E\u6027",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(f,null,{default:o(()=>[B]),_:1}),t(l,{title:"\u6587\u672C\u57DF\u4E8B\u4EF6",style:{"margin-top":"20px","margin-bottom":"20px"}}),t(f,null,{default:o(()=>[N]),_:1}),t(x)])}}};export{E as default};