From 0d2024eabd0f07bc4ab3341dddc10464d31938f8 Mon Sep 17 00:00:00 2001 From: skyouc Date: 星期六, 21 十二月 2024 18:47:12 +0800 Subject: [PATCH] #新增订单筛选物料界面 --- uni_modules/uni-icons/components/uni-icons/uni-icons.vue | 192 ++++++++++++++++++++++++------------------------ 1 files changed, 96 insertions(+), 96 deletions(-) diff --git a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue index 86e7444..8ba3f91 100644 --- a/uni_modules/uni-icons/components/uni-icons/uni-icons.vue +++ b/uni_modules/uni-icons/components/uni-icons/uni-icons.vue @@ -1,96 +1,96 @@ -<template> - <!-- #ifdef APP-NVUE --> - <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text> - <!-- #endif --> - <!-- #ifndef APP-NVUE --> - <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text> - <!-- #endif --> -</template> - -<script> - import icons from './icons.js'; - const getVal = (val) => { - const reg = /^[0-9]*$/g - return (typeof val === 'number' ||銆�reg.test(val) )? val + 'px' : val; - } - // #ifdef APP-NVUE - var domModule = weex.requireModule('dom'); - import iconUrl from './uniicons.ttf' - domModule.addRule('fontFace', { - 'fontFamily': "uniicons", - 'src': "url('"+iconUrl+"')" - }); - // #endif - - /** - * Icons 鍥炬爣 - * @description 鐢ㄤ簬灞曠ず icons 鍥炬爣 - * @tutorial https://ext.dcloud.net.cn/plugin?id=28 - * @property {Number} size 鍥炬爣澶у皬 - * @property {String} type 鍥炬爣鍥炬锛屽弬鑰冪ず渚� - * @property {String} color 鍥炬爣棰滆壊 - * @property {String} customPrefix 鑷畾涔夊浘鏍� - * @event {Function} click 鐐瑰嚮 Icon 瑙﹀彂浜嬩欢 - */ - export default { - 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() { - return { - icons: icons.glyphs - } - }, - computed:{ - unicode(){ - let code = this.icons.find(v=>v.font_class === this.type) - if(code){ - return unescape(`%u${code.unicode}`) - } - return '' - }, - iconSize(){ - return getVal(this.size) - } - }, - methods: { - _onClick() { - this.$emit('click') - } - } - } -</script> - -<style lang="scss"> - /* #ifndef APP-NVUE */ - @import './uniicons.css'; - @font-face { - font-family: uniicons; - src: url('./uniicons.ttf') format('truetype'); - } - - /* #endif */ - .uni-icons { - font-family: uniicons; - text-decoration: none; - text-align: center; - } - -</style> +<template> + <!-- #ifdef APP-NVUE --> + <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" @click="_onClick">{{unicode}}</text> + <!-- #endif --> + <!-- #ifndef APP-NVUE --> + <text :style="{ color: color, 'font-size': iconSize }" class="uni-icons" :class="['uniui-'+type,customPrefix,customPrefix?type:'']" @click="_onClick"></text> + <!-- #endif --> +</template> + +<script> + import icons from './icons.js'; + const getVal = (val) => { + const reg = /^[0-9]*$/g + return (typeof val === 'number' ||銆�reg.test(val) )? val + 'px' : val; + } + // #ifdef APP-NVUE + var domModule = weex.requireModule('dom'); + import iconUrl from './uniicons.ttf' + domModule.addRule('fontFace', { + 'fontFamily': "uniicons", + 'src': "url('"+iconUrl+"')" + }); + // #endif + + /** + * Icons 鍥炬爣 + * @description 鐢ㄤ簬灞曠ず icons 鍥炬爣 + * @tutorial https://ext.dcloud.net.cn/plugin?id=28 + * @property {Number} size 鍥炬爣澶у皬 + * @property {String} type 鍥炬爣鍥炬锛屽弬鑰冪ず渚� + * @property {String} color 鍥炬爣棰滆壊 + * @property {String} customPrefix 鑷畾涔夊浘鏍� + * @event {Function} click 鐐瑰嚮 Icon 瑙﹀彂浜嬩欢 + */ + export default { + 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() { + return { + icons: icons.glyphs + } + }, + computed:{ + unicode(){ + let code = this.icons.find(v=>v.font_class === this.type) + if(code){ + return unescape(`%u${code.unicode}`) + } + return '' + }, + iconSize(){ + return getVal(this.size) + } + }, + methods: { + _onClick() { + this.$emit('click') + } + } + } +</script> + +<style lang="scss"> + /* #ifndef APP-NVUE */ + @import './uniicons.css'; + @font-face { + font-family: uniicons; + src: url('./uniicons.ttf') format('truetype'); + } + + /* #endif */ + .uni-icons { + font-family: uniicons; + text-decoration: none; + text-align: center; + } + +</style> -- Gitblit v1.9.1