Browse Source

cardpanel标题优化

main
likunming 2 weeks ago
parent
commit
d5d36b3e0c
  1. 2
      io.sc.platform.core.frontend/src/platform/components/panel/WCardPanel.vue
  2. 8
      io.sc.platform.core.frontend/src/platform/components/splitter/WSplitter.vue

2
io.sc.platform.core.frontend/src/platform/components/panel/WCardPanel.vue

@ -7,7 +7,7 @@
<q-item-label header :style="headerStyleComputed">
<q-icon v-if="props.icon" :name="props.icon" size="sm" v-bind="props.iconAttrs" />
<span v-if="label" style="margin-left: 5px">{{ label }}</span>
<div v-else style="margin-left: 5px"><slot name="label"></slot></div>
<div v-else style="margin-left: 5px; width: 100%"><slot name="label"></slot></div>
</q-item-label>
</q-item-section>
</q-item>

8
io.sc.platform.core.frontend/src/platform/components/splitter/WSplitter.vue

@ -21,8 +21,8 @@
</template>
<script setup lang="ts">
import { ref, useAttrs, watch } from 'vue';
import { getCssVar } from 'quasar';
import { ref, useAttrs } from 'vue';
const attrs = useAttrs();
const props = defineProps({
@ -85,6 +85,12 @@ const props = defineProps({
});
const splitterModel = ref(props.size);
const lineColor = props.separatorColor || getCssVar('primary');
watch(
() => props.size,
(newVal, oldVal) => {
splitterModel.value = newVal;
},
);
</script>
<style lang="css">

Loading…
Cancel
Save