v1.2.1版本,优化调整了很多,整改验收阶段新加字段
This commit is contained in:
1
unpackage/dist/build/mp-weixin/node-modules/wot-design-uni/components/wd-button/wd-button.js
vendored
Normal file
1
unpackage/dist/build/mp-weixin/node-modules/wot-design-uni/components/wd-button/wd-button.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
"use strict";const e=require("../../../../common/vendor.js");Math||o();const o=()=>"../wd-icon/wd-icon.js",n=e.defineComponent({name:"wd-button",options:{addGlobalClass:!0,virtualHost:!0,styleIsolation:"shared"},props:e.buttonProps,emits:["click","getuserinfo","contact","getphonenumber","getrealtimephonenumber","error","launchapp","opensetting","chooseavatar","agreeprivacyauthorization"],setup(o,{emit:n}){const a=o,t=n,i=e.ref(20),s=e.ref(70),r=e.ref(""),c=e.computed((()=>`background-image: url(${r.value});`)),l=e.computed((()=>a.disabled||a.loading?void 0:a.openType));function d(e){a.disabled||a.loading||t("click",e)}function u(e){"phoneNumber"===a.scope?g(e):"userInfo"===a.scope&&p(e)}function p(e){t("getuserinfo",e.detail)}function f(e){t("contact",e.detail)}function g(e){t("getphonenumber",e.detail)}function m(e){t("getrealtimephonenumber",e.detail)}function b(e){t("error",e.detail)}function h(e){t("launchapp",e.detail)}function v(e){t("opensetting",e.detail)}function w(e){t("chooseavatar",e.detail)}function k(e){t("agreeprivacyauthorization",e.detail)}return e.watch((()=>a.loading),(()=>{!function(){const{loadingColor:o,type:n,plain:t}=a;let i=o;if(!i)switch(n){case"primary":i="#4D80F0";break;case"success":i="#34d19d";break;case"info":case"default":i="#333";break;case"warning":i="#f0883a";break;case"error":i="#fa4350"}const s=((e="#4D80F0",o=!0)=>`<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 42 42"><defs><linearGradient x1="100%" y1="0%" x2="0%" y2="0%" id="a"><stop stop-color="${o?e:"#fff"}" offset="0%" stop-opacity="0"/><stop stop-color="${o?e:"#fff"}" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd"><path d="M21 1c11.046 0 20 8.954 20 20s-8.954 20-20 20S1 32.046 1 21 9.954 1 21 1zm0 7C13.82 8 8 13.82 8 21s5.82 13 13 13 13-5.82 13-13S28.18 8 21 8z" fill="${o?"#fff":e}"/><path d="M4.599 21c0 9.044 7.332 16.376 16.376 16.376 9.045 0 16.376-7.332 16.376-16.376" stroke="url(#a)" stroke-width="3.5" stroke-linecap="round"/></g></svg>`)(i,!t);r.value=`"data:image/svg+xml;base64,${e.encode(s)}"`}()}),{deep:!0,immediate:!0}),(o,n)=>e.e({a:o.loading},o.loading?{b:e.s(c.value)}:o.icon?{d:e.p({"custom-class":"wd-button__icon",name:o.icon,classPrefix:o.classPrefix})}:{},{c:o.icon,e:e.gei(o,o.buttonId),f:""+(o.disabled||o.loading?"":"wd-button--active"),g:e.s(o.customStyle),h:e.n("is-"+o.type),i:e.n("is-"+o.size),j:e.n(o.round?"is-round":""),k:e.n(o.hairline?"is-hairline":""),l:e.n(o.plain?"is-plain":""),m:e.n(o.disabled?"is-disabled":""),n:e.n(o.block?"is-block":""),o:e.n(o.loading?"is-loading":""),p:e.n(o.customClass),q:i.value,r:s.value,s:l.value,t:o.sendMessageTitle,v:o.sendMessagePath,w:o.sendMessageImg,x:o.appParameter,y:o.showMessageCard,z:o.sessionFrom,A:o.lang,B:o.hoverStopPropagation,C:o.scope,D:e.o(d),E:e.o(u),F:e.o(p),G:e.o(f),H:e.o(g),I:e.o(m),J:e.o(b),K:e.o(h),L:e.o(v),M:e.o(w),N:e.o(k)})}}),a=e._export_sfc(n,[["__scopeId","data-v-161f130c"]]);wx.createComponent(a);
|
||||
@@ -0,0 +1,6 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {
|
||||
"wd-icon": "../wd-icon/wd-icon"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<button id="{{e}}" hover-class="{{f}}" style="{{g + ';' + virtualHostStyle}}" class="{{['data-v-161f130c', 'wd-button', h, i, j, k, l, m, n, o, p, virtualHostClass]}}" hover-start-time="{{q}}" hover-stay-time="{{r}}" open-type="{{s}}" send-message-title="{{t}}" send-message-path="{{v}}" send-message-img="{{w}}" app-parameter="{{x}}" show-message-card="{{y}}" session-from="{{z}}" lang="{{A}}" hover-stop-propagation="{{B}}" scope="{{C}}" bindtap="{{D}}" bindgetAuthorize="{{E}}" bindgetuserinfo="{{F}}" bindcontact="{{G}}" bindgetphonenumber="{{H}}" bindgetrealtimephonenumber="{{I}}" binderror="{{J}}" bindlaunchapp="{{K}}" bindopensetting="{{L}}" bindchooseavatar="{{M}}" bindagreeprivacyauthorization="{{N}}" hidden="{{virtualHostHidden || false}}"><view class="wd-button__content data-v-161f130c"><view wx:if="{{a}}" class="wd-button__loading data-v-161f130c"><view class="wd-button__loading-svg data-v-161f130c" style="{{b}}"></view></view><wd-icon wx:elif="{{c}}" class="data-v-161f130c" virtualHostClass="data-v-161f130c" u-i="161f130c-0" bind:__l="__l" u-p="{{d}}"></wd-icon><view class="wd-button__text data-v-161f130c"><slot/></view></view></button>
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user