first commit
This commit is contained in:
23
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/types.js
vendored
Normal file
23
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/types.js
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
"use strict";
|
||||
const uni_modules_wotDesignUni_components_common_props = require("../common/props.js");
|
||||
const iconProps = {
|
||||
...uni_modules_wotDesignUni_components_common_props.baseProps,
|
||||
/**
|
||||
* 使用的图标名字,可以使用链接图片
|
||||
*/
|
||||
name: uni_modules_wotDesignUni_components_common_props.makeRequiredProp(String),
|
||||
/**
|
||||
* 图标的颜色
|
||||
*/
|
||||
color: String,
|
||||
/**
|
||||
* 图标的字体大小
|
||||
*/
|
||||
size: uni_modules_wotDesignUni_components_common_props.numericProp,
|
||||
/**
|
||||
* 类名前缀,用于使用自定义图标
|
||||
*/
|
||||
classPrefix: uni_modules_wotDesignUni_components_common_props.makeStringProp("wd-icon")
|
||||
};
|
||||
exports.iconProps = iconProps;
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/types.js.map
|
||||
55
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.js
vendored
Normal file
55
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.js
vendored
Normal file
@@ -0,0 +1,55 @@
|
||||
"use strict";
|
||||
const common_vendor = require("../../../../common/vendor.js");
|
||||
const uni_modules_wotDesignUni_components_common_util = require("../common/util.js");
|
||||
const uni_modules_wotDesignUni_components_wdIcon_types = require("./types.js");
|
||||
const __default__ = {
|
||||
name: "wd-icon",
|
||||
options: {
|
||||
virtualHost: true,
|
||||
addGlobalClass: true,
|
||||
styleIsolation: "shared"
|
||||
}
|
||||
};
|
||||
const _sfc_main = /* @__PURE__ */ common_vendor.defineComponent({
|
||||
...__default__,
|
||||
props: uni_modules_wotDesignUni_components_wdIcon_types.iconProps,
|
||||
emits: ["click", "touch"],
|
||||
setup(__props, { emit: __emit }) {
|
||||
const props = __props;
|
||||
const emit = __emit;
|
||||
const isImage = common_vendor.computed(() => {
|
||||
return uni_modules_wotDesignUni_components_common_util.isDef(props.name) && props.name.includes("/");
|
||||
});
|
||||
const rootClass = common_vendor.computed(() => {
|
||||
const prefix = props.classPrefix;
|
||||
return `${prefix} ${props.customClass} ${isImage.value ? "wd-icon--image" : prefix + "-" + props.name}`;
|
||||
});
|
||||
const rootStyle = common_vendor.computed(() => {
|
||||
const style = {};
|
||||
if (props.color) {
|
||||
style["color"] = props.color;
|
||||
}
|
||||
if (props.size) {
|
||||
style["font-size"] = uni_modules_wotDesignUni_components_common_util.addUnit(props.size);
|
||||
}
|
||||
return `${uni_modules_wotDesignUni_components_common_util.objToStyle(style)} ${props.customStyle}`;
|
||||
});
|
||||
function handleClick(event) {
|
||||
emit("click", event);
|
||||
}
|
||||
return (_ctx, _cache) => {
|
||||
return common_vendor.e({
|
||||
a: isImage.value
|
||||
}, isImage.value ? {
|
||||
b: _ctx.name
|
||||
} : {}, {
|
||||
c: common_vendor.o(handleClick),
|
||||
d: common_vendor.n(rootClass.value),
|
||||
e: common_vendor.s(rootStyle.value)
|
||||
});
|
||||
};
|
||||
}
|
||||
});
|
||||
const Component = /* @__PURE__ */ common_vendor._export_sfc(_sfc_main, [["__scopeId", "data-v-24906af6"]]);
|
||||
wx.createComponent(Component);
|
||||
//# sourceMappingURL=../../../../../.sourcemap/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.js.map
|
||||
4
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.json
vendored
Normal file
4
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"component": true,
|
||||
"usingComponents": {}
|
||||
}
|
||||
1
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxml
vendored
Normal file
1
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxml
vendored
Normal file
@@ -0,0 +1 @@
|
||||
<view bindtap="{{c}}" class="{{['data-v-24906af6', d]}}" style="{{e}}"><image wx:if="{{a}}" class="wd-icon__image data-v-24906af6" src="{{b}}"></image></view>
|
||||
1079
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxss
vendored
Normal file
1079
unpackage/dist/dev/mp-weixin/uni_modules/wot-design-uni/components/wd-icon/wd-icon.wxss
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user