Skip to content

Commit

Permalink
fix: tiny-tooltip effect change to lgith
Browse files Browse the repository at this point in the history
1. 修复tiny-tooltip effect 为 dark 的样式问题
2. 修改所有 tiny-tooltip 的 effect 值为 light
  • Loading branch information
chilingling committed Jan 9, 2025
1 parent 3adbc19 commit 347a475
Show file tree
Hide file tree
Showing 30 changed files with 59 additions and 40 deletions.
2 changes: 1 addition & 1 deletion packages/common/component/ConfigItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
@update:modelValue="onModelUpdate"
>
<template #default>
<tiny-tooltip class="item" effect="dark" content="源码编辑" placement="left">
<tiny-tooltip class="item" effect="light" content="源码编辑" placement="left">
<icon-writing class="code-icon" @click="editorModalRef?.open && editorModalRef.open()"></icon-writing>
</tiny-tooltip>
</template>
Expand Down
2 changes: 1 addition & 1 deletion packages/common/component/MetaListActions.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template lang="">
<span v-for="(actionsItem, index) in actions" :key="index" class="actionsItem" @click="actionsEvents(actionsItem)">
<tiny-tooltip class="item" effect="dark" :content="actionsItem.title" placement="top">
<tiny-tooltip class="item" effect="light" :content="actionsItem.title" placement="top">
<component :is="actionsItem.icon"></component>
</tiny-tooltip>
</span>
Expand Down
11 changes: 9 additions & 2 deletions packages/common/component/MonacoEditor.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,21 @@
content="格式化"
placement="top"
:open-delay="OPEN_DELAY.Default"
effect="light"
>
<public-icon name="json" @click="formatCode"></public-icon>
</tiny-tooltip>
<span v-if="showFullScreenBtn">
<tiny-tooltip v-if="!fullscreen" content="全屏" placement="top" :open-delay="OPEN_DELAY.Default">
<tiny-tooltip
v-if="!fullscreen"
effect="light"
content="全屏"
placement="top"
:open-delay="OPEN_DELAY.Default"
>
<public-icon name="full-screen" @click="switchFullScreen(true)"></public-icon>
</tiny-tooltip>
<tiny-tooltip v-else content="退出全屏" placement="top" :open-delay="OPEN_DELAY.Default">
<tiny-tooltip v-else content="退出全屏" effect="light" placement="top" :open-delay="OPEN_DELAY.Default">
<public-icon name="cancel-full-screen" @click="switchFullScreen(false)"></public-icon>
</tiny-tooltip>
</span>
Expand Down
4 changes: 2 additions & 2 deletions packages/common/component/PluginBlockList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,12 @@
>
<div class="setting-menu" @mouseover.stop="handleSettingMouseOver" @mouseleave="handleBlockItemLeave">
<ul class="list">
<tiny-tooltip content="版本列表" placement="top">
<tiny-tooltip content="版本列表" placement="top" effect="light">
<li class="list-item" @click.stop="$emit('openVersionPanel', { item, index })">
<svg-button class="list-item-svg" name="versions"> </svg-button>
</li>
</tiny-tooltip>
<tiny-tooltip content="移除" placement="top">
<tiny-tooltip content="移除" placement="top" effect="light">
<li class="list-item" @click.stop="$emit('deleteBlock', item)">
<svg-button class="list-item-svg" name="remove"> </svg-button>
</li>
Expand Down
2 changes: 1 addition & 1 deletion packages/common/component/SvgButton.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<template>
<span class="svg-button" :class="{ 'svg-button-hover': hoverBgColor }" @click="$emit('click', $event)">
<tiny-tooltip effect="dark" :content="tips" :placement="placement">
<tiny-tooltip effect="light" :content="tips" :placement="placement">
<component :is="name" v-if="isTinyIcon" />
<svg-icon v-else :name="name"></svg-icon>
</tiny-tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<tiny-select v-model="selected" placeholder="请选择" @change="sourceChange">
<tiny-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"> </tiny-option>
</tiny-select>
<tiny-tooltip class="item" effect="dark" content="刷新数据源" placement="top">
<tiny-tooltip class="item" effect="light" content="刷新数据源" placement="top">
<icon-common-refresh @click="refreshData"></icon-common-refresh>
</tiny-tooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</div>
</template>
<template #operate="{ data }">
<tiny-tooltip class="item" effect="dark" content="删除" placement="top">
<tiny-tooltip class="item" effect="light" content="删除" placement="top">
<span class="item-icon">
<icon-del @click="delChildren(data)"></icon-del>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</div>

<template #reference>
<tiny-tooltip class="item" effect="dark" content="新增原生属性" placement="top">
<tiny-tooltip class="item" effect="light" content="新增原生属性" placement="top">
<span class="icon-wrap"><IconPlus @click="addAttr"></IconPlus></span>
</tiny-tooltip>
</template>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,14 @@
:value="optionItem"
></tiny-option>
</tiny-select>
<tiny-tooltip v-else class="item" effect="dark" :content="item.tip || ''" placement="top" :disbaled="!item.tip">
<tiny-tooltip
v-else
class="item"
effect="light"
:content="item.tip || ''"
placement="top"
:disabled="!item.tip"
>
<tiny-input v-model="state.ipArray[index]" :disabled="item.disabled" @update:modelValue="ipChange">
</tiny-input>
</tiny-tooltip>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div v-for="(slot, index) in slotList" :key="slot.name" class="use-slot">
<div class="use-slot-item-name">
{{ slot.name }}
<tiny-tooltip effect="dark" :content="state.currentComponent?.content" placement="bottom" width="260">
<tiny-tooltip effect="light" :content="state.currentComponent?.content" placement="bottom" width="260">
<span class="item-icon">
<component :is="state.currentComponent?.icon"></component>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
:disabled="disabled"
:content="option.tip"
placement="top"
effect="light"
>
<label :class="['radio-button', { active: option.value === value }]">
<input v-model="picked" type="radio" name="radio-buttons" :value="option.value" @click="change" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
<tiny-tooltip
placement="top"
content="定时更新开启后,页面运行时将会定期请求远程数据源,实现数据定时更新。"
effect="light"
><span>定时更新:</span></tiny-tooltip
>
<tiny-switch v-model="state.isPoll"></tiny-switch>
Expand Down
2 changes: 1 addition & 1 deletion packages/layout/src/DesignSettings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
</tiny-tab-item>
</tiny-tabs>
<div v-if="layoutState.settings.render === 'style'" class="tabs-setting">
<tiny-tooltip effect="dark" :content="isCollapsed ? '展开' : '折叠'" placement="top" :visible-arrow="false">
<tiny-tooltip effect="light" :content="isCollapsed ? '展开' : '折叠'" placement="top" :visible-arrow="false">
<template #default> <svg-icon :name="settingIcon" @click="isCollapsed = !isCollapsed"></svg-icon> </template>
</tiny-tooltip>
</div>
Expand Down
4 changes: 2 additions & 2 deletions packages/plugins/block/src/BlockPropertyForm.vue
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,12 @@
</template>
<template #operate="{ data }">
<div class="operate-right-container">
<tiny-tooltip class="item" effect="dark" content="编辑" placement="top">
<tiny-tooltip class="item" effect="light" content="编辑" placement="top">
<span class="item-icon" @click.stop="handleEdit(data)">
<svg-icon name="to-edit"></svg-icon>
</span>
</tiny-tooltip>
<tiny-tooltip class="item" effect="dark" content="删除" placement="top">
<tiny-tooltip class="item" effect="light" content="删除" placement="top">
<span class="item-icon" @click="del(data)">
<svg-icon name="delete"></svg-icon>
</span>
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/i18n/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
<span class="icon">
<svg-icon name="to-edit" @click.stop="openEditor($event, data.row)"></svg-icon>
</span>
<tiny-tooltip class="item" effect="dark" placement="bottom" :open-delay="OPEN_DELAY.Default">
<tiny-tooltip class="item" effect="light" placement="bottom" :open-delay="OPEN_DELAY.Default">
<template #content>
<div>
复制键值(唯一标识)<br />
Expand Down
2 changes: 1 addition & 1 deletion packages/plugins/state/src/EditorI18nTool.vue
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</div>

<template #reference>
<tiny-tooltip content="插入国际化词条" placement="top" :open-delay="OPEN_DELAY.Default">
<tiny-tooltip content="插入国际化词条" effect="light" placement="top" :open-delay="OPEN_DELAY.Default">
<svg-icon name="internationalization" @click="openPopover"></svg-icon>
</tiny-tooltip>
</template>
Expand Down
4 changes: 2 additions & 2 deletions packages/settings/design/src/components/PropertyCanvas.vue
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@
<div class="title-wrap">
<h6>{{ titleProps.group.label?.zh_CN || '' }}</h6>
<div>
<tiny-tooltip class="option-tips" effect="dark" content="编辑分组信息" placement="top">
<tiny-tooltip class="option-tips" effect="light" content="编辑分组信息" placement="top">
<span class="item-icon">
<svg-icon name="to-edit" class="option-icon" @click.stop="handleEditGroup(titleProps.group)"></svg-icon>
</span>
</tiny-tooltip>
<tiny-tooltip class="option-tips" effect="dark" content="删除分组" placement="top">
<tiny-tooltip class="option-tips" effect="light" content="删除分组" placement="top">
<span class="item-icon">
<svg-icon
name="delete"
Expand Down
4 changes: 2 additions & 2 deletions packages/settings/design/src/components/SettingPanel.vue
Original file line number Diff line number Diff line change
Expand Up @@ -93,12 +93,12 @@
</div>
</template>
<template #operate="{ data }">
<tiny-tooltip class="item operate-tips-item" effect="dark" content="编辑" placement="top">
<tiny-tooltip class="item operate-tips-item" effect="light" content="编辑" placement="top">
<span class="item-icon">
<svg-icon name="to-edit" @click.stop="handleEdit(data)"></svg-icon>
</span>
</tiny-tooltip>
<tiny-tooltip class="item operate-tips-item" effect="dark" content="删除" placement="top">
<tiny-tooltip class="item operate-tips-item" effect="light" content="删除" placement="top">
<span class="item-icon">
<svg-icon name="delete" @click.stop="handleDelete(data)"></svg-icon>
</span>
Expand Down
2 changes: 1 addition & 1 deletion packages/settings/events/src/components/AdvanceConfig.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
<div class="advnce-config">
<label class="text-ellipsis-multiple">key</label>
<div class="advanced-config-form-item">
<tiny-tooltip content="建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存">
<tiny-tooltip content="建议填写循环项中的唯一值(如item.id),如果填写为数字将不保存" effect="light">
<input-configurator
v-model="state.loopKey"
:placeholder="`默认为索引名:${getIndexName()}`"
Expand Down
4 changes: 2 additions & 2 deletions packages/settings/props/src/components/groups/LifeCycle.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@
<ul class="bind-life-cycle-list">
<li v-for="(value, name, index) in state.bindLifeCycles" :key="index" class="life-cycle-item">
<div>
<tiny-tooltip class="item" effect="dark" content="编辑" placement="top">
<tiny-tooltip class="item" effect="light" content="编辑" placement="top">
<icon-setting class="icon" @click="openDialog(name)"></icon-setting>
</tiny-tooltip>
<tiny-tooltip class="item" effect="dark" content="删除" placement="top">
<tiny-tooltip class="item" effect="light" content="删除" placement="top">
<icon-del class="icon" @click="confirmClick(name)"></icon-del>
</tiny-tooltip>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
>
<span>背景图 & 渐变</span>
</label>
<tiny-tooltip effect="dark" placement="top" content="添加背景图,线性渐变,径向渐变等">
<tiny-tooltip effect="light" placement="top" content="添加背景图,线性渐变,径向渐变等">
<div class="background-image-icon" @click="openBackgroundImageModal($event, { isAdd: true })">
<icon-plus></icon-plus>
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ export default {
},
effect: {
type: String,
default: 'dark'
default: 'light'
},
placement: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
<template>
<ul>
<tiny-tooltip v-for="(item, index) in props.options" :key="index" :content="item.tip" placement="top">
<tiny-tooltip
v-for="(item, index) in props.options"
:key="index"
:content="item.tip"
placement="top"
effect="light"
>
<li :data-active="item.value === value ? '' : undefined" @click="handleClick(item.value)">
<span v-if="item.icon" class="icon-wrap">
<svg-icon v-if="item.icon" :name="item.icon"></svg-icon>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
:options="outlineOptions"
:modelValue="state.activedType"
label-width="52"
effect="dark"
effect="light"
placement="top"
@update:modelValue="selectOutlineStyle"
></tabs-group-configurator>
Expand Down
6 changes: 3 additions & 3 deletions packages/settings/styles/src/components/layout/GridBox.vue
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
@change="denseChange"
/>
<label for="dense">Dense</label>
<tiny-tooltip :open-delay="500" content="dense 表示尽可能紧密填满,尽量不出现空格">
<tiny-tooltip :open-delay="500" content="dense 表示尽可能紧密填满,尽量不出现空格" effect="light">
<icon-help-solid></icon-help-solid>
</tiny-tooltip>
</div>
Expand All @@ -81,12 +81,12 @@
<span class="text">{{ data.text }}</span>
</template>
<template #operate="{ data }">
<tiny-tooltip class="item" effect="dark" :open-delay="500" content="复制" placement="top">
<tiny-tooltip class="item" effect="light" :open-delay="500" content="复制" placement="top">
<span class="item-icon">
<icon-copy @click="copyItem(item.list, data)"></icon-copy>
</span>
</tiny-tooltip>
<tiny-tooltip class="item" effect="dark" :open-delay="500" content="删除" placement="top">
<tiny-tooltip class="item" effect="light" :open-delay="500" content="删除" placement="top">
<span class="item-icon">
<icon-del @click="deleteItem(item.list, data)"></icon-del>
</span>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<tiny-tooltip
v-for="(item, index) in positionOptions"
:key="index"
effect="dark"
effect="light"
placement="top"
:open-delay="500"
:content="item.tip"
Expand Down
2 changes: 1 addition & 1 deletion packages/settings/styles/src/components/size/SizeGroup.vue
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ export default {
},
effect: {
type: String,
default: 'dark'
default: 'light'
},
placement: {
type: String,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ export default {
},
effect: {
type: String,
default: 'dark'
default: 'light'
},
placement: {
type: String,
Expand Down
5 changes: 1 addition & 4 deletions packages/theme/base/src/component-common.less
Original file line number Diff line number Diff line change
Expand Up @@ -692,10 +692,7 @@
// 17、tooltip文字提示
.tiny-tooltip.tiny-tooltip {
&.tiny-tooltip__popper {
background: var(--te-common-bg-popover);
color: var(--te-common-text-primary);
box-shadow: 0 -2px 12px 0 var(--te-base-box-shadow-rgba-2);
&[class*='is-'] {
&[class*='is-light'] {
background: var(--te-common-bg-popover);
color: var(--te-common-text-primary);
font-size: var(--te-base-font-size-base);
Expand Down
4 changes: 2 additions & 2 deletions packages/toolbars/logo/src/Main.vue
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
</tiny-switch>
<tiny-tooltip
class="item"
effect="dark"
effect="light"
content="分支不存在的时候创建分支。若不开启,分支不存在时发布应用会失败。"
placement="top"
popper-class="help-tooltip"
Expand All @@ -76,7 +76,7 @@
</tiny-switch>
<tiny-tooltip
class="item"
effect="dark"
effect="light"
content="是否生成工程默认配置,如package.json等文件。如选择为否,只生成页面对应代码,不生成配置文件。"
placement="top"
popper-class="help-tooltip"
Expand Down

0 comments on commit 347a475

Please sign in to comment.