@weitutech/by-components 1.2.7 → 1.2.8
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 +301 -1
- package/lib/by-components.css +1 -1
- package/lib/by-components.umd.js +301 -1
- package/lib/by-components.umd.min.js +1 -1
- package/lib/index.css +1 -1
- package/package.json +1 -1
|
@@ -74291,7 +74291,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
74291
74291
|
ByPager: function() { return /* reexport */ pager; },
|
|
74292
74292
|
ByPopoverSelector: function() { return /* reexport */ ByPopoverSelector; },
|
|
74293
74293
|
BySelect: function() { return /* reexport */ comps_select; },
|
|
74294
|
+
ByTabPane: function() { return /* reexport */ ByTabPane; },
|
|
74294
74295
|
ByTable: function() { return /* reexport */ table; },
|
|
74296
|
+
ByTabs: function() { return /* reexport */ ByTabs; },
|
|
74295
74297
|
ByTag: function() { return /* reexport */ ByTag; },
|
|
74296
74298
|
ByThumbnailImage: function() { return /* reexport */ ByThumbnailImage; },
|
|
74297
74299
|
ByToolBar: function() { return /* reexport */ ByToolBar; },
|
|
@@ -102810,6 +102812,301 @@ var ByThumbnailImage_component = normalizeComponent(
|
|
|
102810
102812
|
)
|
|
102811
102813
|
|
|
102812
102814
|
/* harmony default export */ var ByThumbnailImage = (ByThumbnailImage_component.exports);
|
|
102815
|
+
;// ./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-tabs/ByTabs.vue?vue&type=template&id=0fbc4065&scoped=true
|
|
102816
|
+
var ByTabsvue_type_template_id_0fbc4065_scoped_true_render = function render() {
|
|
102817
|
+
var _vm = this,
|
|
102818
|
+
_c = _vm._self._c;
|
|
102819
|
+
return _c('div', {
|
|
102820
|
+
staticClass: "by-tabs-wrapper"
|
|
102821
|
+
}, [_c('el-tabs', _vm._g(_vm._b({
|
|
102822
|
+
ref: "tabs",
|
|
102823
|
+
staticClass: "by-tabs"
|
|
102824
|
+
}, 'el-tabs', _vm.$attrs, false), _vm.$listeners), [_vm._t("default")], 2)], 1);
|
|
102825
|
+
};
|
|
102826
|
+
var ByTabsvue_type_template_id_0fbc4065_scoped_true_staticRenderFns = [];
|
|
102827
|
+
|
|
102828
|
+
;// ./src/components/by-tabs/variantTabStyles.js
|
|
102829
|
+
|
|
102830
|
+
|
|
102831
|
+
|
|
102832
|
+
function escapeTabName(name) {
|
|
102833
|
+
const value = String(name);
|
|
102834
|
+
if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {
|
|
102835
|
+
return CSS.escape(value);
|
|
102836
|
+
}
|
|
102837
|
+
return value.replace(/[^a-zA-Z0-9_-]/g, '\\$&');
|
|
102838
|
+
}
|
|
102839
|
+
function buildSelector(names, suffix = '') {
|
|
102840
|
+
return names.map(name => `.by-tabs .el-tabs__item#tab-${escapeTabName(name)}${suffix}`).join(',\n');
|
|
102841
|
+
}
|
|
102842
|
+
function buildVariantTabStyles(paneVariants = {}) {
|
|
102843
|
+
const subtleNames = Object.entries(paneVariants).filter(([, variant]) => variant === 'subtle').map(([name]) => name);
|
|
102844
|
+
if (!subtleNames.length) return '';
|
|
102845
|
+
const base = buildSelector(subtleNames);
|
|
102846
|
+
const hover = buildSelector(subtleNames, ':hover');
|
|
102847
|
+
const active = buildSelector(subtleNames, '.is-active');
|
|
102848
|
+
return `
|
|
102849
|
+
${base} {
|
|
102850
|
+
height: 30px;
|
|
102851
|
+
line-height: 28px;
|
|
102852
|
+
padding: 0 12px;
|
|
102853
|
+
margin-bottom: 0;
|
|
102854
|
+
font-size: 13px;
|
|
102855
|
+
font-weight: 600;
|
|
102856
|
+
color: #93939a;
|
|
102857
|
+
border-radius: 14px 14px 0 0;
|
|
102858
|
+
border-color: #e2e6ed;
|
|
102859
|
+
background: linear-gradient(180deg, #f8f9fb 0%, #f0f2f6 100%);
|
|
102860
|
+
}
|
|
102861
|
+
${hover} {
|
|
102862
|
+
color: #7babdb;
|
|
102863
|
+
border-color: #c5daf3;
|
|
102864
|
+
background: linear-gradient(180deg, #f5f9ff 0%, #eaf3ff 100%);
|
|
102865
|
+
}
|
|
102866
|
+
${active} {
|
|
102867
|
+
color: #409eff;
|
|
102868
|
+
border-color: #c6ddf5;
|
|
102869
|
+
border-bottom-color: #fff;
|
|
102870
|
+
background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
|
|
102871
|
+
margin-bottom: -1px;
|
|
102872
|
+
z-index: 2;
|
|
102873
|
+
}
|
|
102874
|
+
`;
|
|
102875
|
+
}
|
|
102876
|
+
;// ./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-tabs/ByTabs.vue?vue&type=script&lang=js
|
|
102877
|
+
|
|
102878
|
+
/* harmony default export */ var ByTabsvue_type_script_lang_js = ({
|
|
102879
|
+
name: 'ByTabs',
|
|
102880
|
+
provide() {
|
|
102881
|
+
return {
|
|
102882
|
+
byTabsRegisterPane: this.registerPane
|
|
102883
|
+
};
|
|
102884
|
+
},
|
|
102885
|
+
data() {
|
|
102886
|
+
return {
|
|
102887
|
+
paneVariants: {},
|
|
102888
|
+
variantStyleEl: null
|
|
102889
|
+
};
|
|
102890
|
+
},
|
|
102891
|
+
computed: {
|
|
102892
|
+
variantStyle() {
|
|
102893
|
+
return buildVariantTabStyles(this.paneVariants);
|
|
102894
|
+
}
|
|
102895
|
+
},
|
|
102896
|
+
watch: {
|
|
102897
|
+
variantStyle(style) {
|
|
102898
|
+
this.updateVariantStyle(style);
|
|
102899
|
+
}
|
|
102900
|
+
},
|
|
102901
|
+
mounted() {
|
|
102902
|
+
this.variantStyleEl = document.createElement('style');
|
|
102903
|
+
this.variantStyleEl.setAttribute('data-by-tabs-variant', '');
|
|
102904
|
+
document.head.appendChild(this.variantStyleEl);
|
|
102905
|
+
this.updateVariantStyle(this.variantStyle);
|
|
102906
|
+
},
|
|
102907
|
+
beforeDestroy() {
|
|
102908
|
+
if (this.variantStyleEl && this.variantStyleEl.parentNode) {
|
|
102909
|
+
this.variantStyleEl.parentNode.removeChild(this.variantStyleEl);
|
|
102910
|
+
}
|
|
102911
|
+
this.variantStyleEl = null;
|
|
102912
|
+
},
|
|
102913
|
+
methods: {
|
|
102914
|
+
registerPane(name, variant, register) {
|
|
102915
|
+
if (!name) return;
|
|
102916
|
+
const normalizedVariant = variant || 'default';
|
|
102917
|
+
if (register) {
|
|
102918
|
+
if (this.paneVariants[name] === normalizedVariant) return;
|
|
102919
|
+
this.$set(this.paneVariants, name, normalizedVariant);
|
|
102920
|
+
return;
|
|
102921
|
+
}
|
|
102922
|
+
if (!Object.prototype.hasOwnProperty.call(this.paneVariants, name)) return;
|
|
102923
|
+
this.$delete(this.paneVariants, name);
|
|
102924
|
+
},
|
|
102925
|
+
updateVariantStyle(style) {
|
|
102926
|
+
if (!this.variantStyleEl) return;
|
|
102927
|
+
this.variantStyleEl.textContent = style || '';
|
|
102928
|
+
}
|
|
102929
|
+
}
|
|
102930
|
+
});
|
|
102931
|
+
;// ./src/components/by-tabs/ByTabs.vue?vue&type=script&lang=js
|
|
102932
|
+
/* harmony default export */ var by_tabs_ByTabsvue_type_script_lang_js = (ByTabsvue_type_script_lang_js);
|
|
102933
|
+
;// ./node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-12.use[0]!./node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-12.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-12.use[2]!./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-tabs/ByTabs.vue?vue&type=style&index=0&id=0fbc4065&prod&scoped=true&lang=css
|
|
102934
|
+
// extracted by mini-css-extract-plugin
|
|
102935
|
+
|
|
102936
|
+
;// ./src/components/by-tabs/ByTabs.vue?vue&type=style&index=0&id=0fbc4065&prod&scoped=true&lang=css
|
|
102937
|
+
|
|
102938
|
+
;// ./src/components/by-tabs/ByTabs.vue
|
|
102939
|
+
|
|
102940
|
+
|
|
102941
|
+
|
|
102942
|
+
;
|
|
102943
|
+
|
|
102944
|
+
|
|
102945
|
+
/* normalize component */
|
|
102946
|
+
|
|
102947
|
+
var ByTabs_component = normalizeComponent(
|
|
102948
|
+
by_tabs_ByTabsvue_type_script_lang_js,
|
|
102949
|
+
ByTabsvue_type_template_id_0fbc4065_scoped_true_render,
|
|
102950
|
+
ByTabsvue_type_template_id_0fbc4065_scoped_true_staticRenderFns,
|
|
102951
|
+
false,
|
|
102952
|
+
null,
|
|
102953
|
+
"0fbc4065",
|
|
102954
|
+
null
|
|
102955
|
+
|
|
102956
|
+
)
|
|
102957
|
+
|
|
102958
|
+
/* harmony default export */ var ByTabs = (ByTabs_component.exports);
|
|
102959
|
+
;// ./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!./node_modules/element-ui/packages/tabs/src/tab-pane.vue?vue&type=template&id=702b58b3
|
|
102960
|
+
var tab_panevue_type_template_id_702b58b3_render = function render() {
|
|
102961
|
+
var _vm = this,
|
|
102962
|
+
_c = _vm._self._c;
|
|
102963
|
+
return !_vm.lazy || _vm.loaded || _vm.active ? _c('div', {
|
|
102964
|
+
directives: [{
|
|
102965
|
+
name: "show",
|
|
102966
|
+
rawName: "v-show",
|
|
102967
|
+
value: _vm.active,
|
|
102968
|
+
expression: "active"
|
|
102969
|
+
}],
|
|
102970
|
+
staticClass: "el-tab-pane",
|
|
102971
|
+
attrs: {
|
|
102972
|
+
"role": "tabpanel",
|
|
102973
|
+
"aria-hidden": !_vm.active,
|
|
102974
|
+
"id": `pane-${_vm.paneName}`,
|
|
102975
|
+
"aria-labelledby": `tab-${_vm.paneName}`
|
|
102976
|
+
}
|
|
102977
|
+
}, [_vm._t("default")], 2) : _vm._e();
|
|
102978
|
+
};
|
|
102979
|
+
var tab_panevue_type_template_id_702b58b3_staticRenderFns = [];
|
|
102980
|
+
|
|
102981
|
+
;// ./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!./node_modules/element-ui/packages/tabs/src/tab-pane.vue?vue&type=script&lang=js
|
|
102982
|
+
/* harmony default export */ var tab_panevue_type_script_lang_js = ({
|
|
102983
|
+
name: 'ElTabPane',
|
|
102984
|
+
componentName: 'ElTabPane',
|
|
102985
|
+
props: {
|
|
102986
|
+
label: String,
|
|
102987
|
+
labelContent: Function,
|
|
102988
|
+
name: String,
|
|
102989
|
+
closable: Boolean,
|
|
102990
|
+
disabled: Boolean,
|
|
102991
|
+
lazy: Boolean
|
|
102992
|
+
},
|
|
102993
|
+
data() {
|
|
102994
|
+
return {
|
|
102995
|
+
index: null,
|
|
102996
|
+
loaded: false
|
|
102997
|
+
};
|
|
102998
|
+
},
|
|
102999
|
+
computed: {
|
|
103000
|
+
isClosable() {
|
|
103001
|
+
return this.closable || this.$parent.closable;
|
|
103002
|
+
},
|
|
103003
|
+
active() {
|
|
103004
|
+
const active = this.$parent.currentName === (this.name || this.index);
|
|
103005
|
+
if (active) {
|
|
103006
|
+
this.loaded = true;
|
|
103007
|
+
}
|
|
103008
|
+
return active;
|
|
103009
|
+
},
|
|
103010
|
+
paneName() {
|
|
103011
|
+
return this.name || this.index;
|
|
103012
|
+
}
|
|
103013
|
+
},
|
|
103014
|
+
updated() {
|
|
103015
|
+
this.$parent.$emit('tab-nav-update');
|
|
103016
|
+
}
|
|
103017
|
+
});
|
|
103018
|
+
;// ./node_modules/element-ui/packages/tabs/src/tab-pane.vue?vue&type=script&lang=js
|
|
103019
|
+
/* harmony default export */ var src_tab_panevue_type_script_lang_js = (tab_panevue_type_script_lang_js);
|
|
103020
|
+
;// ./node_modules/element-ui/packages/tabs/src/tab-pane.vue
|
|
103021
|
+
|
|
103022
|
+
|
|
103023
|
+
|
|
103024
|
+
|
|
103025
|
+
|
|
103026
|
+
/* normalize component */
|
|
103027
|
+
;
|
|
103028
|
+
var tab_pane_component = normalizeComponent(
|
|
103029
|
+
src_tab_panevue_type_script_lang_js,
|
|
103030
|
+
tab_panevue_type_template_id_702b58b3_render,
|
|
103031
|
+
tab_panevue_type_template_id_702b58b3_staticRenderFns,
|
|
103032
|
+
false,
|
|
103033
|
+
null,
|
|
103034
|
+
null,
|
|
103035
|
+
null
|
|
103036
|
+
|
|
103037
|
+
)
|
|
103038
|
+
|
|
103039
|
+
/* harmony default export */ var tab_pane = (tab_pane_component.exports);
|
|
103040
|
+
;// ./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-tabs/ByTabPane.vue?vue&type=script&lang=js
|
|
103041
|
+
|
|
103042
|
+
const VARIANTS = ['default', 'subtle'];
|
|
103043
|
+
/* harmony default export */ var ByTabPanevue_type_script_lang_js = ({
|
|
103044
|
+
extends: tab_pane,
|
|
103045
|
+
name: 'ElTabPane',
|
|
103046
|
+
componentName: 'ElTabPane',
|
|
103047
|
+
inject: {
|
|
103048
|
+
byTabsRegisterPane: {
|
|
103049
|
+
default: null
|
|
103050
|
+
}
|
|
103051
|
+
},
|
|
103052
|
+
props: {
|
|
103053
|
+
/**
|
|
103054
|
+
* Tab 样式变体。default 为常规样式;subtle 为次要 tab(如项目 tab)的置灰样式
|
|
103055
|
+
*/
|
|
103056
|
+
variant: {
|
|
103057
|
+
type: String,
|
|
103058
|
+
default: 'default',
|
|
103059
|
+
validator: value => VARIANTS.includes(value)
|
|
103060
|
+
}
|
|
103061
|
+
},
|
|
103062
|
+
watch: {
|
|
103063
|
+
paneName() {
|
|
103064
|
+
this.syncPaneRegistration();
|
|
103065
|
+
},
|
|
103066
|
+
variant() {
|
|
103067
|
+
this.syncPaneRegistration();
|
|
103068
|
+
}
|
|
103069
|
+
},
|
|
103070
|
+
mounted() {
|
|
103071
|
+
this.syncPaneRegistration(true);
|
|
103072
|
+
},
|
|
103073
|
+
beforeDestroy() {
|
|
103074
|
+
this.syncPaneRegistration(false);
|
|
103075
|
+
},
|
|
103076
|
+
methods: {
|
|
103077
|
+
syncPaneRegistration(register = true) {
|
|
103078
|
+
if (!this.byTabsRegisterPane) return;
|
|
103079
|
+
const name = this.paneName;
|
|
103080
|
+
if (name === null || name === undefined || name === '') return;
|
|
103081
|
+
this.byTabsRegisterPane(String(name), this.variant, register);
|
|
103082
|
+
}
|
|
103083
|
+
}
|
|
103084
|
+
});
|
|
103085
|
+
;// ./src/components/by-tabs/ByTabPane.vue?vue&type=script&lang=js
|
|
103086
|
+
/* harmony default export */ var by_tabs_ByTabPanevue_type_script_lang_js = (ByTabPanevue_type_script_lang_js);
|
|
103087
|
+
;// ./src/components/by-tabs/ByTabPane.vue
|
|
103088
|
+
var ByTabPane_render, ByTabPane_staticRenderFns
|
|
103089
|
+
;
|
|
103090
|
+
|
|
103091
|
+
|
|
103092
|
+
|
|
103093
|
+
/* normalize component */
|
|
103094
|
+
;
|
|
103095
|
+
var ByTabPane_component = normalizeComponent(
|
|
103096
|
+
by_tabs_ByTabPanevue_type_script_lang_js,
|
|
103097
|
+
ByTabPane_render,
|
|
103098
|
+
ByTabPane_staticRenderFns,
|
|
103099
|
+
false,
|
|
103100
|
+
null,
|
|
103101
|
+
null,
|
|
103102
|
+
null
|
|
103103
|
+
|
|
103104
|
+
)
|
|
103105
|
+
|
|
103106
|
+
/* harmony default export */ var ByTabPane = (ByTabPane_component.exports);
|
|
103107
|
+
;// ./src/components/by-tabs/index.js
|
|
103108
|
+
|
|
103109
|
+
|
|
102813
103110
|
;// ./src/index.js
|
|
102814
103111
|
|
|
102815
103112
|
|
|
@@ -102839,6 +103136,7 @@ var ByThumbnailImage_component = normalizeComponent(
|
|
|
102839
103136
|
|
|
102840
103137
|
|
|
102841
103138
|
|
|
103139
|
+
|
|
102842
103140
|
|
|
102843
103141
|
|
|
102844
103142
|
const components = {
|
|
@@ -102864,7 +103162,9 @@ const components = {
|
|
|
102864
103162
|
ByTag: ByTag,
|
|
102865
103163
|
ByCardView: ByCardView,
|
|
102866
103164
|
ByCardSelector: ByCardSelector,
|
|
102867
|
-
ByThumbnailImage: ByThumbnailImage
|
|
103165
|
+
ByThumbnailImage: ByThumbnailImage,
|
|
103166
|
+
ByTabs: ByTabs,
|
|
103167
|
+
ByTabPane: ByTabPane
|
|
102868
103168
|
};
|
|
102869
103169
|
index_esm.setCurrent(99999);
|
|
102870
103170
|
const install = Vue => {
|
package/lib/by-components.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.b-form .header[data-v-1fc1d18e]{margin-bottom:20px}.b-form .footer[data-v-1fc1d18e]{margin-top:20px}
|
|
1
|
+
.b-form .header[data-v-1fc1d18e]{margin-bottom:20px}.b-form .footer[data-v-1fc1d18e]{margin-top:20px}.by-tabs-wrapper[data-v-0fbc4065]{width:100%}
|
package/lib/by-components.umd.js
CHANGED
|
@@ -74301,7 +74301,9 @@ __webpack_require__.d(__webpack_exports__, {
|
|
|
74301
74301
|
ByPager: function() { return /* reexport */ pager; },
|
|
74302
74302
|
ByPopoverSelector: function() { return /* reexport */ ByPopoverSelector; },
|
|
74303
74303
|
BySelect: function() { return /* reexport */ comps_select; },
|
|
74304
|
+
ByTabPane: function() { return /* reexport */ ByTabPane; },
|
|
74304
74305
|
ByTable: function() { return /* reexport */ table; },
|
|
74306
|
+
ByTabs: function() { return /* reexport */ ByTabs; },
|
|
74305
74307
|
ByTag: function() { return /* reexport */ ByTag; },
|
|
74306
74308
|
ByThumbnailImage: function() { return /* reexport */ ByThumbnailImage; },
|
|
74307
74309
|
ByToolBar: function() { return /* reexport */ ByToolBar; },
|
|
@@ -102820,6 +102822,301 @@ var ByThumbnailImage_component = normalizeComponent(
|
|
|
102820
102822
|
)
|
|
102821
102823
|
|
|
102822
102824
|
/* harmony default export */ var ByThumbnailImage = (ByThumbnailImage_component.exports);
|
|
102825
|
+
;// ./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-tabs/ByTabs.vue?vue&type=template&id=0fbc4065&scoped=true
|
|
102826
|
+
var ByTabsvue_type_template_id_0fbc4065_scoped_true_render = function render() {
|
|
102827
|
+
var _vm = this,
|
|
102828
|
+
_c = _vm._self._c;
|
|
102829
|
+
return _c('div', {
|
|
102830
|
+
staticClass: "by-tabs-wrapper"
|
|
102831
|
+
}, [_c('el-tabs', _vm._g(_vm._b({
|
|
102832
|
+
ref: "tabs",
|
|
102833
|
+
staticClass: "by-tabs"
|
|
102834
|
+
}, 'el-tabs', _vm.$attrs, false), _vm.$listeners), [_vm._t("default")], 2)], 1);
|
|
102835
|
+
};
|
|
102836
|
+
var ByTabsvue_type_template_id_0fbc4065_scoped_true_staticRenderFns = [];
|
|
102837
|
+
|
|
102838
|
+
;// ./src/components/by-tabs/variantTabStyles.js
|
|
102839
|
+
|
|
102840
|
+
|
|
102841
|
+
|
|
102842
|
+
function escapeTabName(name) {
|
|
102843
|
+
const value = String(name);
|
|
102844
|
+
if (typeof CSS !== 'undefined' && typeof CSS.escape === 'function') {
|
|
102845
|
+
return CSS.escape(value);
|
|
102846
|
+
}
|
|
102847
|
+
return value.replace(/[^a-zA-Z0-9_-]/g, '\\$&');
|
|
102848
|
+
}
|
|
102849
|
+
function buildSelector(names, suffix = '') {
|
|
102850
|
+
return names.map(name => `.by-tabs .el-tabs__item#tab-${escapeTabName(name)}${suffix}`).join(',\n');
|
|
102851
|
+
}
|
|
102852
|
+
function buildVariantTabStyles(paneVariants = {}) {
|
|
102853
|
+
const subtleNames = Object.entries(paneVariants).filter(([, variant]) => variant === 'subtle').map(([name]) => name);
|
|
102854
|
+
if (!subtleNames.length) return '';
|
|
102855
|
+
const base = buildSelector(subtleNames);
|
|
102856
|
+
const hover = buildSelector(subtleNames, ':hover');
|
|
102857
|
+
const active = buildSelector(subtleNames, '.is-active');
|
|
102858
|
+
return `
|
|
102859
|
+
${base} {
|
|
102860
|
+
height: 30px;
|
|
102861
|
+
line-height: 28px;
|
|
102862
|
+
padding: 0 12px;
|
|
102863
|
+
margin-bottom: 0;
|
|
102864
|
+
font-size: 13px;
|
|
102865
|
+
font-weight: 600;
|
|
102866
|
+
color: #93939a;
|
|
102867
|
+
border-radius: 14px 14px 0 0;
|
|
102868
|
+
border-color: #e2e6ed;
|
|
102869
|
+
background: linear-gradient(180deg, #f8f9fb 0%, #f0f2f6 100%);
|
|
102870
|
+
}
|
|
102871
|
+
${hover} {
|
|
102872
|
+
color: #7babdb;
|
|
102873
|
+
border-color: #c5daf3;
|
|
102874
|
+
background: linear-gradient(180deg, #f5f9ff 0%, #eaf3ff 100%);
|
|
102875
|
+
}
|
|
102876
|
+
${active} {
|
|
102877
|
+
color: #409eff;
|
|
102878
|
+
border-color: #c6ddf5;
|
|
102879
|
+
border-bottom-color: #fff;
|
|
102880
|
+
background: linear-gradient(180deg, #f0f7ff 0%, #ffffff 100%);
|
|
102881
|
+
margin-bottom: -1px;
|
|
102882
|
+
z-index: 2;
|
|
102883
|
+
}
|
|
102884
|
+
`;
|
|
102885
|
+
}
|
|
102886
|
+
;// ./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-tabs/ByTabs.vue?vue&type=script&lang=js
|
|
102887
|
+
|
|
102888
|
+
/* harmony default export */ var ByTabsvue_type_script_lang_js = ({
|
|
102889
|
+
name: 'ByTabs',
|
|
102890
|
+
provide() {
|
|
102891
|
+
return {
|
|
102892
|
+
byTabsRegisterPane: this.registerPane
|
|
102893
|
+
};
|
|
102894
|
+
},
|
|
102895
|
+
data() {
|
|
102896
|
+
return {
|
|
102897
|
+
paneVariants: {},
|
|
102898
|
+
variantStyleEl: null
|
|
102899
|
+
};
|
|
102900
|
+
},
|
|
102901
|
+
computed: {
|
|
102902
|
+
variantStyle() {
|
|
102903
|
+
return buildVariantTabStyles(this.paneVariants);
|
|
102904
|
+
}
|
|
102905
|
+
},
|
|
102906
|
+
watch: {
|
|
102907
|
+
variantStyle(style) {
|
|
102908
|
+
this.updateVariantStyle(style);
|
|
102909
|
+
}
|
|
102910
|
+
},
|
|
102911
|
+
mounted() {
|
|
102912
|
+
this.variantStyleEl = document.createElement('style');
|
|
102913
|
+
this.variantStyleEl.setAttribute('data-by-tabs-variant', '');
|
|
102914
|
+
document.head.appendChild(this.variantStyleEl);
|
|
102915
|
+
this.updateVariantStyle(this.variantStyle);
|
|
102916
|
+
},
|
|
102917
|
+
beforeDestroy() {
|
|
102918
|
+
if (this.variantStyleEl && this.variantStyleEl.parentNode) {
|
|
102919
|
+
this.variantStyleEl.parentNode.removeChild(this.variantStyleEl);
|
|
102920
|
+
}
|
|
102921
|
+
this.variantStyleEl = null;
|
|
102922
|
+
},
|
|
102923
|
+
methods: {
|
|
102924
|
+
registerPane(name, variant, register) {
|
|
102925
|
+
if (!name) return;
|
|
102926
|
+
const normalizedVariant = variant || 'default';
|
|
102927
|
+
if (register) {
|
|
102928
|
+
if (this.paneVariants[name] === normalizedVariant) return;
|
|
102929
|
+
this.$set(this.paneVariants, name, normalizedVariant);
|
|
102930
|
+
return;
|
|
102931
|
+
}
|
|
102932
|
+
if (!Object.prototype.hasOwnProperty.call(this.paneVariants, name)) return;
|
|
102933
|
+
this.$delete(this.paneVariants, name);
|
|
102934
|
+
},
|
|
102935
|
+
updateVariantStyle(style) {
|
|
102936
|
+
if (!this.variantStyleEl) return;
|
|
102937
|
+
this.variantStyleEl.textContent = style || '';
|
|
102938
|
+
}
|
|
102939
|
+
}
|
|
102940
|
+
});
|
|
102941
|
+
;// ./src/components/by-tabs/ByTabs.vue?vue&type=script&lang=js
|
|
102942
|
+
/* harmony default export */ var by_tabs_ByTabsvue_type_script_lang_js = (ByTabsvue_type_script_lang_js);
|
|
102943
|
+
;// ./node_modules/@vue/cli-service/node_modules/mini-css-extract-plugin/dist/loader.js??clonedRuleSet-54.use[0]!./node_modules/@vue/cli-service/node_modules/css-loader/dist/cjs.js??clonedRuleSet-54.use[1]!./node_modules/@vue/cli-service/node_modules/@vue/vue-loader-v15/lib/loaders/stylePostLoader.js!./node_modules/@vue/cli-service/node_modules/postcss-loader/dist/cjs.js??clonedRuleSet-54.use[2]!./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-tabs/ByTabs.vue?vue&type=style&index=0&id=0fbc4065&prod&scoped=true&lang=css
|
|
102944
|
+
// extracted by mini-css-extract-plugin
|
|
102945
|
+
|
|
102946
|
+
;// ./src/components/by-tabs/ByTabs.vue?vue&type=style&index=0&id=0fbc4065&prod&scoped=true&lang=css
|
|
102947
|
+
|
|
102948
|
+
;// ./src/components/by-tabs/ByTabs.vue
|
|
102949
|
+
|
|
102950
|
+
|
|
102951
|
+
|
|
102952
|
+
;
|
|
102953
|
+
|
|
102954
|
+
|
|
102955
|
+
/* normalize component */
|
|
102956
|
+
|
|
102957
|
+
var ByTabs_component = normalizeComponent(
|
|
102958
|
+
by_tabs_ByTabsvue_type_script_lang_js,
|
|
102959
|
+
ByTabsvue_type_template_id_0fbc4065_scoped_true_render,
|
|
102960
|
+
ByTabsvue_type_template_id_0fbc4065_scoped_true_staticRenderFns,
|
|
102961
|
+
false,
|
|
102962
|
+
null,
|
|
102963
|
+
"0fbc4065",
|
|
102964
|
+
null
|
|
102965
|
+
|
|
102966
|
+
)
|
|
102967
|
+
|
|
102968
|
+
/* harmony default export */ var ByTabs = (ByTabs_component.exports);
|
|
102969
|
+
;// ./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!./node_modules/element-ui/packages/tabs/src/tab-pane.vue?vue&type=template&id=702b58b3
|
|
102970
|
+
var tab_panevue_type_template_id_702b58b3_render = function render() {
|
|
102971
|
+
var _vm = this,
|
|
102972
|
+
_c = _vm._self._c;
|
|
102973
|
+
return !_vm.lazy || _vm.loaded || _vm.active ? _c('div', {
|
|
102974
|
+
directives: [{
|
|
102975
|
+
name: "show",
|
|
102976
|
+
rawName: "v-show",
|
|
102977
|
+
value: _vm.active,
|
|
102978
|
+
expression: "active"
|
|
102979
|
+
}],
|
|
102980
|
+
staticClass: "el-tab-pane",
|
|
102981
|
+
attrs: {
|
|
102982
|
+
"role": "tabpanel",
|
|
102983
|
+
"aria-hidden": !_vm.active,
|
|
102984
|
+
"id": `pane-${_vm.paneName}`,
|
|
102985
|
+
"aria-labelledby": `tab-${_vm.paneName}`
|
|
102986
|
+
}
|
|
102987
|
+
}, [_vm._t("default")], 2) : _vm._e();
|
|
102988
|
+
};
|
|
102989
|
+
var tab_panevue_type_template_id_702b58b3_staticRenderFns = [];
|
|
102990
|
+
|
|
102991
|
+
;// ./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!./node_modules/element-ui/packages/tabs/src/tab-pane.vue?vue&type=script&lang=js
|
|
102992
|
+
/* harmony default export */ var tab_panevue_type_script_lang_js = ({
|
|
102993
|
+
name: 'ElTabPane',
|
|
102994
|
+
componentName: 'ElTabPane',
|
|
102995
|
+
props: {
|
|
102996
|
+
label: String,
|
|
102997
|
+
labelContent: Function,
|
|
102998
|
+
name: String,
|
|
102999
|
+
closable: Boolean,
|
|
103000
|
+
disabled: Boolean,
|
|
103001
|
+
lazy: Boolean
|
|
103002
|
+
},
|
|
103003
|
+
data() {
|
|
103004
|
+
return {
|
|
103005
|
+
index: null,
|
|
103006
|
+
loaded: false
|
|
103007
|
+
};
|
|
103008
|
+
},
|
|
103009
|
+
computed: {
|
|
103010
|
+
isClosable() {
|
|
103011
|
+
return this.closable || this.$parent.closable;
|
|
103012
|
+
},
|
|
103013
|
+
active() {
|
|
103014
|
+
const active = this.$parent.currentName === (this.name || this.index);
|
|
103015
|
+
if (active) {
|
|
103016
|
+
this.loaded = true;
|
|
103017
|
+
}
|
|
103018
|
+
return active;
|
|
103019
|
+
},
|
|
103020
|
+
paneName() {
|
|
103021
|
+
return this.name || this.index;
|
|
103022
|
+
}
|
|
103023
|
+
},
|
|
103024
|
+
updated() {
|
|
103025
|
+
this.$parent.$emit('tab-nav-update');
|
|
103026
|
+
}
|
|
103027
|
+
});
|
|
103028
|
+
;// ./node_modules/element-ui/packages/tabs/src/tab-pane.vue?vue&type=script&lang=js
|
|
103029
|
+
/* harmony default export */ var src_tab_panevue_type_script_lang_js = (tab_panevue_type_script_lang_js);
|
|
103030
|
+
;// ./node_modules/element-ui/packages/tabs/src/tab-pane.vue
|
|
103031
|
+
|
|
103032
|
+
|
|
103033
|
+
|
|
103034
|
+
|
|
103035
|
+
|
|
103036
|
+
/* normalize component */
|
|
103037
|
+
;
|
|
103038
|
+
var tab_pane_component = normalizeComponent(
|
|
103039
|
+
src_tab_panevue_type_script_lang_js,
|
|
103040
|
+
tab_panevue_type_template_id_702b58b3_render,
|
|
103041
|
+
tab_panevue_type_template_id_702b58b3_staticRenderFns,
|
|
103042
|
+
false,
|
|
103043
|
+
null,
|
|
103044
|
+
null,
|
|
103045
|
+
null
|
|
103046
|
+
|
|
103047
|
+
)
|
|
103048
|
+
|
|
103049
|
+
/* harmony default export */ var tab_pane = (tab_pane_component.exports);
|
|
103050
|
+
;// ./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-tabs/ByTabPane.vue?vue&type=script&lang=js
|
|
103051
|
+
|
|
103052
|
+
const VARIANTS = ['default', 'subtle'];
|
|
103053
|
+
/* harmony default export */ var ByTabPanevue_type_script_lang_js = ({
|
|
103054
|
+
extends: tab_pane,
|
|
103055
|
+
name: 'ElTabPane',
|
|
103056
|
+
componentName: 'ElTabPane',
|
|
103057
|
+
inject: {
|
|
103058
|
+
byTabsRegisterPane: {
|
|
103059
|
+
default: null
|
|
103060
|
+
}
|
|
103061
|
+
},
|
|
103062
|
+
props: {
|
|
103063
|
+
/**
|
|
103064
|
+
* Tab 样式变体。default 为常规样式;subtle 为次要 tab(如项目 tab)的置灰样式
|
|
103065
|
+
*/
|
|
103066
|
+
variant: {
|
|
103067
|
+
type: String,
|
|
103068
|
+
default: 'default',
|
|
103069
|
+
validator: value => VARIANTS.includes(value)
|
|
103070
|
+
}
|
|
103071
|
+
},
|
|
103072
|
+
watch: {
|
|
103073
|
+
paneName() {
|
|
103074
|
+
this.syncPaneRegistration();
|
|
103075
|
+
},
|
|
103076
|
+
variant() {
|
|
103077
|
+
this.syncPaneRegistration();
|
|
103078
|
+
}
|
|
103079
|
+
},
|
|
103080
|
+
mounted() {
|
|
103081
|
+
this.syncPaneRegistration(true);
|
|
103082
|
+
},
|
|
103083
|
+
beforeDestroy() {
|
|
103084
|
+
this.syncPaneRegistration(false);
|
|
103085
|
+
},
|
|
103086
|
+
methods: {
|
|
103087
|
+
syncPaneRegistration(register = true) {
|
|
103088
|
+
if (!this.byTabsRegisterPane) return;
|
|
103089
|
+
const name = this.paneName;
|
|
103090
|
+
if (name === null || name === undefined || name === '') return;
|
|
103091
|
+
this.byTabsRegisterPane(String(name), this.variant, register);
|
|
103092
|
+
}
|
|
103093
|
+
}
|
|
103094
|
+
});
|
|
103095
|
+
;// ./src/components/by-tabs/ByTabPane.vue?vue&type=script&lang=js
|
|
103096
|
+
/* harmony default export */ var by_tabs_ByTabPanevue_type_script_lang_js = (ByTabPanevue_type_script_lang_js);
|
|
103097
|
+
;// ./src/components/by-tabs/ByTabPane.vue
|
|
103098
|
+
var ByTabPane_render, ByTabPane_staticRenderFns
|
|
103099
|
+
;
|
|
103100
|
+
|
|
103101
|
+
|
|
103102
|
+
|
|
103103
|
+
/* normalize component */
|
|
103104
|
+
;
|
|
103105
|
+
var ByTabPane_component = normalizeComponent(
|
|
103106
|
+
by_tabs_ByTabPanevue_type_script_lang_js,
|
|
103107
|
+
ByTabPane_render,
|
|
103108
|
+
ByTabPane_staticRenderFns,
|
|
103109
|
+
false,
|
|
103110
|
+
null,
|
|
103111
|
+
null,
|
|
103112
|
+
null
|
|
103113
|
+
|
|
103114
|
+
)
|
|
103115
|
+
|
|
103116
|
+
/* harmony default export */ var ByTabPane = (ByTabPane_component.exports);
|
|
103117
|
+
;// ./src/components/by-tabs/index.js
|
|
103118
|
+
|
|
103119
|
+
|
|
102823
103120
|
;// ./src/index.js
|
|
102824
103121
|
|
|
102825
103122
|
|
|
@@ -102849,6 +103146,7 @@ var ByThumbnailImage_component = normalizeComponent(
|
|
|
102849
103146
|
|
|
102850
103147
|
|
|
102851
103148
|
|
|
103149
|
+
|
|
102852
103150
|
|
|
102853
103151
|
|
|
102854
103152
|
const components = {
|
|
@@ -102874,7 +103172,9 @@ const components = {
|
|
|
102874
103172
|
ByTag: ByTag,
|
|
102875
103173
|
ByCardView: ByCardView,
|
|
102876
103174
|
ByCardSelector: ByCardSelector,
|
|
102877
|
-
ByThumbnailImage: ByThumbnailImage
|
|
103175
|
+
ByThumbnailImage: ByThumbnailImage,
|
|
103176
|
+
ByTabs: ByTabs,
|
|
103177
|
+
ByTabPane: ByTabPane
|
|
102878
103178
|
};
|
|
102879
103179
|
index_esm.setCurrent(99999);
|
|
102880
103180
|
const install = Vue => {
|