travel-ui 1.1.4 → 1.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/style.css +1 -1
- package/travel-ui.es.js +1 -1
- package/travel-ui.umd.js +1 -1
package/package.json
CHANGED
package/style.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.tw-airline-info[data-v-75e539f7]{color:#1890ff}.tw-comments[data-v-
|
|
1
|
+
.tw-airline-info[data-v-75e539f7]{color:#1890ff}.tw-comments[data-v-69250e50]{width:100%}.tw-comments>.comments[data-v-69250e50]{width:100%}.tw-comments>.comments>.comment[data-v-69250e50]{width:100%;margin-bottom:16px}.tw-comments>.comments>.comment>.header[data-v-69250e50]{display:flex;flex-direction:row;margin-bottom:8px;font-size:12px}.tw-comments>.comments>.comment>.header>.name[data-v-69250e50]{color:#00000073;margin-right:20px}.tw-comments>.comments>.comment>.header>.time[data-v-69250e50]{color:#00000040}.tw-comments>.comments>.comment>.content[data-v-69250e50]{font-size:14px;line-height:16px;color:#f0182a}.tw-comments>.comments>.comment>.files[data-v-69250e50]{width:100%;display:flex;flex-direction:row;align-content:wrap;margin-bottom:12px;gap:8px;flex-wrap:wrap}.tw-comments>.comments>.comment>.files>.file[data-v-69250e50]{border:1px solid #e8e8e8;padding:12px;border-radius:8px;display:flex;flex-direction:row;background-color:#fff}.tw-comments>.comments>.comment>.files>.file>.logo[data-v-69250e50]{width:40px;height:40px}.tw-comments>.comments>.comment>.files>.file>.detail[data-v-69250e50]{margin-left:12px}.tw-comments>.comments>.comment>.files>.file>.detail>.fileName[data-v-69250e50]{font-size:14px;line-height:16px;height:16px;font-weight:700;margin-bottom:8px;max-width:100px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.tw-comments>.comments>.comment>.files>.file>.detail>.buttons[data-v-69250e50]{width:100%;display:flex;flex-direction:row;justify-content:flex-end;gap:12px;font-size:12px}.tw-comments>.comments>.comment>.files>.file>.detail>.buttons[data-v-69250e50]>*{cursor:pointer;color:#f0182a}.tw-comments>.comments>.comment>.files>.file>.detail>.buttons[data-v-69250e50]>*:hover{opacity:.8}.tw-comments>.addNew[data-v-69250e50]{width:100%;margin-top:24px;background-color:#fff;border:1px solid #e8e8e8;border-radius:4px;padding:12px}.tw-comments>.addNew>.files>.file[data-v-69250e50]{display:flex;flex-direction:row;justify-content:flex-start;align-items:center;gap:8px;color:#f0182a;margin-bottom:8px}.tw-comments>.addNew>.files>.file>.name[data-v-69250e50]{font-size:12px;margin:0}.tw-comments>.addNew>.files>.file>.delete[data-v-69250e50]{cursor:pointer}.tw-comments>.addNew>.files>.file>.delete[data-v-69250e50]:hover{opacity:.8}.tw-comments>.addNew>.detail[data-v-69250e50]{display:flex;flex-direction:row;gap:12px}
|
package/travel-ui.es.js
CHANGED
|
@@ -1103,7 +1103,7 @@ const dn = {
|
|
|
1103
1103
|
}, 8, ["theme"]);
|
|
1104
1104
|
};
|
|
1105
1105
|
}
|
|
1106
|
-
}), jn = /* @__PURE__ */ Me(An, [["__scopeId", "data-v-
|
|
1106
|
+
}), jn = /* @__PURE__ */ Me(An, [["__scopeId", "data-v-69250e50"]]), In = [ot, lt, jn], Pn = function(e) {
|
|
1107
1107
|
e.component(V.name, V), e.component(oe.name, oe), e.component(me.name, me), e.component(ge.name, ge), e.component(be.name, be), In.forEach((n) => {
|
|
1108
1108
|
e.component(n.name, n);
|
|
1109
1109
|
});
|
package/travel-ui.umd.js
CHANGED
|
@@ -54,4 +54,4 @@
|
|
|
54
54
|
}
|
|
55
55
|
`;function Se(e){return e&&e.getRootNode&&e.getRootNode()}function mt(e){return G()?Se(e)instanceof ShadowRoot:!1}function pt(e){return mt(e)?Se(e):null}var gt=function(){var n=be(),t=n.prefixCls,r=n.csp,a=o.getCurrentInstance(),i=dt;t&&(i=i.replace(/anticon/g,t.value)),o.nextTick(function(){if(G()){var c=a.vnode.el,l=pt(c);ct(i,"@ant-design-vue-icons",{prepend:!0,csp:r.value,attachTo:l})}})},bt=["icon","primaryColor","secondaryColor"];function ht(e,n){if(e==null)return{};var t=yt(e,n),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function yt(e,n){if(e==null)return{};var t={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}function $(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){vt(e,a,t[a])})}return e}function vt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var A=o.reactive({primaryColor:"#333",secondaryColor:"#E6E6E6",calculated:!1});function Ct(e){var n=e.primaryColor,t=e.secondaryColor;A.primaryColor=n,A.secondaryColor=t||ke(n),A.calculated=!!t}function _t(){return $({},A)}var _=function(n,t){var r=$({},n,t.attrs),a=r.icon,i=r.primaryColor,c=r.secondaryColor,l=ht(r,bt),f=A;if(i&&(f={primaryColor:i,secondaryColor:c||ke(i)}),ut(we(a),"icon should be icon definiton, but got ".concat(a)),!we(a))return null;var s=a;return s&&typeof s.icon=="function"&&(s=$({},s,{icon:s.icon(f.primaryColor,f.secondaryColor)})),Q(s.icon,"svg-".concat(s.name),$({},l,{"data-icon":s.name,width:"1em",height:"1em",fill:"currentColor","aria-hidden":"true"}))};_.props={icon:Object,primaryColor:String,secondaryColor:String,focusable:String},_.inheritAttrs=!1,_.displayName="IconBase",_.getTwoToneColors=_t,_.setTwoToneColors=Ct;function wt(e,n){return Ot(e)||St(e,n)||xt(e,n)||kt()}function kt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
56
56
|
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xt(e,n){if(e){if(typeof e=="string")return Oe(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Oe(e,n)}}function Oe(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function St(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],a=!0,i=!1,c,l;try{for(t=t.call(e);!(a=(c=t.next()).done)&&(r.push(c.value),!(n&&r.length===n));a=!0);}catch(f){i=!0,l=f}finally{try{!a&&t.return!=null&&t.return()}finally{if(i)throw l}}return r}}function Ot(e){if(Array.isArray(e))return e}function Te(e){var n=xe(e),t=wt(n,2),r=t[0],a=t[1];return _.setTwoToneColors({primaryColor:r,secondaryColor:a})}function Tt(){var e=_.getTwoToneColors();return e.calculated?[e.primaryColor,e.secondaryColor]:e.primaryColor}var Et=o.defineComponent({name:"InsertStyles",setup:function(){return gt(),function(){return null}}}),Nt=["class","icon","spin","rotate","tabindex","twoToneColor","onClick"];function At(e,n){return Ft(e)||Pt(e,n)||It(e,n)||jt()}function jt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
|
|
57
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function It(e,n){if(e){if(typeof e=="string")return Ee(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ee(e,n)}}function Ee(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Pt(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],a=!0,i=!1,c,l;try{for(t=t.call(e);!(a=(c=t.next()).done)&&(r.push(c.value),!(n&&r.length===n));a=!0);}catch(f){i=!0,l=f}finally{try{!a&&t.return!=null&&t.return()}finally{if(i)throw l}}return r}}function Ft(e){if(Array.isArray(e))return e}function Ne(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){j(e,a,t[a])})}return e}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Bt(e,n){if(e==null)return{};var t=Mt(e,n),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function Mt(e,n){if(e==null)return{};var t={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}Te(tt.primary);var S=function(n,t){var r,a=Ne({},n,t.attrs),i=a.class,c=a.icon,l=a.spin,f=a.rotate,s=a.tabindex,w=a.twoToneColor,k=a.onClick,u=Bt(a,Nt),g=be(),O=g.prefixCls,T=g.rootClassName,L=(r={},j(r,T.value,!!T.value),j(r,O.value,!0),j(r,"".concat(O.value,"-").concat(c.name),!!c.name),j(r,"".concat(O.value,"-spin"),!!l||c.name==="loading"),r),I=s;I===void 0&&k&&(I=-1);var y=f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0,E=xe(w),x=At(E,2),J=x[0],Pe=x[1];return o.createVNode("span",Ne({role:"img","aria-label":c.name},u,{onClick:k,class:[L,i],tabindex:I}),[o.createVNode(_,{icon:c,primaryColor:J,secondaryColor:Pe,style:y},null),o.createVNode(Et,null,null)])};S.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},S.displayName="AntdIcon",S.inheritAttrs=!1,S.getTwoToneColor=Tt,S.setTwoToneColor=Te;var $t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function Ae(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){Rt(e,a,t[a])})}return e}function Rt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Y=function(n,t){var r=Ae({},n,t.attrs);return o.createVNode(S,Ae({},r,{icon:$t}),null)};Y.displayName="DeleteOutlined",Y.inheritAttrs=!1;var Lt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};function je(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){Vt(e,a,t[a])})}return e}function Vt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var R=function(n,t){var r=je({},n,t.attrs);return o.createVNode(S,je({},r,{icon:Lt}),null)};R.displayName="LinkOutlined",R.inheritAttrs=!1;const Ht={class:"tw-comments"},Ut={class:"comments"},Dt={class:"header"},zt={class:"name"},Wt={class:"time"},qt={key:0,class:"files"},Gt={key:1,class:"logo",src:Re},Zt={class:"detail"},Kt={class:"fileName"},Qt={class:"buttons"},Yt=["onClick"],Jt={class:"content"},Xt={class:"addNew"},en={class:"files"},tn={class:"name"},nn={class:"detail"},Ie=ae(Object.assign({name:"TWComments"},{__name:"index",props:{comments:{type:Array,default:()=>[]},fileIdKey:{type:String,default:""},fileNameKey:{type:String,default:"fileName"},fileUrlKey:{type:String,default:"fileUrl"},uploadAction:{type:String,default:"https://www.mocky.io/v2/5cc8019d300000980a055e76"}},emits:["submit"],setup(e,{emit:n}){const t=e,r=u=>{const g=[".png",".jpg",".jpeg",".gif",".bmp",".webp"],O=u.toLowerCase();return g.some(T=>O.endsWith(T))},a=u=>{window.open(u,"_blank")},i=o.ref([]),c=o.ref(!1),l=({file:u})=>{if(console.log("上传文件了: ",u),c.value=!0,u.response)if(c.value=!1,u.response.IsSuccess){const g={id:t.fileIdKey?u.response.ResultData[t.fileIdKey]:null,fileName:u.response.ResultData[t.fileNameKey],fileUrl:u.response.ResultData[t.fileUrlKey]};i.value.push(g)}else d.notification.error({message:"上传失败"});else setTimeout(()=>{c.value=!1},2e3)},f=u=>{i.value.splice(u,1)},s=o.ref(""),w=n,k=()=>{if(!s.value.trim()&&i.value.length===0){d.notification.warning({message:"请填写"});return}const u={comment:s.value,files:i.value};w("submit",u),s.value="",i.value=[]};return(u,g)=>{const O=o.resolveComponent("a-image"),T=o.resolveComponent("a-input"),L=o.resolveComponent("a-button"),I=o.resolveComponent("a-upload");return o.openBlock(),o.createBlock(o.unref(d.ConfigProvider),{theme:o.unref(re)},{default:o.withCtx(()=>[o.createElementVNode("div",Ht,[o.createElementVNode("div",Ut,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.comments,(y,E)=>(o.openBlock(),o.createElementBlock("div",{class:"comment",key:E},[o.createElementVNode("div",Dt,[o.createElementVNode("p",zt,o.toDisplayString(y.name),1),o.createElementVNode("p",Wt,o.toDisplayString(y.time),1)]),y.files?.length>0?(o.openBlock(),o.createElementBlock("div",qt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y.files,(x,J)=>(o.openBlock(),o.createElementBlock("div",{class:"file",key:J},[r(x[t.fileNameKey])?(o.openBlock(),o.createBlock(O,{key:0,src:x[t.fileUrlKey],width:"40px",height:"40px"},null,8,["src"])):(o.openBlock(),o.createElementBlock("img",Gt)),o.createElementVNode("div",Zt,[o.createElementVNode("p",Kt,o.toDisplayString(x[t.fileNameKey]),1),o.createElementVNode("div",Qt,[o.createElementVNode("p",{onClick:Pe=>a(x[t.fileUrlKey])},"下载",8,Yt)])])]))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",Jt,o.toDisplayString(y.content),1)]))),128))]),o.createElementVNode("div",Xt,[o.createElementVNode("div",en,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(y,E)=>(o.openBlock(),o.createElementBlock("div",{class:"file",key:E},[o.createVNode(o.unref(R)),o.createElementVNode("p",tn,o.toDisplayString(y.fileName),1),o.createVNode(o.unref(Y),{class:"delete",onClick:x=>f(E)},null,8,["onClick"])]))),128))]),o.createElementVNode("div",nn,[o.createVNode(T,{value:s.value,"onUpdate:value":g[0]||(g[0]=y=>s.value=y),placeholder:"请输入",bordered:!1},null,8,["value"]),o.createVNode(I,{name:"file",action:e.uploadAction,showUploadList:!1,onChange:l},{default:o.withCtx(()=>[o.createVNode(L,{icon:o.h(o.unref(R)),loading:c.value},null,8,["icon","loading"])]),_:1},8,["action"]),o.createVNode(L,{type:"primary",onClick:k},{default:o.withCtx(()=>[...g[1]||(g[1]=[o.createTextVNode("提交",-1)])]),_:1})])])])]),_:1},8,["theme"])}}}),[["__scopeId","data-v-
|
|
57
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function It(e,n){if(e){if(typeof e=="string")return Ee(e,n);var t=Object.prototype.toString.call(e).slice(8,-1);if(t==="Object"&&e.constructor&&(t=e.constructor.name),t==="Map"||t==="Set")return Array.from(e);if(t==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(t))return Ee(e,n)}}function Ee(e,n){(n==null||n>e.length)&&(n=e.length);for(var t=0,r=new Array(n);t<n;t++)r[t]=e[t];return r}function Pt(e,n){var t=e==null?null:typeof Symbol<"u"&&e[Symbol.iterator]||e["@@iterator"];if(t!=null){var r=[],a=!0,i=!1,c,l;try{for(t=t.call(e);!(a=(c=t.next()).done)&&(r.push(c.value),!(n&&r.length===n));a=!0);}catch(f){i=!0,l=f}finally{try{!a&&t.return!=null&&t.return()}finally{if(i)throw l}}return r}}function Ft(e){if(Array.isArray(e))return e}function Ne(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){j(e,a,t[a])})}return e}function j(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function Bt(e,n){if(e==null)return{};var t=Mt(e,n),r,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(a=0;a<i.length;a++)r=i[a],!(n.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(t[r]=e[r])}return t}function Mt(e,n){if(e==null)return{};var t={},r=Object.keys(e),a,i;for(i=0;i<r.length;i++)a=r[i],!(n.indexOf(a)>=0)&&(t[a]=e[a]);return t}Te(tt.primary);var S=function(n,t){var r,a=Ne({},n,t.attrs),i=a.class,c=a.icon,l=a.spin,f=a.rotate,s=a.tabindex,w=a.twoToneColor,k=a.onClick,u=Bt(a,Nt),g=be(),O=g.prefixCls,T=g.rootClassName,L=(r={},j(r,T.value,!!T.value),j(r,O.value,!0),j(r,"".concat(O.value,"-").concat(c.name),!!c.name),j(r,"".concat(O.value,"-spin"),!!l||c.name==="loading"),r),I=s;I===void 0&&k&&(I=-1);var y=f?{msTransform:"rotate(".concat(f,"deg)"),transform:"rotate(".concat(f,"deg)")}:void 0,E=xe(w),x=At(E,2),J=x[0],Pe=x[1];return o.createVNode("span",Ne({role:"img","aria-label":c.name},u,{onClick:k,class:[L,i],tabindex:I}),[o.createVNode(_,{icon:c,primaryColor:J,secondaryColor:Pe,style:y},null),o.createVNode(Et,null,null)])};S.props={spin:Boolean,rotate:Number,icon:Object,twoToneColor:[String,Array]},S.displayName="AntdIcon",S.inheritAttrs=!1,S.getTwoToneColor=Tt,S.setTwoToneColor=Te;var $t={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M360 184h-8c4.4 0 8-3.6 8-8v8h304v-8c0 4.4 3.6 8 8 8h-8v72h72v-80c0-35.3-28.7-64-64-64H352c-35.3 0-64 28.7-64 64v80h72v-72zm504 72H160c-17.7 0-32 14.3-32 32v32c0 4.4 3.6 8 8 8h60.4l24.7 523c1.6 34.1 29.8 61 63.9 61h454c34.2 0 62.3-26.8 63.9-61l24.7-523H888c4.4 0 8-3.6 8-8v-32c0-17.7-14.3-32-32-32zM731.3 840H292.7l-24.2-512h487l-24.2 512z"}}]},name:"delete",theme:"outlined"};function Ae(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){Rt(e,a,t[a])})}return e}function Rt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var Y=function(n,t){var r=Ae({},n,t.attrs);return o.createVNode(S,Ae({},r,{icon:$t}),null)};Y.displayName="DeleteOutlined",Y.inheritAttrs=!1;var Lt={icon:{tag:"svg",attrs:{viewBox:"64 64 896 896",focusable:"false"},children:[{tag:"path",attrs:{d:"M574 665.4a8.03 8.03 0 00-11.3 0L446.5 781.6c-53.8 53.8-144.6 59.5-204 0-59.5-59.5-53.8-150.2 0-204l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3l-39.8-39.8a8.03 8.03 0 00-11.3 0L191.4 526.5c-84.6 84.6-84.6 221.5 0 306s221.5 84.6 306 0l116.2-116.2c3.1-3.1 3.1-8.2 0-11.3L574 665.4zm258.6-474c-84.6-84.6-221.5-84.6-306 0L410.3 307.6a8.03 8.03 0 000 11.3l39.7 39.7c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c53.8-53.8 144.6-59.5 204 0 59.5 59.5 53.8 150.2 0 204L665.3 562.6a8.03 8.03 0 000 11.3l39.8 39.8c3.1 3.1 8.2 3.1 11.3 0l116.2-116.2c84.5-84.6 84.5-221.5 0-306.1zM610.1 372.3a8.03 8.03 0 00-11.3 0L372.3 598.7a8.03 8.03 0 000 11.3l39.6 39.6c3.1 3.1 8.2 3.1 11.3 0l226.4-226.4c3.1-3.1 3.1-8.2 0-11.3l-39.5-39.6z"}}]},name:"link",theme:"outlined"};function je(e){for(var n=1;n<arguments.length;n++){var t=arguments[n]!=null?Object(arguments[n]):{},r=Object.keys(t);typeof Object.getOwnPropertySymbols=="function"&&(r=r.concat(Object.getOwnPropertySymbols(t).filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable}))),r.forEach(function(a){Vt(e,a,t[a])})}return e}function Vt(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}var R=function(n,t){var r=je({},n,t.attrs);return o.createVNode(S,je({},r,{icon:Lt}),null)};R.displayName="LinkOutlined",R.inheritAttrs=!1;const Ht={class:"tw-comments"},Ut={class:"comments"},Dt={class:"header"},zt={class:"name"},Wt={class:"time"},qt={key:0,class:"files"},Gt={key:1,class:"logo",src:Re},Zt={class:"detail"},Kt={class:"fileName"},Qt={class:"buttons"},Yt=["onClick"],Jt={class:"content"},Xt={class:"addNew"},en={class:"files"},tn={class:"name"},nn={class:"detail"},Ie=ae(Object.assign({name:"TWComments"},{__name:"index",props:{comments:{type:Array,default:()=>[]},fileIdKey:{type:String,default:""},fileNameKey:{type:String,default:"fileName"},fileUrlKey:{type:String,default:"fileUrl"},uploadAction:{type:String,default:"https://www.mocky.io/v2/5cc8019d300000980a055e76"}},emits:["submit"],setup(e,{emit:n}){const t=e,r=u=>{const g=[".png",".jpg",".jpeg",".gif",".bmp",".webp"],O=u.toLowerCase();return g.some(T=>O.endsWith(T))},a=u=>{window.open(u,"_blank")},i=o.ref([]),c=o.ref(!1),l=({file:u})=>{if(console.log("上传文件了: ",u),c.value=!0,u.response)if(c.value=!1,u.response.IsSuccess){const g={id:t.fileIdKey?u.response.ResultData[t.fileIdKey]:null,fileName:u.response.ResultData[t.fileNameKey],fileUrl:u.response.ResultData[t.fileUrlKey]};i.value.push(g)}else d.notification.error({message:"上传失败"});else setTimeout(()=>{c.value=!1},2e3)},f=u=>{i.value.splice(u,1)},s=o.ref(""),w=n,k=()=>{if(!s.value.trim()&&i.value.length===0){d.notification.warning({message:"请填写"});return}const u={comment:s.value,files:i.value};w("submit",u),s.value="",i.value=[]};return(u,g)=>{const O=o.resolveComponent("a-image"),T=o.resolveComponent("a-input"),L=o.resolveComponent("a-button"),I=o.resolveComponent("a-upload");return o.openBlock(),o.createBlock(o.unref(d.ConfigProvider),{theme:o.unref(re)},{default:o.withCtx(()=>[o.createElementVNode("div",Ht,[o.createElementVNode("div",Ut,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(t.comments,(y,E)=>(o.openBlock(),o.createElementBlock("div",{class:"comment",key:E},[o.createElementVNode("div",Dt,[o.createElementVNode("p",zt,o.toDisplayString(y.name),1),o.createElementVNode("p",Wt,o.toDisplayString(y.time),1)]),y.files?.length>0?(o.openBlock(),o.createElementBlock("div",qt,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(y.files,(x,J)=>(o.openBlock(),o.createElementBlock("div",{class:"file",key:J},[r(x[t.fileNameKey])?(o.openBlock(),o.createBlock(O,{key:0,src:x[t.fileUrlKey],width:"40px",height:"40px"},null,8,["src"])):(o.openBlock(),o.createElementBlock("img",Gt)),o.createElementVNode("div",Zt,[o.createElementVNode("p",Kt,o.toDisplayString(x[t.fileNameKey]),1),o.createElementVNode("div",Qt,[o.createElementVNode("p",{onClick:Pe=>a(x[t.fileUrlKey])},"下载",8,Yt)])])]))),128))])):o.createCommentVNode("",!0),o.createElementVNode("div",Jt,o.toDisplayString(y.content),1)]))),128))]),o.createElementVNode("div",Xt,[o.createElementVNode("div",en,[(o.openBlock(!0),o.createElementBlock(o.Fragment,null,o.renderList(i.value,(y,E)=>(o.openBlock(),o.createElementBlock("div",{class:"file",key:E},[o.createVNode(o.unref(R)),o.createElementVNode("p",tn,o.toDisplayString(y.fileName),1),o.createVNode(o.unref(Y),{class:"delete",onClick:x=>f(E)},null,8,["onClick"])]))),128))]),o.createElementVNode("div",nn,[o.createVNode(T,{value:s.value,"onUpdate:value":g[0]||(g[0]=y=>s.value=y),placeholder:"请输入",bordered:!1},null,8,["value"]),o.createVNode(I,{name:"file",action:e.uploadAction,showUploadList:!1,onChange:l},{default:o.withCtx(()=>[o.createVNode(L,{icon:o.h(o.unref(R)),loading:c.value},null,8,["icon","loading"])]),_:1},8,["action"]),o.createVNode(L,{type:"primary",onClick:k},{default:o.withCtx(()=>[...g[1]||(g[1]=[o.createTextVNode("提交",-1)])]),_:1})])])])]),_:1},8,["theme"])}}}),[["__scopeId","data-v-69250e50"]]),rn=[oe,ie,Ie],an={install:function(e){e.component(d.ConfigProvider.name,d.ConfigProvider),e.component(d.Button.name,d.Button),e.component(d.Input.name,d.Input),e.component(d.Upload.name,d.Upload),e.component(d.Image.name,d.Image),rn.forEach(n=>{e.component(n.name,n)})},publicJs:Fe};m.TWAirlineInfo=oe,m.TWComments=Ie,m.TWHotelInfo=ie,m.default=an,m.isValidEmail=te,m.isValidIdCard=X,m.isValidPhoneNumber=ee,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
|