batch add article
This commit is contained in:
@@ -8,4 +8,8 @@ bug
|
||||
所有的图标hover时,有放大效果
|
||||
各种声音可以单独调节音量大小
|
||||
|
||||
列表加搜索
|
||||
列表加搜索
|
||||
|
||||
BaseIcon 在选中模式下,应该显示白色
|
||||
|
||||
添加文章时,正文输入123报错
|
||||
6
components.d.ts
vendored
6
components.d.ts
vendored
@@ -13,7 +13,6 @@ declare module 'vue' {
|
||||
Backgorund: typeof import('./src/components/Backgorund.vue')['default']
|
||||
BaseButton: typeof import('./src/components/BaseButton.vue')['default']
|
||||
BaseIcon: typeof import('./src/components/BaseIcon.vue')['default']
|
||||
Batch: typeof import('./src/components/Add/Batch.vue')['default']
|
||||
BatchAddArticle: typeof import('./src/components/Add/BatchAddArticle.vue')['default']
|
||||
ChapterDetail: typeof import('./src/components/ChapterDetail.vue')['default']
|
||||
ChapterList: typeof import('./src/components/ChapterList.vue')['default']
|
||||
@@ -21,20 +20,15 @@ declare module 'vue' {
|
||||
DictModal: typeof import('./src/components/Toolbar/DictModal.vue')['default']
|
||||
EditAbleText: typeof import('./src/components/EditAbleText.vue')['default']
|
||||
ElInput: typeof import('element-plus/es')['ElInput']
|
||||
ElInputNumber: typeof import('element-plus/es')['ElInputNumber']
|
||||
ElOption: typeof import('element-plus/es')['ElOption']
|
||||
ElProgress: typeof import('element-plus/es')['ElProgress']
|
||||
ElRadio: typeof import('element-plus/es')['ElRadio']
|
||||
ElRadioButton: typeof import('element-plus/es')['ElRadioButton']
|
||||
ElRadioGroup: typeof import('element-plus/es')['ElRadioGroup']
|
||||
ElSelect: typeof import('element-plus/es')['ElSelect']
|
||||
ElSlider: typeof import('element-plus/es')['ElSlider']
|
||||
ElSwitch: typeof import('element-plus/es')['ElSwitch']
|
||||
FeedbackModal: typeof import('./src/components/Toolbar/FeedbackModal.vue')['default']
|
||||
Fireworks: typeof import('./src/components/Fireworks.vue')['default']
|
||||
Footer: typeof import('./src/components/Practice/Footer.vue')['default']
|
||||
IconWrapper: typeof import('./src/components/IconWrapper.vue')['default']
|
||||
Import: typeof import('./src/components/Add/Import.vue')['default']
|
||||
MiniModal: typeof import('./src/components/MiniModal.vue')['default']
|
||||
Modal: typeof import('./src/components/Modal/Modal.vue')['default']
|
||||
PopConfirm: typeof import('./src/components/PopConfirm.vue')['default']
|
||||
|
||||
@@ -8,5 +8,95 @@
|
||||
"newWords": [],
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom"
|
||||
},
|
||||
{
|
||||
"title": "Planning a share portfolio",
|
||||
"titleTranslate": "规划股份投资",
|
||||
"text": "How does the older investor differ in his approach to investment from the younger investor?\nThere is no shortage of tipsters around offering 'get-rich-quick' opportunities. But if you are a serious private investor, leave the Las Vegas mentality to those with money to fritter. The serious investor needs a proper 'portfolio' -- a well-planned selection of investments, with a definite structure and a clear aim. But exactly how does a newcomer to the stock market go about achieving that?\nWell, if you go to five reputable stock brokers and ask them what you should do with your money, you're likely to get five different answers, -- even if you give all the relevant information about your age age, family, finances and what you want from your investments. Moral? There is no one 'right' way to structure a portfolio. However, there are undoubtedly some wrong ways, and you can be sure that none of our five advisers would have suggested sinking all (or perhaps any) of your money into Periwigs*.\nSo what should you do? We'll assume that you have sorted out the basics -- like mortgages, pensions, insurance and access to sufficient cash reserves. You should then establish your own individual aims. These are partly a matter of personal circumstances, partly a matter of psychology.\nFor instance, if you are older you have less time to recover from any major losses, and you may well wish to boost your pension income. So preserving your capital and generating extra income are your main priorities. In this case, you'd probably construct a portfolio with some shares (but not high risk ones), along with gilts, cash deposits, and perhaps convertibles or the income shares of split capital investment trusts.\nIf you are younger, and in a solid financial position, you may decide to take an aggressive approach -- but only if you're blessed with a sanguine disposition and won't suffer sleepless nights over share prices. If portfolio, alongside your more pedestrian in vestments. Once you have decided on your investment aims, you can then decide where to put your money. The golden rule here is spread your risk -- if you put all of your money into Periwigs International, you're setting yourself up as a hostage to fortune.\n*'Periwigs' is the name of a fictitious company.\nINVESTOR'S CHRONICLE, March 23 1990",
|
||||
"textCustomTranslate": "我们周围不乏情报贩子,向人们提供迅速发财致富的机遇。但是,如果你是一个认真的私人投资者,就把拉斯韦加斯的心态留给那些有钱可供挥霍的人。认真的投资者需要一份正规的投资组合表 -- 一种计划很周密的投资选择,包括你的投资结构和明确的目标。但是, 一个股票市场的新手又如何能做到这一点呢?\n如果你去向5位有威望的股票经纪人咨询,询问你应该如何使用你的资金,你可能得到5种不同的答复,即便你提供了有关于你的年龄、家庭、财源和你想从投资中获得好处的信息。这是个道德问题吗?没有一种完全“正确”的方法来排列这种投资组合,然而,却毫无疑问地有几种错误的方法。可以相信5位经纪人中不会有人建议你把全部(或一部份)资金投入佩里威格斯公司。\n那么你该怎么做呢?我们假定你已把基本情况弄清楚了,如抵押贷款、养老金、保险金和动用现金储备的机会。然后,你一定要建立起自己的目标。这里一方面是个所处的环境,另一方面是个心理学的问题。\n比如说,如果你年纪较大,你从重大投资损失中恢复过来的时间就较少,你就很希望能够提高你的养老金收入。因此,你的首要任务就是保护你的资金和引发额外的收入。在这种情况下,你大概想制定一份包括某些股份(但不是风险很大的股份)的投资组合,同时还有高度可靠的证券、现金储蓄,可能还有可换证券,或分割资本投资信托公司的所得股。\n如果你年轻一些,并且经济状况可靠,你可能会采取一种积极进取的方式 -- 你必须性格开朗,不会因股票价格的浮动而夜不能眠。如果你觉得你的情况是这样的话,你可在投资组合中包括几项有令人陶醉的增值前景的增长股,和其他比较平淡的投资项目放在一起。一旦你的投资组合中包括几项有令人陶醉的增值前景的增长股,和其他比较平淡的投资项目放在一起。一旦你的投资目标确立以后,你就可以决定你的钱投向何处。这里的指导原则是:分散你的投资风险。如果你把所有资金投入佩里威格斯国际公司,你就把自己当成了命运的人质。",
|
||||
"textNetworkTranslate": "",
|
||||
"newWords": [],
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom"
|
||||
},
|
||||
{
|
||||
"title": "Breakfast or lunch?",
|
||||
"titleTranslate": "早餐还是午餐?",
|
||||
"text": "It was Sunday. I never get up early on Sundays. I sometimes stay in bed until lunchtime. Last Sunday I got up very late. I looked out of the window. It was dark outside. 'What a day!' I thought. 'It's raining again.' Just then, the telephone rang. It was my aunt Lucy. 'I've just arrived by train,' she said. 'I'm coming to see you.'\n 'But I'm still having breakfast,' I said.\n 'What are you doing?' she asked.\n 'I'm having breakfast,' I repeated.\n 'Dear me,' she said. 'Do you always get up so late? It's one o'clock!'",
|
||||
"textCustomTranslate": "那是个星期天,而在星期天我是从来不早起的,有时我要一直躺到吃午饭的时候。上个星期天,我起得很晚。我望望窗外,外面一片昏暗。“鬼天气!”我想,“又下雨了。”正在这时,电话铃响了。是我姑母露西打来的。“我刚下火车,”她说,“我这就来看你。”\n “但我还在吃早饭,”我说。\n “你在干什么?”她问道。\n “我正在吃早饭,”我又说了一遍。\n “天啊,”她说,“你总是起得这么晚吗?现在已经1点钟了!”",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "Please send me a card",
|
||||
"titleTranslate": "请给我寄一张明信片",
|
||||
"text": "Postcards always spoil my holidays. Last summer, I went to Italy. I visited museums and sat in public gardens. A friendly waiter taught me a few words of Italian. Then he lent me a book. I read a few lines, but I did not understand a word. Everyday I thought about postcards. My holidays passed quickly, but I did not send cards to my friends. On the last day I made a big decision. I got up early and bought thirty-seven cards. I spent the whole day in my room, but I did not write a single card!",
|
||||
"textCustomTranslate": "明信片总搅得我假日不得安宁。去年夏天,我去了意大利。我参观了博物馆,还去了公园。一位好客的服务员教了我几句意大利语,之后还借给我一本书。我读了几行,但一个字也不懂。我每天都想着明信片的事。假期过得真快,可我还没有给我的朋友们寄过一张明信片。到了最后一天,我作出了一项重大决定。我早早起了床,买来了37张明信片。我在房间里关了整整一天。然而竟连一张明信片也没写成!",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "An exciting trip",
|
||||
"titleTranslate": "激动人心的旅行",
|
||||
"text": "I have just received a letter from my brother, Tim. He is in Australia. He has been there for six months. Tim is an engineer. He is working for a big firm and he has already visited a great number of different places in Australia. He has just bought an Australian car and has gone to Alice springs, a small town in the centre of Australia. He will soon visit Darwin. From there, he will fly to Perth. My brother has never been abroad before, so he is fending this trip very exciting.",
|
||||
"textCustomTranslate": "我刚刚收到弟弟蒂姆的来信,他正在澳大利亚。他在那儿已经住了6个月了。蒂姆是个工程师,正在一家大公司工作,并且已经去过澳大利亚的不少地方了。他刚买了一辆澳大利亚小汽车,现在去了澳大利亚中部的小镇艾利斯斯普林斯。他不久还将到达达尔文去,从那里,他再飞往珀斯。我弟弟以前从未出过国,因此,他觉得这次旅行非常激动人心。",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "No wrong numbers",
|
||||
"titleTranslate": "无错号之虞",
|
||||
"text": "Mr.James Scott has a garage in Silbury and now he has just bought another garage in Pinhurst. Pinhurst is only five miles from Silbury, but Mr. Scott cannot get a telephone for his new garage, so he has just bought twelve pigeons. Yesterday, a pigeon carried the first message from Pinhurst to Silbury. The bird covered the distance in three minutes. Up to now, Mr.Scott has sent a great many requests for spare parts and other urgent messages from one garage to the other. In this way, he has begun his own private 'telephone' service.",
|
||||
"textCustomTranslate": "詹姆斯.斯科特先生在锡尔伯里有一个汽车修理部,现在他刚在平赫斯特买了另一个汽车修理部。平赫特离锡尔伯里只有5英里,但詹姆斯.斯科特先生未能为他新的汽车修理部搞到一部电话机,所以他买了只鸽子。昨天,一只鸽子把第一封信从平赫特带到锡尔伯里。这只鸟只用了3分钟就飞完了全程。到目前为止,斯科特先生从一个汽车修理部向另一个发送了大量索取备件的信件和其他紧急函件。就这样,他开始自己的私人“电话”业务。",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "Percy Buttons",
|
||||
"titleTranslate": "珀西.巴顿斯",
|
||||
"text": "I have just moved to a house in Bridge Street. Yesterday a beggar knocked at my door. He asked me for a meal and a glass of beer. In return for this, the beggar stood on his head and sang songs. I gave him a meal. He ate the food and drank the beer. Then he put a piece of cheese in his pocket and went away. Later a neighbour told me about him. Everybody knows him. His name is Percy Buttons. He calls at every house in the street once a month and always asks for a meal and a glass of beer.",
|
||||
"textCustomTranslate": "我刚刚搬进了大桥街的一所房子。昨天一个乞丐来敲我的门,问我要一顿饭和一杯啤酒。作为回报,那乞丐头顶地倒立起来,嘴里还唱着歌。我给了他一顿饭。他把食物吃完,又喝了酒。然后把一块乳酪装进衣袋里走了。后来,一位邻居告诉了我他的情况。大家都认识他,他叫珀西.巴顿斯。他每月对这条街上的每户人家光顾一次,总是请求给他一顿饭和一杯啤酒。",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "Too late",
|
||||
"titleTranslate": "为时太晚",
|
||||
"text": "The plane was late and detectives were waiting at the airport all morning. They were expecting a valuable parcel of diamonds from South Africa. A few hours earlier, someone had told the police that thieves would try to steal the diamonds. When the plane arrived, some of the detectives were waiting inside the main building while others were waiting on the airfield. Two men took the parcel off the plane and carried it into the Customs House. While two detectives were keeping guard at the door, two others opened the parcel. To their surprise, the precious parcel was full of stones and sand!\n",
|
||||
"textCustomTranslate": "飞机误点了,侦探们在机场等了整整一上午。他们正期待从南非来的一个装着钻石的贵重包裹。数小时以前,有人向警方报告,说有人企图偷走这些钻石。当飞机到达时,一些侦探等候在主楼内,另一些侦探则守候在停机坪上。有两个人把包裹拿下飞机,进了海关。这时两个侦探把住门口,另外两个侦探打开了包裹。令他们吃惊的是,那珍贵的包裹里面装的全是石头和沙子!",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "The best and the worst",
|
||||
"titleTranslate": "最好的和最差的",
|
||||
"text": "Joe Sanders has the most beautiful garden in our town. Nearly everybody enters for 'The Nicest Garden Competition' each year, but Joe wins every time. Bill Frith's garden is larger than Joe's. Bill works harder than Joe and grows more flowers and vegetables, but Joe's garden is more interesting. He has made neat paths and has built a wooden bridge over a pool. I like gardens too, but I do not like hard work. Every year I enter for the garden competition too, and I always win a little prize for the worst garden in the town!\n",
|
||||
"textCustomTranslate": "乔.桑德斯拥有我们镇上最漂亮的花园。几乎每个人都参加每年举办的“最佳花园竞赛”,而每次都是乔获胜。比尔.弗里斯的花园比乔的花园大,他比乔也更为勤奋,种植的花卉和蔬菜也更多,但乔的花园更富有情趣。他修筑了一条条整洁的小路,并在一个池塘上架了一座小木桥。我也喜欢花园,但我却不愿意辛勤劳动。每年的花园竞赛我也参加,但总因是镇上最劣的花园而获得一个小奖! ",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
},
|
||||
{
|
||||
"title": "A cold welcome",
|
||||
"titleTranslate": "冷遇",
|
||||
"text": "On Wednesday evening, we went to the Town Hall. It was the last day of the year and a large crowd of people had gathered under the Town Hall clock. It would strike twelve in twenty minutes' time. Fifteen minutes passed and then, at five to twelve, the clock stopped. The big minute hand did not move. We waited and waited, but nothing happened. Suddenly someone shouted. 'It's two minutes past twelve! The clock has stopped!' I looked at my watch. It was true. The big clock refused to welcome the New Year. At that moment, everybody began to laugh and sing.\n",
|
||||
"textCustomTranslate": "星期三的晚上,我们去了市政厅。 那是一年的最后一天,一大群人聚集在市政厅的大钟下面。再过20分钟,大钟将敲响12下。15分钟过去了,而就在11点55分时,大钟停了。那根巨大的分针不动了。 我们等啊等啊,可情况没有变化。突然有人喊道:“已经12点零2分了!那钟已经停了!”我看了一下我的手表,果真如此。那座大钟不愿意迎接新年。此时,大家已经笑了起来,同时唱起了歌。",
|
||||
"textNetworkTranslate": "",
|
||||
"textCustomTranslateIsFormat": false,
|
||||
"useTranslateType": "custom",
|
||||
"newWords": []
|
||||
}
|
||||
]
|
||||
@@ -18,17 +18,19 @@ import {useDisableEventListener} from "@/hooks/event.ts";
|
||||
import {MessageBox} from "@/utils/MessageBox.tsx";
|
||||
import BaseIcon from "@/components/BaseIcon.vue";
|
||||
import {useBaseStore} from "@/stores/base.ts";
|
||||
import {$ref} from "vue/macros";
|
||||
|
||||
interface IProps {
|
||||
article?: Article
|
||||
selectIndex?: number
|
||||
}
|
||||
|
||||
const props = withDefaults(defineProps<IProps>(), {
|
||||
article: () => cloneDeep(DefaultArticle),
|
||||
selectIndex: -1
|
||||
})
|
||||
|
||||
const base = useBaseStore()
|
||||
let article = $ref<Article>(cloneDeep(props.article))
|
||||
let article = $ref<Article>(cloneDeep(DefaultArticle))
|
||||
let selectIndex = $ref<number>(props.selectIndex)
|
||||
let networkTranslateEngine = $ref('baidu')
|
||||
let progress = $ref(0)
|
||||
const TranslateEngineOptions = [
|
||||
@@ -66,7 +68,9 @@ watch(() => props.article, n => {
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
if (selectIndex > -1) {
|
||||
article = base.currentEditDict.articles[selectIndex]
|
||||
}
|
||||
})
|
||||
|
||||
async function startNetworkTranslate() {
|
||||
@@ -158,26 +162,49 @@ function onFocus() {
|
||||
document.addEventListener('paste', onPaste);
|
||||
}
|
||||
|
||||
function save() {
|
||||
function save(option: 'save' | 'next') {
|
||||
console.log('article', article)
|
||||
copy(JSON.stringify(article))
|
||||
|
||||
if (!article.title.trim()) {
|
||||
article.title = article.title.trim()
|
||||
article.titleTranslate = article.titleTranslate.trim()
|
||||
article.text = article.text.trim()
|
||||
article.textCustomTranslate = article.textCustomTranslate.trim()
|
||||
article.textNetworkTranslate = article.textNetworkTranslate.trim()
|
||||
|
||||
if (!article.title) {
|
||||
return ElMessage.error('请填写标题!')
|
||||
}
|
||||
if (!article.text.trim()) {
|
||||
if (!article.text) {
|
||||
return ElMessage.error('请填写正文!')
|
||||
}
|
||||
|
||||
let has = base.currentEditDict.articles.find((item: Article) => item.title === article.title)
|
||||
if (has && selectIndex === -1) {
|
||||
return ElMessage.error('已存在同名文章!')
|
||||
}
|
||||
|
||||
const saveTemp = () => {
|
||||
article.textCustomTranslateIsFormat = true
|
||||
// emit('close')
|
||||
// emit('save', cloneDeep(article))
|
||||
base.currentEditDict.articles.push(cloneDeep(article))
|
||||
if (selectIndex > -1) {
|
||||
base.currentEditDict.articles[selectIndex] = cloneDeep(article)
|
||||
} else {
|
||||
base.currentEditDict.articles.push(cloneDeep(article))
|
||||
if (option === 'save') {
|
||||
selectIndex = base.currentEditDict.articles.length - 1
|
||||
}
|
||||
}
|
||||
if (option === 'next') {
|
||||
selectIndex = -1
|
||||
article = cloneDeep(DefaultArticle)
|
||||
}
|
||||
ElMessage.success('保存成功!')
|
||||
}
|
||||
|
||||
if (article.useTranslateType === TranslateType.network) {
|
||||
if (!article.textNetworkTranslate.trim()) {
|
||||
if (!article.textNetworkTranslate) {
|
||||
return MessageBox.confirm(
|
||||
'您选择了“网络翻译”,但译文内容却为空白,是否修改为“不需要翻译”并保存?',
|
||||
'提示',
|
||||
@@ -191,7 +218,7 @@ function save() {
|
||||
}
|
||||
|
||||
if (article.useTranslateType === TranslateType.custom) {
|
||||
if (!article.textCustomTranslate.trim()) {
|
||||
if (!article.textCustomTranslate) {
|
||||
return MessageBox.confirm(
|
||||
'您选择了“本地翻译”,但译文内容却为空白,是否修改为“不需要翻译”并保存?',
|
||||
'提示',
|
||||
@@ -237,6 +264,26 @@ watch(() => article.useTranslateType, () => {
|
||||
}
|
||||
})
|
||||
|
||||
function selectArticle(index: number) {
|
||||
article = cloneDeep(base.currentEditDict.articles[index])
|
||||
selectIndex = index
|
||||
}
|
||||
|
||||
function delArticle(index: number) {
|
||||
if (index < selectIndex) {
|
||||
selectIndex--
|
||||
} else if (index === selectIndex) {
|
||||
if (selectIndex === base.currentEditDict.articles.length - 1) {
|
||||
selectIndex--
|
||||
}
|
||||
}
|
||||
base.currentEditDict.articles.splice(index, 1)
|
||||
if (selectIndex < 0) {
|
||||
article = cloneDeep(DefaultArticle)
|
||||
} else {
|
||||
article = cloneDeep(base.currentEditDict.articles[selectIndex])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -247,13 +294,23 @@ watch(() => article.useTranslateType, () => {
|
||||
<BaseIcon title="选择其他词典/文章" icon="carbon:change-catalog"/>
|
||||
</header>
|
||||
<div class="article-list">
|
||||
<div class="item" v-for="(item,index) in base.currentEditDict.articles">
|
||||
<div class="item"
|
||||
:class="[
|
||||
(selectIndex === index) && 'active'
|
||||
]"
|
||||
@click="selectArticle(index)"
|
||||
v-for="(item,index) in base.currentEditDict.articles">
|
||||
<div class="left">
|
||||
<div class="name"> {{ `${index + 1}. ${item.title}` }}</div>
|
||||
<div class="translate-name"> {{ ` ${item.titleTranslate}` }}</div>
|
||||
</div>
|
||||
<div class="right">
|
||||
<BaseIcon title="删除" icon="fluent:delete-24-regular"/>
|
||||
<BaseIcon
|
||||
@click="delArticle(index)"
|
||||
title="删除" icon="fluent:delete-24-regular"/>
|
||||
<BaseIcon
|
||||
@click="delArticle(index)"
|
||||
title="删除" icon="carbon:move"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -376,8 +433,9 @@ watch(() => article.useTranslateType, () => {
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="options">
|
||||
<BaseButton @click="save">保存</BaseButton>
|
||||
<div class="options" v-if="article.text.trim()">
|
||||
<BaseButton @click="save('save')">保存</BaseButton>
|
||||
<BaseButton @click="save('next')">保存并添加下一篇</BaseButton>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -432,8 +490,11 @@ watch(() => article.useTranslateType, () => {
|
||||
padding: 10rem;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
transition: all .3s;
|
||||
|
||||
.right {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
transition: all .3s;
|
||||
opacity: 0;
|
||||
}
|
||||
@@ -444,6 +505,11 @@ watch(() => article.useTranslateType, () => {
|
||||
}
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: var(--color-item-active);
|
||||
color: white;
|
||||
}
|
||||
|
||||
.name {
|
||||
font-size: 18rem;
|
||||
}
|
||||
@@ -548,6 +614,7 @@ watch(() => article.useTranslateType, () => {
|
||||
.options {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: $space;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,12 +8,14 @@ defineProps<{
|
||||
title: string,
|
||||
icon: string,
|
||||
}>()
|
||||
|
||||
defineEmits(['click'])
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<Tooltip :title="title">
|
||||
<IconWrapper>
|
||||
<Icon :icon="icon"/>
|
||||
<Icon @click.stop="$emit('click')" :icon="icon"/>
|
||||
</IconWrapper>
|
||||
</Tooltip>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user