@weitutech/by-components 1.2.17 → 1.2.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/by-components.common.js +52 -9
- package/lib/by-components.umd.js +52 -9
- package/lib/by-components.umd.min.js +1 -1
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -101526,8 +101526,8 @@ var ByGridLayout_component = normalizeComponent(
|
|
|
101526
101526
|
)
|
|
101527
101527
|
|
|
101528
101528
|
/* harmony default export */ var ByGridLayout = (ByGridLayout_component.exports);
|
|
101529
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=
|
|
101530
|
-
var
|
|
101529
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=91c49304
|
|
101530
|
+
var ByTagvue_type_template_id_91c49304_render = function render() {
|
|
101531
101531
|
var _vm = this,
|
|
101532
101532
|
_c = _vm._self._c;
|
|
101533
101533
|
return _c('el-tag', _vm._g(_vm._b({
|
|
@@ -101536,14 +101536,25 @@ var ByTagvue_type_template_id_197fb365_render = function render() {
|
|
|
101536
101536
|
"type": _vm.elTagType,
|
|
101537
101537
|
"color": _vm.elTagColor
|
|
101538
101538
|
}
|
|
101539
|
-
}, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.
|
|
101539
|
+
}, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.hasIcon ? _c('span', {
|
|
101540
|
+
staticClass: "by-tag__icon",
|
|
101541
|
+
attrs: {
|
|
101542
|
+
"aria-hidden": "true"
|
|
101543
|
+
}
|
|
101544
|
+
}, [_vm._t("icon", function () {
|
|
101545
|
+
return [_vm.icon ? _c('i', {
|
|
101546
|
+
class: _vm.icon
|
|
101547
|
+
}) : _vm._e()];
|
|
101548
|
+
})], 2) : _vm._e(), _vm._t("default")], 2);
|
|
101540
101549
|
};
|
|
101541
|
-
var
|
|
101550
|
+
var ByTagvue_type_template_id_91c49304_staticRenderFns = [];
|
|
101542
101551
|
|
|
101543
101552
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-40.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=script&lang=js
|
|
101553
|
+
|
|
101544
101554
|
/**
|
|
101545
101555
|
* 原生 el-tag 的 type 仅支持:primary / success / info / warning / danger
|
|
101546
|
-
* 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss
|
|
101556
|
+
* 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss 统一配色;
|
|
101557
|
+
* 另支持前缀图标(icon / #icon)与胶囊圆角(round)。
|
|
101547
101558
|
*/
|
|
101548
101559
|
const NATIVE_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
|
|
101549
101560
|
const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', 'purple', 'violet', 'lavender', 'indigo', 'cyan', 'teal', 'aqua', 'ink', 'mint', 'lime', 'forest', 'olive', 'sage', 'crimson', 'rose', 'pink', 'blossom', 'magenta', 'scarlet', 'orange', 'coral', 'brick', 'amber', 'gold', 'lemon', 'brown', 'sand', 'beige', 'wine', 'silver', 'copper'];
|
|
@@ -101560,6 +101571,19 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101560
101571
|
type: {
|
|
101561
101572
|
type: String,
|
|
101562
101573
|
default: ''
|
|
101574
|
+
},
|
|
101575
|
+
/**
|
|
101576
|
+
* 前缀图标类名(如 el-icon-check);也可通过 #icon 插槽完全自定义。
|
|
101577
|
+
* 同时存在时优先渲染 #icon 插槽内容。
|
|
101578
|
+
*/
|
|
101579
|
+
icon: {
|
|
101580
|
+
type: String,
|
|
101581
|
+
default: ''
|
|
101582
|
+
},
|
|
101583
|
+
/** 是否使用胶囊圆角(border-radius: 999px) */
|
|
101584
|
+
round: {
|
|
101585
|
+
type: Boolean,
|
|
101586
|
+
default: false
|
|
101563
101587
|
}
|
|
101564
101588
|
},
|
|
101565
101589
|
computed: {
|
|
@@ -101569,6 +101593,12 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101569
101593
|
isExtendedType() {
|
|
101570
101594
|
return this.type && EXTENDED_TYPES.includes(this.type);
|
|
101571
101595
|
},
|
|
101596
|
+
hasIconSlot() {
|
|
101597
|
+
return Boolean(this.$scopedSlots && this.$scopedSlots.icon || this.$slots && this.$slots.icon);
|
|
101598
|
+
},
|
|
101599
|
+
hasIcon() {
|
|
101600
|
+
return Boolean(this.icon) || this.hasIconSlot;
|
|
101601
|
+
},
|
|
101572
101602
|
elTagType() {
|
|
101573
101603
|
if (this.isNativeType) return this.type;
|
|
101574
101604
|
if (this.isExtendedType) return ''; // 扩展类型完全由 by-tag.scss 配色
|
|
@@ -101579,8 +101609,21 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101579
101609
|
return this.$attrs && this.$attrs.color !== undefined ? this.$attrs.color : undefined;
|
|
101580
101610
|
},
|
|
101581
101611
|
tagClass() {
|
|
101582
|
-
|
|
101583
|
-
|
|
101612
|
+
const classes = [];
|
|
101613
|
+
// 扩展色、圆角、图标样式均挂在 .by-tag 下;原生 type 在需要时也挂上基类
|
|
101614
|
+
if (this.isExtendedType || this.round || this.hasIcon) {
|
|
101615
|
+
classes.push('by-tag');
|
|
101616
|
+
}
|
|
101617
|
+
if (this.isExtendedType) {
|
|
101618
|
+
classes.push(`by-tag--${this.type}`);
|
|
101619
|
+
}
|
|
101620
|
+
if (this.round) {
|
|
101621
|
+
classes.push('by-tag--round');
|
|
101622
|
+
}
|
|
101623
|
+
if (this.hasIcon) {
|
|
101624
|
+
classes.push('by-tag--with-icon');
|
|
101625
|
+
}
|
|
101626
|
+
return classes;
|
|
101584
101627
|
},
|
|
101585
101628
|
tagAttrs() {
|
|
101586
101629
|
const attrs = {
|
|
@@ -101608,8 +101651,8 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101608
101651
|
;
|
|
101609
101652
|
var ByTag_component = normalizeComponent(
|
|
101610
101653
|
by_tag_ByTagvue_type_script_lang_js,
|
|
101611
|
-
|
|
101612
|
-
|
|
101654
|
+
ByTagvue_type_template_id_91c49304_render,
|
|
101655
|
+
ByTagvue_type_template_id_91c49304_staticRenderFns,
|
|
101613
101656
|
false,
|
|
101614
101657
|
null,
|
|
101615
101658
|
null,
|
package/lib/by-components.umd.js
CHANGED
|
@@ -101536,8 +101536,8 @@ var ByGridLayout_component = normalizeComponent(
|
|
|
101536
101536
|
)
|
|
101537
101537
|
|
|
101538
101538
|
/* harmony default export */ var ByGridLayout = (ByGridLayout_component.exports);
|
|
101539
|
-
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=
|
|
101540
|
-
var
|
|
101539
|
+
;// ./node_modules/cache-loader/dist/cjs.js?{"cacheDirectory":"node_modules/.cache/vue-loader","cacheIdentifier":"185687ec-vue-loader-template"}!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/templateLoader.js??ruleSet[1].rules[3]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=template&id=91c49304
|
|
101540
|
+
var ByTagvue_type_template_id_91c49304_render = function render() {
|
|
101541
101541
|
var _vm = this,
|
|
101542
101542
|
_c = _vm._self._c;
|
|
101543
101543
|
return _c('el-tag', _vm._g(_vm._b({
|
|
@@ -101546,14 +101546,25 @@ var ByTagvue_type_template_id_197fb365_render = function render() {
|
|
|
101546
101546
|
"type": _vm.elTagType,
|
|
101547
101547
|
"color": _vm.elTagColor
|
|
101548
101548
|
}
|
|
101549
|
-
}, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.
|
|
101549
|
+
}, 'el-tag', _vm.tagAttrs, false), _vm.$listeners), [_vm.hasIcon ? _c('span', {
|
|
101550
|
+
staticClass: "by-tag__icon",
|
|
101551
|
+
attrs: {
|
|
101552
|
+
"aria-hidden": "true"
|
|
101553
|
+
}
|
|
101554
|
+
}, [_vm._t("icon", function () {
|
|
101555
|
+
return [_vm.icon ? _c('i', {
|
|
101556
|
+
class: _vm.icon
|
|
101557
|
+
}) : _vm._e()];
|
|
101558
|
+
})], 2) : _vm._e(), _vm._t("default")], 2);
|
|
101550
101559
|
};
|
|
101551
|
-
var
|
|
101560
|
+
var ByTagvue_type_template_id_91c49304_staticRenderFns = [];
|
|
101552
101561
|
|
|
101553
101562
|
;// ./node_modules/thread-loader/dist/cjs.js!./node_modules/babel-loader/lib/index.js??clonedRuleSet-82.use[1]!./node_modules/cache-loader/dist/cjs.js??ruleSet[0].use[0]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/index.js??vue-loader-options!./src/components/by-tag/ByTag.vue?vue&type=script&lang=js
|
|
101563
|
+
|
|
101554
101564
|
/**
|
|
101555
101565
|
* 原生 el-tag 的 type 仅支持:primary / success / info / warning / danger
|
|
101556
|
-
* 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss
|
|
101566
|
+
* 本组件扩展 type,扩展类型的背景、边框、文字由 style/by-tag.scss 统一配色;
|
|
101567
|
+
* 另支持前缀图标(icon / #icon)与胶囊圆角(round)。
|
|
101557
101568
|
*/
|
|
101558
101569
|
const NATIVE_TYPES = ['primary', 'success', 'info', 'warning', 'danger'];
|
|
101559
101570
|
const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', 'purple', 'violet', 'lavender', 'indigo', 'cyan', 'teal', 'aqua', 'ink', 'mint', 'lime', 'forest', 'olive', 'sage', 'crimson', 'rose', 'pink', 'blossom', 'magenta', 'scarlet', 'orange', 'coral', 'brick', 'amber', 'gold', 'lemon', 'brown', 'sand', 'beige', 'wine', 'silver', 'copper'];
|
|
@@ -101570,6 +101581,19 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101570
101581
|
type: {
|
|
101571
101582
|
type: String,
|
|
101572
101583
|
default: ''
|
|
101584
|
+
},
|
|
101585
|
+
/**
|
|
101586
|
+
* 前缀图标类名(如 el-icon-check);也可通过 #icon 插槽完全自定义。
|
|
101587
|
+
* 同时存在时优先渲染 #icon 插槽内容。
|
|
101588
|
+
*/
|
|
101589
|
+
icon: {
|
|
101590
|
+
type: String,
|
|
101591
|
+
default: ''
|
|
101592
|
+
},
|
|
101593
|
+
/** 是否使用胶囊圆角(border-radius: 999px) */
|
|
101594
|
+
round: {
|
|
101595
|
+
type: Boolean,
|
|
101596
|
+
default: false
|
|
101573
101597
|
}
|
|
101574
101598
|
},
|
|
101575
101599
|
computed: {
|
|
@@ -101579,6 +101603,12 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101579
101603
|
isExtendedType() {
|
|
101580
101604
|
return this.type && EXTENDED_TYPES.includes(this.type);
|
|
101581
101605
|
},
|
|
101606
|
+
hasIconSlot() {
|
|
101607
|
+
return Boolean(this.$scopedSlots && this.$scopedSlots.icon || this.$slots && this.$slots.icon);
|
|
101608
|
+
},
|
|
101609
|
+
hasIcon() {
|
|
101610
|
+
return Boolean(this.icon) || this.hasIconSlot;
|
|
101611
|
+
},
|
|
101582
101612
|
elTagType() {
|
|
101583
101613
|
if (this.isNativeType) return this.type;
|
|
101584
101614
|
if (this.isExtendedType) return ''; // 扩展类型完全由 by-tag.scss 配色
|
|
@@ -101589,8 +101619,21 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101589
101619
|
return this.$attrs && this.$attrs.color !== undefined ? this.$attrs.color : undefined;
|
|
101590
101620
|
},
|
|
101591
101621
|
tagClass() {
|
|
101592
|
-
|
|
101593
|
-
|
|
101622
|
+
const classes = [];
|
|
101623
|
+
// 扩展色、圆角、图标样式均挂在 .by-tag 下;原生 type 在需要时也挂上基类
|
|
101624
|
+
if (this.isExtendedType || this.round || this.hasIcon) {
|
|
101625
|
+
classes.push('by-tag');
|
|
101626
|
+
}
|
|
101627
|
+
if (this.isExtendedType) {
|
|
101628
|
+
classes.push(`by-tag--${this.type}`);
|
|
101629
|
+
}
|
|
101630
|
+
if (this.round) {
|
|
101631
|
+
classes.push('by-tag--round');
|
|
101632
|
+
}
|
|
101633
|
+
if (this.hasIcon) {
|
|
101634
|
+
classes.push('by-tag--with-icon');
|
|
101635
|
+
}
|
|
101636
|
+
return classes;
|
|
101594
101637
|
},
|
|
101595
101638
|
tagAttrs() {
|
|
101596
101639
|
const attrs = {
|
|
@@ -101618,8 +101661,8 @@ const EXTENDED_TYPES = ['blue', 'navy', 'sky', 'default', 'slate', 'charcoal', '
|
|
|
101618
101661
|
;
|
|
101619
101662
|
var ByTag_component = normalizeComponent(
|
|
101620
101663
|
by_tag_ByTagvue_type_script_lang_js,
|
|
101621
|
-
|
|
101622
|
-
|
|
101664
|
+
ByTagvue_type_template_id_91c49304_render,
|
|
101665
|
+
ByTagvue_type_template_id_91c49304_staticRenderFns,
|
|
101623
101666
|
false,
|
|
101624
101667
|
null,
|
|
101625
101668
|
null,
|