Socket
Socket
Sign inDemoInstall

goldmorning-ui

Package Overview
Dependencies
Maintainers
1
Versions
38
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

goldmorning-ui - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

es/style/base.css

38

es/coupon/index.js
import './index-sfc.css';
import { computed } from 'vue';
var __vue_sfc__ = {

@@ -25,3 +26,4 @@ name: 'Coupon',

modelValue: Boolean,
disabled: Boolean
disabled: Boolean,
maskColor: String
},

@@ -42,5 +44,18 @@ emits: ['update:modelValue', 'change', 'click'],

emit('click', evt);
}
} // 颜色可变
var couponMaskStyle = computed(() => {
return {
color: props.maskColor || '#EBEDF0'
};
});
var beforeBc = computed(() => {
return {
'border-color': props.maskColor ? 'rgba(211, 211, 211, .5)' : 'transparent'
};
});
return {
couponMaskStyle,
beforeBc,
onChange,

@@ -103,5 +118,16 @@ onClick

checked: _ctx.modelValue
}]
}, [_hoisted_6], 2
/* CLASS */
}],
style: _ctx.couponMaskStyle
}, [_createVNode("div", {
class: "coupon-mask--before",
style: _ctx.beforeBc
}, null, 4
/* STYLE */
), _hoisted_6, _createVNode("div", {
class: "coupon-mask--after",
style: _ctx.beforeBc
}, null, 4
/* STYLE */
)], 6
/* CLASS, STYLE */
), _createVNode("div", _hoisted_7, [_createVNode("div", _hoisted_8, [_createVNode("h3", {

@@ -153,3 +179,3 @@ class: ["coupon-title", {

__vue_sfc__.render = __vue_render__;
__vue_sfc__._scopeId = 'data-v-6d27c41c';
__vue_sfc__._scopeId = 'data-v-04396002';
export default __vue_sfc__;

7

es/index.js

@@ -1,8 +0,7 @@

import Button from './button';
import Coupon from './coupon';
import OrderInput from './order-input';
var version = '1.0.0';
var version = '1.0.2';
function install(app) {
var components = [Button, Coupon, OrderInput];
var components = [Coupon, OrderInput];
components.forEach(item => {

@@ -17,3 +16,3 @@ if (item.install) {

export { install, version, Button, Coupon, OrderInput };
export { install, version, Coupon, OrderInput };
export default {

@@ -20,0 +19,0 @@ install,

@@ -166,3 +166,3 @@ import './index-sfc.css';

__vue_sfc__.render = __vue_render__;
__vue_sfc__._scopeId = 'data-v-6600b8d4';
__vue_sfc__._scopeId = 'data-v-302f5c85';
export default __vue_sfc__;

@@ -35,3 +35,4 @@ "use strict";

modelValue: Boolean,
disabled: Boolean
disabled: Boolean,
maskColor: String
},

@@ -52,5 +53,18 @@ emits: ['update:modelValue', 'change', 'click'],

emit('click', evt);
}
} // 颜色可变
var couponMaskStyle = (0, _vue.computed)(() => {
return {
color: props.maskColor || '#EBEDF0'
};
});
var beforeBc = (0, _vue.computed)(() => {
return {
'border-color': props.maskColor ? 'rgba(211, 211, 211, .5)' : 'transparent'
};
});
return {
couponMaskStyle,
beforeBc,
onChange,

@@ -112,5 +126,16 @@ onClick

checked: _ctx.modelValue
}]
}, [_hoisted_6], 2
/* CLASS */
}],
style: _ctx.couponMaskStyle
}, [(0, _vue.createVNode)("div", {
class: "coupon-mask--before",
style: _ctx.beforeBc
}, null, 4
/* STYLE */
), _hoisted_6, (0, _vue.createVNode)("div", {
class: "coupon-mask--after",
style: _ctx.beforeBc
}, null, 4
/* STYLE */
)], 6
/* CLASS, STYLE */
), (0, _vue.createVNode)("div", _hoisted_7, [(0, _vue.createVNode)("div", _hoisted_8, [(0, _vue.createVNode)("h3", {

@@ -162,4 +187,4 @@ class: ["coupon-title", {

__vue_sfc__.render = __vue_render__;
__vue_sfc__._scopeId = 'data-v-6d27c41c';
__vue_sfc__._scopeId = 'data-v-04396002';
var _default = __vue_sfc__;
exports.default = _default;

@@ -1,1 +0,3 @@

"use strict";
"use strict";
require('../../style/base.css');

@@ -1,1 +0,3 @@

"use strict";
"use strict";
require('../../style/base.less');

@@ -115,18 +115,2 @@ (function webpackUniversalModuleDefinition(root, factory) {

/***/ 205:
/***/ ((module, __webpack_exports__, __webpack_require__) => {
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(705);
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0__);
// Imports
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_0___default()(false);
// Module
___CSS_LOADER_EXPORT___.push([module.id, "", ""]);
// Exports
/* harmony default export */ __webpack_exports__["Z"] = (___CSS_LOADER_EXPORT___);
/***/ }),
/***/ 977:

@@ -141,3 +125,3 @@ /***/ ((module, __webpack_exports__, __webpack_require__) => {

// Module
___CSS_LOADER_EXPORT___.push([module.id, ".coupon{display:flex;height:82px;border-radius:6px;position:relative;overflow:hidden;background-color:var(--color-white);font-family:var(--family)}.coupon::after{content:'';position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;border:1px solid #eee;border-radius:6px;transition:all .3s ease}.coupon.checked::after{background-color:rgba(195,37,45,.05);border-color:rgba(195,37,45,.05)}.coupon-left{width:98px;align-items:center;display:flex;flex-direction:column;justify-content:center}.coupon-offer{margin-bottom:4px}.coupon-symbol{color:var(--color-primary);font-size:18px;font-weight:800;line-height:25px;margin-right:2px}.coupon-amount{color:var(--color-primary);font-family:var(--family-number-heavy);font-size:32px;font-weight:400;line-height:36px}.coupon-describe,.coupon-expired,.coupon-unit{font-size:12px;font-weight:400;color:var(--color-sub);line-height:17px}.coupon-mask{width:12px;display:flex;align-items:center;justify-content:center;padding:12px 0;position:relative;z-index:2}.coupon-mask--line{border-left:1px #ddd dashed;height:100%}.coupon-mask::after,.coupon-mask::before{content:'';width:12px;height:12px;position:absolute;border-radius:50%;border:1px solid rgba(221,221,221,.5);background-color:#fff;transition:all .3s ease}.coupon-mask::before{top:-6px}.coupon-mask::after{bottom:-6px}.coupon-mask.checked::after,.coupon-mask.checked::before{border-color:rgba(195,37,45,.1)}.coupon-right{flex:1 1 0;overflow:hidden;position:relative;z-index:2;display:flex;margin-left:6px;margin-right:12px;align-items:center}.coupon-describe.describe{margin-top:2px;margin-bottom:2px}.coupon-info{flex:1 1 0;overflow:hidden;display:flex;flex-direction:column;justify-content:center}.coupon-title{font-size:14px;font-family:var(--family-medium);font-weight:500;color:#333;line-height:20px}.coupon-title.mb4{margin-bottom:4px}.coupon-btn{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-primary);padding:6px 12px;border-radius:100px;box-sizing:border-box;height:28px;border:none;font-size:12px;font-weight:400;color:var(--color-white);line-height:16px}.coupon-state{height:14px;background:#fe6632;border-radius:0 6px 0 6px;padding:1px 4px;font-size:12px;font-weight:400;color:rgba(255,255,255,.9);line-height:14px;position:absolute;top:0;right:0;z-index:2}.coupon-checkbox{display:block;background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/175212ncex89.svg);background-repeat:no-repeat;background-size:cover;background-position:center;width:16px;height:16px}.coupon-checkbox.checked{background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/1752121jyuum.svg)}.coupon-input-checkbox{position:absolute;visibility:hidden}.coupon-input-checkbox:disabled+.coupon-checkbox{opacity:.3}", ""]);
___CSS_LOADER_EXPORT___.push([module.id, ":root{--color-white:#fff;--color-primary:#c9272f;--color-main:#333;--color-sub:#666;--color-gray:#999;--family-number-heavy:'Arial-BoldMT','Arial';--family-number:'Arial';--family:'PingFangSC-Regular','微软雅黑';--family-medium:'PingFangSC-Medium','微软雅黑'}.coupon{display:flex;height:82px;border-radius:6px;position:relative;overflow:hidden;background-color:var(--color-white);font-family:var(--family)}.coupon::after{content:'';position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;border:1px solid #eee;border-radius:6px;transition:all .3s ease}.coupon.checked::after{background-color:rgba(195,37,45,.05);border-color:rgba(195,37,45,.05)}.coupon-left{width:98px;align-items:center;display:flex;flex-direction:column;justify-content:center}.coupon-offer{margin-bottom:4px}.coupon-symbol{color:var(--color-primary);font-size:18px;font-weight:800;line-height:25px;margin-right:2px}.coupon-amount{color:var(--color-primary);font-family:var(--family-number-heavy);font-size:32px;font-weight:400;line-height:36px}.coupon-describe,.coupon-expired,.coupon-unit{font-size:12px;font-weight:400;color:var(--color-sub);line-height:17px}.coupon-mask{width:12px;display:flex;align-items:center;justify-content:center;padding:12px 0;position:relative;z-index:2}.coupon-mask--line{border-left:1px #ddd dashed;height:100%}.coupon-mask--after,.coupon-mask--before{content:'';width:12px;height:12px;position:absolute;border-radius:50%;border-width:1px;border-style:solid;background-color:currentColor;transition:all .3s ease}.coupon-mask--before{top:-6px}.coupon-mask--after{bottom:-6px}.coupon-mask.checked::after,.coupon-mask.checked::before{border-color:rgba(195,37,45,.1)}.coupon-right{flex:1 1 0;overflow:hidden;position:relative;z-index:2;display:flex;margin-left:6px;margin-right:12px;align-items:center}.coupon-describe.describe{margin-top:2px;margin-bottom:2px}.coupon-info{flex:1 1 0;overflow:hidden;display:flex;flex-direction:column;justify-content:center}.coupon-title{font-size:14px;font-family:var(--family-medium);font-weight:500;color:#333;line-height:20px}.coupon-title.mb4{margin-bottom:4px}.coupon-btn{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-primary);padding:6px 12px;border-radius:100px;box-sizing:border-box;height:28px;border:none;font-size:12px;font-weight:400;color:var(--color-white);line-height:16px}.coupon-state{height:14px;background:#fe6632;border-radius:0 6px 0 6px;padding:1px 4px;font-size:12px;font-weight:400;color:rgba(255,255,255,.9);line-height:14px;position:absolute;top:0;right:0;z-index:2}.coupon-checkbox{display:block;background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/175212ncex89.svg);background-repeat:no-repeat;background-size:cover;background-position:center;width:16px;height:16px}.coupon-checkbox.checked{background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/1752121jyuum.svg)}.coupon-input-checkbox{position:absolute;visibility:hidden}.coupon-input-checkbox:disabled+.coupon-checkbox{opacity:.3}", ""]);
// Exports

@@ -158,3 +142,3 @@ /* harmony default export */ __webpack_exports__["Z"] = (___CSS_LOADER_EXPORT___);

// Module
___CSS_LOADER_EXPORT___.push([module.id, ":root{--color-error:red;--color-white:#fff;--color-primary:#c9272f;--color-main:#333;--color-sub:#666;--color-gray:#999;--family-number-heavy:'Arial-BoldMT','Arial';--family-number:'Arial';--family:'PingFangSC-Regular','微软雅黑';--family-medium:'PingFangSC-Medium','微软雅黑'}.add-label{display:flex;line-height:20px;position:relative;border:1px solid transparent;box-sizing:border-box;transition:border-color .25s linear;border-radius:4px;overflow:hidden}.add-label::after{content:attr(data-unit);position:absolute;right:12px;bottom:10px;color:#646566}.add-label.error{border-color:var(--color-error)}.add-weight{background:#f7f8fa;padding:10px 0;flex:1 1 0;text-align:center;font-size:22px;border:none}.add-weight:focus{outline-color:transparent}.add-weight::-webkit-input-placeholder{opacity:.3}.add-weight::placeholder{opacity:.3}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.error-tip{font-size:12px;color:var(--color-error);line-height:24px}", ""]);
___CSS_LOADER_EXPORT___.push([module.id, ":root{--color-white:#fff;--color-primary:#c9272f;--color-main:#333;--color-sub:#666;--color-gray:#999;--family-number-heavy:'Arial-BoldMT','Arial';--family-number:'Arial';--family:'PingFangSC-Regular','微软雅黑';--family-medium:'PingFangSC-Medium','微软雅黑'}.add-label{display:flex;line-height:20px;position:relative;border:1px solid transparent;box-sizing:border-box;transition:border-color .25s linear;border-radius:4px;overflow:hidden}.add-label::after{content:attr(data-unit);position:absolute;right:12px;bottom:10px;color:#646566}.add-label.error{border-color:var(--color-primary)}.add-weight{background:#f7f8fa;padding:10px 0;flex:1 1 0;text-align:center;font-size:22px;border:none}.add-weight:focus{outline-color:transparent}.add-weight::-webkit-input-placeholder{opacity:.3}.add-weight::placeholder{opacity:.3}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.error-tip{font-size:12px;color:var(--color-error);line-height:24px}", ""]);
// Exports

@@ -524,3 +508,2 @@ /* harmony default export */ __webpack_exports__["Z"] = (___CSS_LOADER_EXPORT___);

__webpack_require__.d(__webpack_exports__, {
"Button": () => (/* reexport */ es_button),
"Coupon": () => (/* reexport */ coupon),

@@ -536,5 +519,5 @@ "OrderInput": () => (/* reexport */ order_input),

var injectStylesIntoStyleTag_default = /*#__PURE__*/__webpack_require__.n(injectStylesIntoStyleTag);
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./es/button/index-sfc.css
var index_sfc = __webpack_require__(205);
;// CONCATENATED MODULE: ./es/button/index-sfc.css
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./es/coupon/index-sfc.css
var index_sfc = __webpack_require__(977);
;// CONCATENATED MODULE: ./es/coupon/index-sfc.css

@@ -552,57 +535,9 @@

/* harmony default export */ var button_index_sfc = (index_sfc/* default.locals */.Z.locals || {});
/* harmony default export */ var coupon_index_sfc = (index_sfc/* default.locals */.Z.locals || {});
// EXTERNAL MODULE: external {"root":"Vue","commonjs":"vue","commonjs2":"vue","amd":"vue"}
var external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_ = __webpack_require__(197);
;// CONCATENATED MODULE: ./es/button/index.js
;// CONCATENATED MODULE: ./es/coupon/index.js
var __vue_sfc__ = {
name: 'GmButton',
components: {},
props: {},
emits: ['click'],
setup(props, {
emit
}) {
var onClick = event => {
emit('click', event);
};
return {
onClick
};
}
};
function __vue_render__(_ctx, _cache) {
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)("button", {
class: "gm-btn",
onClick: _cache[1] || (_cache[1] = (...args) => _ctx.onClick && _ctx.onClick(...args))
}, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.renderSlot)(_ctx.$slots, "default")]);
}
__vue_sfc__.render = __vue_render__;
__vue_sfc__._scopeId = 'data-v-0d41b294';
/* harmony default export */ var es_button = (__vue_sfc__);
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./es/coupon/index-sfc.css
var coupon_index_sfc = __webpack_require__(977);
;// CONCATENATED MODULE: ./es/coupon/index-sfc.css
var index_sfc_options = {};
index_sfc_options.insert = "head";
index_sfc_options.singleton = false;
var index_sfc_update = injectStylesIntoStyleTag_default()(coupon_index_sfc/* default */.Z, index_sfc_options);
/* harmony default export */ var es_coupon_index_sfc = (coupon_index_sfc/* default.locals */.Z.locals || {});
;// CONCATENATED MODULE: ./es/coupon/index.js
var coupon_vue_sfc_ = {
name: 'Coupon',

@@ -630,3 +565,4 @@ components: {},

modelValue: Boolean,
disabled: Boolean
disabled: Boolean,
maskColor: String
},

@@ -647,5 +583,18 @@ emits: ['update:modelValue', 'change', 'click'],

emit('click', evt);
}
} // 颜色可变
var couponMaskStyle = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
return {
color: props.maskColor || '#EBEDF0'
};
});
var beforeBc = (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.computed)(() => {
return {
'border-color': props.maskColor ? 'rgba(211, 211, 211, .5)' : 'transparent'
};
});
return {
couponMaskStyle,
beforeBc,
onChange,

@@ -694,3 +643,3 @@ onClick

function coupon_vue_render_(_ctx, _cache) {
function __vue_render__(_ctx, _cache) {
return (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.openBlock)(), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createBlock)("label", {

@@ -709,5 +658,16 @@ class: ["coupon", {

checked: _ctx.modelValue
}]
}, [_hoisted_6], 2
/* CLASS */
}],
style: _ctx.couponMaskStyle
}, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)("div", {
class: "coupon-mask--before",
style: _ctx.beforeBc
}, null, 4
/* STYLE */
), _hoisted_6, (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)("div", {
class: "coupon-mask--after",
style: _ctx.beforeBc
}, null, 4
/* STYLE */
)], 6
/* CLASS, STYLE */
), (0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)("div", _hoisted_7, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)("div", _hoisted_8, [(0,external_root_Vue_commonjs_vue_commonjs2_vue_amd_vue_.createVNode)("h3", {

@@ -758,5 +718,5 @@ class: ["coupon-title", {

coupon_vue_sfc_.render = coupon_vue_render_;
coupon_vue_sfc_._scopeId = 'data-v-6d27c41c';
/* harmony default export */ var coupon = (coupon_vue_sfc_);
__vue_sfc__.render = __vue_render__;
__vue_sfc__._scopeId = 'data-v-04396002';
/* harmony default export */ var coupon = (__vue_sfc__);
// EXTERNAL MODULE: ./node_modules/css-loader/dist/cjs.js!./node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-2.use[2]!./es/order-input/index-sfc.css

@@ -768,8 +728,8 @@ var order_input_index_sfc = __webpack_require__(819);

var order_input_index_sfc_options = {};
var index_sfc_options = {};
order_input_index_sfc_options.insert = "head";
order_input_index_sfc_options.singleton = false;
index_sfc_options.insert = "head";
index_sfc_options.singleton = false;
var order_input_index_sfc_update = injectStylesIntoStyleTag_default()(order_input_index_sfc/* default */.Z, order_input_index_sfc_options);
var index_sfc_update = injectStylesIntoStyleTag_default()(order_input_index_sfc/* default */.Z, index_sfc_options);

@@ -945,3 +905,3 @@

order_input_vue_sfc_.render = order_input_vue_render_;
order_input_vue_sfc_._scopeId = 'data-v-6600b8d4';
order_input_vue_sfc_._scopeId = 'data-v-302f5c85';
/* harmony default export */ var order_input = (order_input_vue_sfc_);

@@ -951,7 +911,6 @@ ;// CONCATENATED MODULE: ./es/index.js

var version = '1.0.2';
var version = '1.0.0';
function install(app) {
var components = [es_button, coupon, order_input];
var components = [coupon, order_input];
components.forEach(item => {

@@ -958,0 +917,0 @@ if (item.install) {

@@ -1,1 +0,1 @@

!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define("goldmorning-ui",["vue"],o):"object"==typeof exports?exports["goldmorning-ui"]=o(require("vue")):e["goldmorning-ui"]=o(e.Vue)}("undefined"!=typeof self?self:this,(function(e){return(()=>{"use strict";var o={705:e=>{e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=function(e,o){var t,n,r,i=e[1]||"",a=e[3];if(!a)return i;if(o&&"function"==typeof btoa){var c=(t=a,n=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(r," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([c]).join("\n")}return[i].join("\n")}(o,e);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&r[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),o.push(l))}},o}},205:(e,o,t)=>{var n=t(705),r=t.n(n)()(!1);r.push([e.id,"",""]),o.Z=r},977:(e,o,t)=>{var n=t(705),r=t.n(n)()(!1);r.push([e.id,".coupon{display:flex;height:82px;border-radius:6px;position:relative;overflow:hidden;background-color:var(--color-white);font-family:var(--family)}.coupon::after{content:'';position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;border:1px solid #eee;border-radius:6px;transition:all .3s ease}.coupon.checked::after{background-color:rgba(195,37,45,.05);border-color:rgba(195,37,45,.05)}.coupon-left{width:98px;align-items:center;display:flex;flex-direction:column;justify-content:center}.coupon-offer{margin-bottom:4px}.coupon-symbol{color:var(--color-primary);font-size:18px;font-weight:800;line-height:25px;margin-right:2px}.coupon-amount{color:var(--color-primary);font-family:var(--family-number-heavy);font-size:32px;font-weight:400;line-height:36px}.coupon-describe,.coupon-expired,.coupon-unit{font-size:12px;font-weight:400;color:var(--color-sub);line-height:17px}.coupon-mask{width:12px;display:flex;align-items:center;justify-content:center;padding:12px 0;position:relative;z-index:2}.coupon-mask--line{border-left:1px #ddd dashed;height:100%}.coupon-mask::after,.coupon-mask::before{content:'';width:12px;height:12px;position:absolute;border-radius:50%;border:1px solid rgba(221,221,221,.5);background-color:#fff;transition:all .3s ease}.coupon-mask::before{top:-6px}.coupon-mask::after{bottom:-6px}.coupon-mask.checked::after,.coupon-mask.checked::before{border-color:rgba(195,37,45,.1)}.coupon-right{flex:1 1 0;overflow:hidden;position:relative;z-index:2;display:flex;margin-left:6px;margin-right:12px;align-items:center}.coupon-describe.describe{margin-top:2px;margin-bottom:2px}.coupon-info{flex:1 1 0;overflow:hidden;display:flex;flex-direction:column;justify-content:center}.coupon-title{font-size:14px;font-family:var(--family-medium);font-weight:500;color:#333;line-height:20px}.coupon-title.mb4{margin-bottom:4px}.coupon-btn{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-primary);padding:6px 12px;border-radius:100px;box-sizing:border-box;height:28px;border:none;font-size:12px;font-weight:400;color:var(--color-white);line-height:16px}.coupon-state{height:14px;background:#fe6632;border-radius:0 6px 0 6px;padding:1px 4px;font-size:12px;font-weight:400;color:rgba(255,255,255,.9);line-height:14px;position:absolute;top:0;right:0;z-index:2}.coupon-checkbox{display:block;background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/175212ncex89.svg);background-repeat:no-repeat;background-size:cover;background-position:center;width:16px;height:16px}.coupon-checkbox.checked{background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/1752121jyuum.svg)}.coupon-input-checkbox{position:absolute;visibility:hidden}.coupon-input-checkbox:disabled+.coupon-checkbox{opacity:.3}",""]),o.Z=r},819:(e,o,t)=>{var n=t(705),r=t.n(n)()(!1);r.push([e.id,":root{--color-error:red;--color-white:#fff;--color-primary:#c9272f;--color-main:#333;--color-sub:#666;--color-gray:#999;--family-number-heavy:'Arial-BoldMT','Arial';--family-number:'Arial';--family:'PingFangSC-Regular','微软雅黑';--family-medium:'PingFangSC-Medium','微软雅黑'}.add-label{display:flex;line-height:20px;position:relative;border:1px solid transparent;box-sizing:border-box;transition:border-color .25s linear;border-radius:4px;overflow:hidden}.add-label::after{content:attr(data-unit);position:absolute;right:12px;bottom:10px;color:#646566}.add-label.error{border-color:var(--color-error)}.add-weight{background:#f7f8fa;padding:10px 0;flex:1 1 0;text-align:center;font-size:22px;border:none}.add-weight:focus{outline-color:transparent}.add-weight::-webkit-input-placeholder{opacity:.3}.add-weight::placeholder{opacity:.3}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.error-tip{font-size:12px;color:var(--color-error);line-height:24px}",""]),o.Z=r},379:(e,o,t)=>{var n,r=function(){var e={};return function(o){if(void 0===e[o]){var t=document.querySelector(o);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[o]=t}return e[o]}}(),i=[];function a(e){for(var o=-1,t=0;t<i.length;t++)if(i[t].identifier===e){o=t;break}return o}function c(e,o){for(var t={},n=[],r=0;r<e.length;r++){var c=e[r],l=o.base?c[0]+o.base:c[0],u=t[l]||0,s="".concat(l," ").concat(u);t[l]=u+1;var d=a(s),p={css:c[1],media:c[2],sourceMap:c[3]};-1!==d?(i[d].references++,i[d].updater(p)):i.push({identifier:s,updater:g(p,o),references:1}),n.push(s)}return n}function l(e){var o=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=t.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){o.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(o);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(o)}return o}var u,s=(u=[],function(e,o){return u[e]=o,u.filter(Boolean).join("\n")});function d(e,o,t,n){var r=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=s(o,r);else{var i=document.createTextNode(r),a=e.childNodes;a[o]&&e.removeChild(a[o]),a.length?e.insertBefore(i,a[o]):e.appendChild(i)}}function p(e,o,t){var n=t.css,r=t.media,i=t.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var f=null,m=0;function g(e,o){var t,n,r;if(o.singleton){var i=m++;t=f||(f=l(o)),n=d.bind(null,t,i,!1),r=d.bind(null,t,i,!0)}else t=l(o),n=p.bind(null,t,o),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;n(e=o)}else r()}}e.exports=function(e,o){(o=o||{}).singleton||"boolean"==typeof o.singleton||(o.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var t=c(e=e||[],o);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var r=a(t[n]);i[r].references--}for(var l=c(e,o),u=0;u<t.length;u++){var s=a(t[u]);0===i[s].references&&(i[s].updater(),i.splice(s,1))}t=l}}}},197:o=>{o.exports=e}},t={};function n(e){var r=t[e];if(void 0!==r)return r.exports;var i=t[e]={id:e,exports:{}};return o[e](i,i.exports,n),i.exports}n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Button:()=>c,Coupon:()=>y,OrderInput:()=>N,default:()=>V,install:()=>B,version:()=>C});var e=n(379),o=n.n(e),t=n(205),i=(o()(t.Z,{insert:"head",singleton:!1}),t.Z.locals,n(197)),a={name:"GmButton",components:{},props:{},emits:["click"],setup:(e,{emit:o})=>({onClick:e=>{o("click",e)}}),render:function(e,o){return(0,i.openBlock)(),(0,i.createBlock)("button",{class:"gm-btn",onClick:o[1]||(o[1]=(...o)=>e.onClick&&e.onClick(...o))},[(0,i.renderSlot)(e.$slots,"default")])},_scopeId:"data-v-0d41b294"},c=a,l=n(977),u=(o()(l.Z,{insert:"head",singleton:!1}),l.Z.locals,{name:"Coupon",components:{},props:{amount:[String,Number],title:String,expired:String,state:String,describe:String,symbol:{type:String,default:"+"},unit:{type:String,default:"元/克"},btnText:{type:String,default:"去使用"},isCheckBox:Boolean,modelValue:Boolean,disabled:Boolean},emits:["update:modelValue","change","click"],setup:(e,{emit:o})=>({onChange:function(e){o("update:modelValue",e.target.checked),o("change",e.target.checked)},onClick:function(e){o("click",e)}})}),s={class:"coupon-left"},d={class:"coupon-offer"},p={class:"coupon-symbol"},f={class:"coupon-amount"},m={class:"coupon-unit"},g=(0,i.createVNode)("div",{class:"coupon-mask--line"},null,-1),b={class:"coupon-right"},h={class:"coupon-info"},x={class:"coupon-expired"},v={key:0,class:"coupon-state"};u.render=function(e,o){return(0,i.openBlock)(),(0,i.createBlock)("label",{class:["coupon",{checked:e.modelValue}]},[(0,i.createVNode)("div",s,[(0,i.createVNode)("div",d,[(0,i.createVNode)("span",p,(0,i.toDisplayString)(e.symbol),1),(0,i.createVNode)("span",f,(0,i.toDisplayString)(e.amount),1)]),(0,i.createVNode)("div",m,"单位:"+(0,i.toDisplayString)(e.unit),1)]),(0,i.createVNode)("div",{class:["coupon-mask",{checked:e.modelValue}]},[g],2),(0,i.createVNode)("div",b,[(0,i.createVNode)("div",h,[(0,i.createVNode)("h3",{class:["coupon-title",{mb4:!e.describe}]},(0,i.toDisplayString)(e.title),3),(0,i.createVNode)("div",{class:["coupon-describe",{describe:e.describe}]},(0,i.toDisplayString)(e.describe),3),(0,i.createVNode)("div",x,(0,i.toDisplayString)(e.expired),1)]),(0,i.createCommentVNode)(" 是否使用check "),e.isCheckBox?((0,i.openBlock)(),(0,i.createBlock)(i.Fragment,{key:0},[(0,i.createVNode)("input",{type:"checkbox",class:"coupon-input-checkbox",onChange:o[1]||(o[1]=(...o)=>e.onChange&&e.onChange(...o)),value:e.modelValue,disabled:e.disabled},null,40,["value","disabled"]),(0,i.createVNode)("span",{class:["coupon-checkbox",{checked:e.modelValue}]},null,2)],64)):((0,i.openBlock)(),(0,i.createBlock)("button",{key:1,class:"coupon-btn",onClick:o[2]||(o[2]=(...o)=>e.onClick&&e.onClick(...o))},(0,i.toDisplayString)(e.btnText),1))]),e.state?((0,i.openBlock)(),(0,i.createBlock)("span",v,(0,i.toDisplayString)(e.state),1)):(0,i.createCommentVNode)("v-if",!0)],2)},u._scopeId="data-v-6d27c41c";var y=u,k=n(819),S=(o()(k.Z,{insert:"head",singleton:!1}),k.Z.locals,{name:"OrderInput",props:{modelValue:[Number,String],placeholder:String,unit:{type:String,default:"克"},multiple:[String,Number],decimal:[String,Number],max:[String,Number],min:[String,Number],showError:Boolean,isRequired:Boolean},emits:["update:modelValue","update:isPass","blur"],setup(e,{emit:o}){var t=(0,i.reactive)({text:"",multiple:!1});function n(e){if(Number.isInteger(+e))return 0;var o=e+"",t=o.indexOf(".");return o.substr(t+1).length}function r(e,o){var t=e<0,n=Math.pow(10,o),r=parseInt(Math.abs(e)*n+.5,10);return t&&(r=-r),r}return{onInput:function(i){var{value:a}=i.target,c=a,l=a.split(".");2===l.length&&l[1].length>e.decimal&&(c=0===e.decimal?l[0]:"".concat(l[0],".").concat(l[1].slice(0,e.decimal))),c>+e.max&&(c=e.max),o("update:modelValue",c),i.target.value=c,function(i){var a,c,l,u,s,d={msg:"",multipleError:!1};e.isRequired&&!i?d.msg=e.placeholder:i<e.min?d.msg="最小克重为".concat(e.min):e.multiple&&(a=i,c=e.multiple,u=r(a,l=Math.max(n(a),n(c))),s=r(c,l),console.log(u,s),u%s!=0)&&(d.msg="请输入".concat(e.multiple,"的整数倍"),d.multipleError=!0),d.msg?o("update:isPass",!1):o("update:isPass",!0),t.text=d.msg,t.multiple=d.multipleError}(c)},onBlur:function(e){o("blur",e)},error:t}}}),w={key:0,class:"error-tip"};S.render=function(e,o){return(0,i.openBlock)(),(0,i.createBlock)("div",null,[(0,i.createVNode)("label",{class:["add-label",{error:e.error.multiple}],"data-unit":e.unit},[(0,i.createVNode)("input",{class:"add-weight",type:"number",inputmode:"decimal",value:e.modelValue,placeholder:e.placeholder,onInput:o[1]||(o[1]=(...o)=>e.onInput&&e.onInput(...o)),onBlur:o[2]||(o[2]=(...o)=>e.onBlur&&e.onBlur(...o))},null,40,["value","placeholder"])],10,["data-unit"]),(0,i.renderSlot)(e.$slots,"error",{},(()=>[e.showError&&e.error.text?((0,i.openBlock)(),(0,i.createBlock)("div",w,(0,i.toDisplayString)(e.error.text),1)):(0,i.createCommentVNode)("v-if",!0)]))])},S._scopeId="data-v-6600b8d4";var N=S,C="1.0.0";function B(e){[c,y,N].forEach((o=>{o.install?e.use(o):o.name&&e.component(o.name,o)}))}var V={install:B,version:C}})(),r})()}));
!function(e,o){"object"==typeof exports&&"object"==typeof module?module.exports=o(require("vue")):"function"==typeof define&&define.amd?define("goldmorning-ui",["vue"],o):"object"==typeof exports?exports["goldmorning-ui"]=o(require("vue")):e["goldmorning-ui"]=o(e.Vue)}("undefined"!=typeof self?self:this,(function(e){return(()=>{"use strict";var o={705:e=>{e.exports=function(e){var o=[];return o.toString=function(){return this.map((function(o){var t=function(e,o){var t,n,r,i=e[1]||"",a=e[3];if(!a)return i;if(o&&"function"==typeof btoa){var c=(t=a,n=btoa(unescape(encodeURIComponent(JSON.stringify(t)))),r="sourceMappingURL=data:application/json;charset=utf-8;base64,".concat(n),"/*# ".concat(r," */")),l=a.sources.map((function(e){return"/*# sourceURL=".concat(a.sourceRoot||"").concat(e," */")}));return[i].concat(l).concat([c]).join("\n")}return[i].join("\n")}(o,e);return o[2]?"@media ".concat(o[2]," {").concat(t,"}"):t})).join("")},o.i=function(e,t,n){"string"==typeof e&&(e=[[null,e,""]]);var r={};if(n)for(var i=0;i<this.length;i++){var a=this[i][0];null!=a&&(r[a]=!0)}for(var c=0;c<e.length;c++){var l=[].concat(e[c]);n&&r[l[0]]||(t&&(l[2]?l[2]="".concat(t," and ").concat(l[2]):l[2]=t),o.push(l))}},o}},977:(e,o,t)=>{var n=t(705),r=t.n(n)()(!1);r.push([e.id,":root{--color-white:#fff;--color-primary:#c9272f;--color-main:#333;--color-sub:#666;--color-gray:#999;--family-number-heavy:'Arial-BoldMT','Arial';--family-number:'Arial';--family:'PingFangSC-Regular','微软雅黑';--family-medium:'PingFangSC-Medium','微软雅黑'}.coupon{display:flex;height:82px;border-radius:6px;position:relative;overflow:hidden;background-color:var(--color-white);font-family:var(--family)}.coupon::after{content:'';position:absolute;z-index:1;top:0;left:0;right:0;bottom:0;border:1px solid #eee;border-radius:6px;transition:all .3s ease}.coupon.checked::after{background-color:rgba(195,37,45,.05);border-color:rgba(195,37,45,.05)}.coupon-left{width:98px;align-items:center;display:flex;flex-direction:column;justify-content:center}.coupon-offer{margin-bottom:4px}.coupon-symbol{color:var(--color-primary);font-size:18px;font-weight:800;line-height:25px;margin-right:2px}.coupon-amount{color:var(--color-primary);font-family:var(--family-number-heavy);font-size:32px;font-weight:400;line-height:36px}.coupon-describe,.coupon-expired,.coupon-unit{font-size:12px;font-weight:400;color:var(--color-sub);line-height:17px}.coupon-mask{width:12px;display:flex;align-items:center;justify-content:center;padding:12px 0;position:relative;z-index:2}.coupon-mask--line{border-left:1px #ddd dashed;height:100%}.coupon-mask--after,.coupon-mask--before{content:'';width:12px;height:12px;position:absolute;border-radius:50%;border-width:1px;border-style:solid;background-color:currentColor;transition:all .3s ease}.coupon-mask--before{top:-6px}.coupon-mask--after{bottom:-6px}.coupon-mask.checked::after,.coupon-mask.checked::before{border-color:rgba(195,37,45,.1)}.coupon-right{flex:1 1 0;overflow:hidden;position:relative;z-index:2;display:flex;margin-left:6px;margin-right:12px;align-items:center}.coupon-describe.describe{margin-top:2px;margin-bottom:2px}.coupon-info{flex:1 1 0;overflow:hidden;display:flex;flex-direction:column;justify-content:center}.coupon-title{font-size:14px;font-family:var(--family-medium);font-weight:500;color:#333;line-height:20px}.coupon-title.mb4{margin-bottom:4px}.coupon-btn{display:inline-flex;align-items:center;justify-content:center;background-color:var(--color-primary);padding:6px 12px;border-radius:100px;box-sizing:border-box;height:28px;border:none;font-size:12px;font-weight:400;color:var(--color-white);line-height:16px}.coupon-state{height:14px;background:#fe6632;border-radius:0 6px 0 6px;padding:1px 4px;font-size:12px;font-weight:400;color:rgba(255,255,255,.9);line-height:14px;position:absolute;top:0;right:0;z-index:2}.coupon-checkbox{display:block;background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/175212ncex89.svg);background-repeat:no-repeat;background-size:cover;background-position:center;width:16px;height:16px}.coupon-checkbox.checked{background-image:url(https://gm-itrade-1255882558.cos.ap-guangzhou.myqcloud.com/GM_ITRADE/base/20210803/1752121jyuum.svg)}.coupon-input-checkbox{position:absolute;visibility:hidden}.coupon-input-checkbox:disabled+.coupon-checkbox{opacity:.3}",""]),o.Z=r},819:(e,o,t)=>{var n=t(705),r=t.n(n)()(!1);r.push([e.id,":root{--color-white:#fff;--color-primary:#c9272f;--color-main:#333;--color-sub:#666;--color-gray:#999;--family-number-heavy:'Arial-BoldMT','Arial';--family-number:'Arial';--family:'PingFangSC-Regular','微软雅黑';--family-medium:'PingFangSC-Medium','微软雅黑'}.add-label{display:flex;line-height:20px;position:relative;border:1px solid transparent;box-sizing:border-box;transition:border-color .25s linear;border-radius:4px;overflow:hidden}.add-label::after{content:attr(data-unit);position:absolute;right:12px;bottom:10px;color:#646566}.add-label.error{border-color:var(--color-primary)}.add-weight{background:#f7f8fa;padding:10px 0;flex:1 1 0;text-align:center;font-size:22px;border:none}.add-weight:focus{outline-color:transparent}.add-weight::-webkit-input-placeholder{opacity:.3}.add-weight::placeholder{opacity:.3}input::-webkit-inner-spin-button,input::-webkit-outer-spin-button{-webkit-appearance:none}input[type=number]{-moz-appearance:textfield}.error-tip{font-size:12px;color:var(--color-error);line-height:24px}",""]),o.Z=r},379:(e,o,t)=>{var n,r=function(){var e={};return function(o){if(void 0===e[o]){var t=document.querySelector(o);if(window.HTMLIFrameElement&&t instanceof window.HTMLIFrameElement)try{t=t.contentDocument.head}catch(e){t=null}e[o]=t}return e[o]}}(),i=[];function a(e){for(var o=-1,t=0;t<i.length;t++)if(i[t].identifier===e){o=t;break}return o}function c(e,o){for(var t={},n=[],r=0;r<e.length;r++){var c=e[r],l=o.base?c[0]+o.base:c[0],u=t[l]||0,s="".concat(l," ").concat(u);t[l]=u+1;var d=a(s),p={css:c[1],media:c[2],sourceMap:c[3]};-1!==d?(i[d].references++,i[d].updater(p)):i.push({identifier:s,updater:g(p,o),references:1}),n.push(s)}return n}function l(e){var o=document.createElement("style"),n=e.attributes||{};if(void 0===n.nonce){var i=t.nc;i&&(n.nonce=i)}if(Object.keys(n).forEach((function(e){o.setAttribute(e,n[e])})),"function"==typeof e.insert)e.insert(o);else{var a=r(e.insert||"head");if(!a)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");a.appendChild(o)}return o}var u,s=(u=[],function(e,o){return u[e]=o,u.filter(Boolean).join("\n")});function d(e,o,t,n){var r=t?"":n.media?"@media ".concat(n.media," {").concat(n.css,"}"):n.css;if(e.styleSheet)e.styleSheet.cssText=s(o,r);else{var i=document.createTextNode(r),a=e.childNodes;a[o]&&e.removeChild(a[o]),a.length?e.insertBefore(i,a[o]):e.appendChild(i)}}function p(e,o,t){var n=t.css,r=t.media,i=t.sourceMap;if(r?e.setAttribute("media",r):e.removeAttribute("media"),i&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(i))))," */")),e.styleSheet)e.styleSheet.cssText=n;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(n))}}var f=null,m=0;function g(e,o){var t,n,r;if(o.singleton){var i=m++;t=f||(f=l(o)),n=d.bind(null,t,i,!1),r=d.bind(null,t,i,!0)}else t=l(o),n=p.bind(null,t,o),r=function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)};return n(e),function(o){if(o){if(o.css===e.css&&o.media===e.media&&o.sourceMap===e.sourceMap)return;n(e=o)}else r()}}e.exports=function(e,o){(o=o||{}).singleton||"boolean"==typeof o.singleton||(o.singleton=(void 0===n&&(n=Boolean(window&&document&&document.all&&!window.atob)),n));var t=c(e=e||[],o);return function(e){if(e=e||[],"[object Array]"===Object.prototype.toString.call(e)){for(var n=0;n<t.length;n++){var r=a(t[n]);i[r].references--}for(var l=c(e,o),u=0;u<t.length;u++){var s=a(t[u]);0===i[s].references&&(i[s].updater(),i.splice(s,1))}t=l}}}},197:o=>{o.exports=e}},t={};function n(e){var r=t[e];if(void 0!==r)return r.exports;var i=t[e]={id:e,exports:{}};return o[e](i,i.exports,n),i.exports}n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var r={};return(()=>{n.r(r),n.d(r,{Coupon:()=>h,OrderInput:()=>k,default:()=>N,install:()=>w,version:()=>S});var e=n(379),o=n.n(e),t=n(977),i=(o()(t.Z,{insert:"head",singleton:!1}),t.Z.locals,n(197)),a={name:"Coupon",components:{},props:{amount:[String,Number],title:String,expired:String,state:String,describe:String,symbol:{type:String,default:"+"},unit:{type:String,default:"元/克"},btnText:{type:String,default:"去使用"},isCheckBox:Boolean,modelValue:Boolean,disabled:Boolean,maskColor:String},emits:["update:modelValue","change","click"],setup:(e,{emit:o})=>({couponMaskStyle:(0,i.computed)((()=>({color:e.maskColor||"#EBEDF0"}))),beforeBc:(0,i.computed)((()=>({"border-color":e.maskColor?"rgba(211, 211, 211, .5)":"transparent"}))),onChange:function(e){o("update:modelValue",e.target.checked),o("change",e.target.checked)},onClick:function(e){o("click",e)}})},c={class:"coupon-left"},l={class:"coupon-offer"},u={class:"coupon-symbol"},s={class:"coupon-amount"},d={class:"coupon-unit"},p=(0,i.createVNode)("div",{class:"coupon-mask--line"},null,-1),f={class:"coupon-right"},m={class:"coupon-info"},g={class:"coupon-expired"},b={key:0,class:"coupon-state"};a.render=function(e,o){return(0,i.openBlock)(),(0,i.createBlock)("label",{class:["coupon",{checked:e.modelValue}]},[(0,i.createVNode)("div",c,[(0,i.createVNode)("div",l,[(0,i.createVNode)("span",u,(0,i.toDisplayString)(e.symbol),1),(0,i.createVNode)("span",s,(0,i.toDisplayString)(e.amount),1)]),(0,i.createVNode)("div",d,"单位:"+(0,i.toDisplayString)(e.unit),1)]),(0,i.createVNode)("div",{class:["coupon-mask",{checked:e.modelValue}],style:e.couponMaskStyle},[(0,i.createVNode)("div",{class:"coupon-mask--before",style:e.beforeBc},null,4),p,(0,i.createVNode)("div",{class:"coupon-mask--after",style:e.beforeBc},null,4)],6),(0,i.createVNode)("div",f,[(0,i.createVNode)("div",m,[(0,i.createVNode)("h3",{class:["coupon-title",{mb4:!e.describe}]},(0,i.toDisplayString)(e.title),3),(0,i.createVNode)("div",{class:["coupon-describe",{describe:e.describe}]},(0,i.toDisplayString)(e.describe),3),(0,i.createVNode)("div",g,(0,i.toDisplayString)(e.expired),1)]),(0,i.createCommentVNode)(" 是否使用check "),e.isCheckBox?((0,i.openBlock)(),(0,i.createBlock)(i.Fragment,{key:0},[(0,i.createVNode)("input",{type:"checkbox",class:"coupon-input-checkbox",onChange:o[1]||(o[1]=(...o)=>e.onChange&&e.onChange(...o)),value:e.modelValue,disabled:e.disabled},null,40,["value","disabled"]),(0,i.createVNode)("span",{class:["coupon-checkbox",{checked:e.modelValue}]},null,2)],64)):((0,i.openBlock)(),(0,i.createBlock)("button",{key:1,class:"coupon-btn",onClick:o[2]||(o[2]=(...o)=>e.onClick&&e.onClick(...o))},(0,i.toDisplayString)(e.btnText),1))]),e.state?((0,i.openBlock)(),(0,i.createBlock)("span",b,(0,i.toDisplayString)(e.state),1)):(0,i.createCommentVNode)("v-if",!0)],2)},a._scopeId="data-v-04396002";var h=a,v=n(819),x=(o()(v.Z,{insert:"head",singleton:!1}),v.Z.locals,{name:"OrderInput",props:{modelValue:[Number,String],placeholder:String,unit:{type:String,default:"克"},multiple:[String,Number],decimal:[String,Number],max:[String,Number],min:[String,Number],showError:Boolean,isRequired:Boolean},emits:["update:modelValue","update:isPass","blur"],setup(e,{emit:o}){var t=(0,i.reactive)({text:"",multiple:!1});function n(e){if(Number.isInteger(+e))return 0;var o=e+"",t=o.indexOf(".");return o.substr(t+1).length}function r(e,o){var t=e<0,n=Math.pow(10,o),r=parseInt(Math.abs(e)*n+.5,10);return t&&(r=-r),r}return{onInput:function(i){var{value:a}=i.target,c=a,l=a.split(".");2===l.length&&l[1].length>e.decimal&&(c=0===e.decimal?l[0]:"".concat(l[0],".").concat(l[1].slice(0,e.decimal))),c>+e.max&&(c=e.max),o("update:modelValue",c),i.target.value=c,function(i){var a,c,l,u,s,d={msg:"",multipleError:!1};e.isRequired&&!i?d.msg=e.placeholder:i<e.min?d.msg="最小克重为".concat(e.min):e.multiple&&(a=i,c=e.multiple,u=r(a,l=Math.max(n(a),n(c))),s=r(c,l),console.log(u,s),u%s!=0)&&(d.msg="请输入".concat(e.multiple,"的整数倍"),d.multipleError=!0),d.msg?o("update:isPass",!1):o("update:isPass",!0),t.text=d.msg,t.multiple=d.multipleError}(c)},onBlur:function(e){o("blur",e)},error:t}}}),y={key:0,class:"error-tip"};x.render=function(e,o){return(0,i.openBlock)(),(0,i.createBlock)("div",null,[(0,i.createVNode)("label",{class:["add-label",{error:e.error.multiple}],"data-unit":e.unit},[(0,i.createVNode)("input",{class:"add-weight",type:"number",inputmode:"decimal",value:e.modelValue,placeholder:e.placeholder,onInput:o[1]||(o[1]=(...o)=>e.onInput&&e.onInput(...o)),onBlur:o[2]||(o[2]=(...o)=>e.onBlur&&e.onBlur(...o))},null,40,["value","placeholder"])],10,["data-unit"]),(0,i.renderSlot)(e.$slots,"error",{},(()=>[e.showError&&e.error.text?((0,i.openBlock)(),(0,i.createBlock)("div",y,(0,i.toDisplayString)(e.error.text),1)):(0,i.createCommentVNode)("v-if",!0)]))])},x._scopeId="data-v-302f5c85";var k=x,S="1.0.2";function w(e){[h,k].forEach((o=>{o.install?e.use(o):o.name&&e.component(o.name,o)}))}var N={install:w,version:S}})(),r})()}));

@@ -7,8 +7,2 @@ "use strict";

exports.install = install;
Object.defineProperty(exports, "Button", {
enumerable: true,
get: function () {
return _button.default;
}
});
Object.defineProperty(exports, "Coupon", {

@@ -28,4 +22,2 @@ enumerable: true,

var _button = _interopRequireDefault(require("./button"));
var _coupon = _interopRequireDefault(require("./coupon"));

@@ -37,7 +29,7 @@

var version = '1.0.0';
var version = '1.0.2';
exports.version = version;
function install(app) {
var components = [_button.default, _coupon.default, _orderInput.default];
var components = [_coupon.default, _orderInput.default];
components.forEach(item => {

@@ -44,0 +36,0 @@ if (item.install) {

@@ -174,4 +174,4 @@ "use strict";

__vue_sfc__.render = __vue_render__;
__vue_sfc__._scopeId = 'data-v-6600b8d4';
__vue_sfc__._scopeId = 'data-v-302f5c85';
var _default = __vue_sfc__;
exports.default = _default;

@@ -1,1 +0,3 @@

"use strict";
"use strict";
require('../../style/base.css');

@@ -1,1 +0,3 @@

"use strict";
"use strict";
require('../../style/base.less');
{
"name": "goldmorning-ui",
"version": "1.0.1",
"version": "1.0.2",
"description": "",

@@ -5,0 +5,0 @@ "style": "lib/index.css",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc