diff --git a/src/App.vue b/src/App.vue index c930775..0e4e914 100644 --- a/src/App.vue +++ b/src/App.vue @@ -19,6 +19,13 @@ html, body, #app { height: 100%; } +.pb-10 { + padding-bottom: 10px; +} +.mb-10{ + margin-bottom: 10px; +} + .components { background: #07193D; diff --git a/src/assets/main.css b/src/assets/main.css index 348d1f0..b529b8b 100644 --- a/src/assets/main.css +++ b/src/assets/main.css @@ -210,3 +210,36 @@ a, .green { .scrollTable tr:hover > .tableCell { background-color: rgba(255, 255, 255, .1) !important; } + +.AppSubTitle { + height: 48px; + padding: 8px 0 8px 38px; + margin-bottom: 24px; + box-sizing: border-box; + line-height: 32px; + background-image: url("http://10.0.97.209/img/kengee/kengee4.png"); + background-repeat: no-repeat; + background-size: 100% 100%; + color: #fff; + max-width: 400px; + display: flex; + align-items: center; + gap: 16px; + position: relative; +} + +.AppSubTitle span { + font-size: 12px; + color: #215A8E; +} + +.AppSubTitle > .right { + position: absolute; + right: -30px; + top: 50%; + transform: translateY(-50%); +} + +.AppSubTitle .el-select { + width: 120px; +} diff --git a/src/utils/inject.js b/src/utils/inject.js index 30fec5f..dc146ea 100644 --- a/src/utils/inject.js +++ b/src/utils/inject.js @@ -204,6 +204,40 @@ Vue.component("tableColumn", { return column }, }) +Vue.component("AppSubTitle", { + props: { + text: {default: "副标题"} + }, + data() { + return { + pinyinText: "" + } + }, + methods: { + async getPinyin(text) { + const wait = (t = 500) => new Promise(resolve => setTimeout(resolve, t)) + while (!window.pinyinPro) await wait() + const {pinyin} = window.pinyinPro + this.pinyinText = pinyin(text, {toneType: 'none'}).toUpperCase() + + } + }, + watch: { + text: { + immediate: true, + handler(v) { + v && this.getPinyin(v) + } + } + }, + render(h) { + return h('div', {class: 'AppSubTitle'}, [ + this.text, + h('span', this.pinyinText), + h('div', {class: 'right'}, this.$slots.right) + ]) + } +}) export default Promise.all([ diff --git a/src/views/AppKeyGoods.vue b/src/views/AppKeyGoods.vue index 4b44cee..d159070 100644 --- a/src/views/AppKeyGoods.vue +++ b/src/views/AppKeyGoods.vue @@ -1,6 +1,9 @@ - -