no message
This commit is contained in:
1171
uni_modules/uni-icons/components/uni-icons/icons.js
Normal file
1171
uni_modules/uni-icons/components/uni-icons/icons.js
Normal file
File diff suppressed because it is too large
Load Diff
53
uni_modules/uni-icons/components/uni-icons/uni-icons.js
Normal file
53
uni_modules/uni-icons/components/uni-icons/uni-icons.js
Normal file
@@ -0,0 +1,53 @@
|
||||
var n = require("./icons.js"),
|
||||
e = require("../../../../common/vendor.js"),
|
||||
t = {
|
||||
name: "UniIcons",
|
||||
emits: ["click"],
|
||||
props: {
|
||||
type: { type: String, default: "" },
|
||||
color: { type: String, default: "#333333" },
|
||||
size: { type: [Number, String], default: 16 },
|
||||
customPrefix: { type: String, default: "" },
|
||||
},
|
||||
data: function () {
|
||||
return { icons: n.icons.glyphs };
|
||||
},
|
||||
computed: {
|
||||
unicode: function () {
|
||||
var n = this,
|
||||
e = this.icons.find(function (e) {
|
||||
return e.font_class === n.type;
|
||||
});
|
||||
return e ? unescape("%u".concat(e.unicode)) : "";
|
||||
},
|
||||
iconSize: function () {
|
||||
return "number" == typeof (n = this.size) || /^[0-9]*$/g.test(n)
|
||||
? n + "px"
|
||||
: n;
|
||||
var n;
|
||||
},
|
||||
},
|
||||
methods: {
|
||||
_onClick: function () {
|
||||
this.$emit("click");
|
||||
},
|
||||
},
|
||||
},
|
||||
i = e._export_sfc(t, [
|
||||
[
|
||||
"render",
|
||||
function (n, t, i, o, c, r) {
|
||||
return {
|
||||
a: i.color,
|
||||
b: r.iconSize,
|
||||
c: e.n("uniui-" + i.type),
|
||||
d: e.n(i.customPrefix),
|
||||
e: e.n(i.customPrefix ? i.type : ""),
|
||||
f: e.o(function () {
|
||||
return r._onClick && r._onClick.apply(r, arguments);
|
||||
}),
|
||||
};
|
||||
},
|
||||
],
|
||||
]);
|
||||
wx.createComponent(i);
|
||||
@@ -0,0 +1 @@
|
||||
{ "component": true, "usingComponents": {} }
|
||||
@@ -0,0 +1,5 @@
|
||||
<text
|
||||
bindtap="{{f}}"
|
||||
class="{{['uni-icons',c,d,e]}}"
|
||||
style="{{'color:'+a+';'+'font-size:'+b}}"
|
||||
></text>
|
||||
492
uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
Normal file
492
uni_modules/uni-icons/components/uni-icons/uni-icons.wxss
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user