Merge branch 'dev_vite' of ssh://18.167.251.121:10002/aidlab/aida_front into dev_vite
This commit is contained in:
@@ -1,12 +1,6 @@
|
|||||||
<<<<<<< HEAD
|
|
||||||
VITE_USER_NODE_ENV = 'development'
|
VITE_USER_NODE_ENV = 'development'
|
||||||
VITE_APP_BASE_URL = 'https://test.api.aida.com.hk'
|
VITE_APP_BASE_URL = 'https://test.api.aida.com.hk'
|
||||||
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
|
# VITE_APP_BASE_URL = 'https://api.aida.com.hk'
|
||||||
=======
|
|
||||||
NODE_ENV = 'development'
|
|
||||||
# VUE_APP_BASE_URL = 'https://api.aida.com.hk'
|
|
||||||
VUE_APP_BASE_URL = 'https://test.api.aida.com.hk'
|
|
||||||
>>>>>>> 5d8304ce3ece21dd3200ffffb0c76e3ef55dd213
|
|
||||||
|
|
||||||
# VITE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
# VITE_APP_BASE_URL = 'http://18.167.251.121:10086'
|
||||||
# VITE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
# VITE_APP_BASE_URL = 'http://192.168.1.9:5567'
|
||||||
|
|||||||
BIN
src/assets/images/icon/selected.png
Normal file
BIN
src/assets/images/icon/selected.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 582 B |
@@ -362,6 +362,11 @@ watch(
|
|||||||
setBrushSize(newSize);
|
setBrushSize(newSize);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
watch(()=>isVisible.value, (newVisible) => {
|
||||||
|
if (newVisible) {
|
||||||
|
setBrushSize(brushSize.value);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
||||||
// 监听brushOpacity的变化,更新到BrushStore
|
// 监听brushOpacity的变化,更新到BrushStore
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@@ -258,6 +258,23 @@ const setClosePanel = ()=>{
|
|||||||
closePanel.value = !closePanel.value
|
closePanel.value = !closePanel.value
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 工具管理器和画布管理器
|
||||||
|
const toolManager = inject("toolManager");
|
||||||
|
const canvasManager = inject("canvasManager");
|
||||||
|
|
||||||
|
watch(size, (newSize, oldSize) => {
|
||||||
|
setBrushIndicatorSize(newSize)
|
||||||
|
|
||||||
|
})
|
||||||
|
// 设置笔刷指示器大小
|
||||||
|
function setBrushIndicatorSize(size) {
|
||||||
|
// 如果工具管理器存在,立即应用此更改
|
||||||
|
console.log(`=========== ${size}`,toolManager);
|
||||||
|
if (toolManager) {
|
||||||
|
toolManager.updateBrushIndicatorSize(size);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 监听当前工具变化 - 参考 SelectionPanel 的实现方式
|
// 监听当前工具变化 - 参考 SelectionPanel 的实现方式
|
||||||
watch(
|
watch(
|
||||||
() => props.activeTool,
|
() => props.activeTool,
|
||||||
@@ -269,10 +286,11 @@ watch(
|
|||||||
// 如果面板未显示且有合适的目标对象,则显示面板
|
// 如果面板未显示且有合适的目标对象,则显示面板
|
||||||
if (!visible.value) {
|
if (!visible.value) {
|
||||||
visible.value = true;
|
visible.value = true;
|
||||||
closePanel.value = true
|
closePanel.value = true
|
||||||
// 检查是否有可液化的对象
|
// 检查是否有可液化的对象
|
||||||
checkAndShowPanel();
|
checkAndShowPanel();
|
||||||
}
|
}
|
||||||
|
setBrushIndicatorSize(size.value)
|
||||||
} else {
|
} else {
|
||||||
visible.value = false; // 切换到其他工具时隐藏面板
|
visible.value = false; // 切换到其他工具时隐藏面板
|
||||||
// 切换到其他工具,隐藏液化面板
|
// 切换到其他工具,隐藏液化面板
|
||||||
@@ -1634,24 +1652,26 @@ function stopPressTimer() {
|
|||||||
color: #333;
|
color: #333;
|
||||||
border: 1px solid rgba(0, 0, 0, 0.05);
|
border: 1px solid rgba(0, 0, 0, 0.05);
|
||||||
padding-bottom: 12px;
|
padding-bottom: 12px;
|
||||||
&.active{
|
&.active{
|
||||||
transform: translateY(100%);
|
transform: translateY(100%);
|
||||||
> .btn{
|
> .btn{
|
||||||
> i{
|
> i{
|
||||||
transform: rotate(90deg);
|
transform: rotate(90deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
> .btn{
|
> .btn{
|
||||||
width: 100%;
|
width: 100%;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
display: flex;
|
||||||
> i{
|
align-items: center;
|
||||||
font-size: 1.4rem;
|
justify-content: center;
|
||||||
display: block;
|
|
||||||
transform: rotate(270deg);
|
> i{
|
||||||
}
|
font-size: 1.4rem;
|
||||||
|
transform: rotate(270deg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
import { fabric } from "fabric-with-all";
|
import { fabric } from "fabric-with-all";
|
||||||
|
import { OperationType } from "../utils/layerHelper";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 笔刷指示器
|
* 笔刷指示器
|
||||||
@@ -94,6 +95,7 @@ export class BrushIndicator {
|
|||||||
* @private
|
* @private
|
||||||
*/
|
*/
|
||||||
_syncCanvasProperties() {
|
_syncCanvasProperties() {
|
||||||
|
console.log("==========","笔刷同步大小")
|
||||||
if (!this.staticCanvas || !this.canvas) return;
|
if (!this.staticCanvas || !this.canvas) return;
|
||||||
|
|
||||||
// 检查是否为笔刷或橡皮擦模式,非相关模式直接返回
|
// 检查是否为笔刷或橡皮擦模式,非相关模式直接返回
|
||||||
@@ -103,10 +105,8 @@ export class BrushIndicator {
|
|||||||
this.canvas.isDrawingMode &&
|
this.canvas.isDrawingMode &&
|
||||||
this.canvas.freeDrawingBrush &&
|
this.canvas.freeDrawingBrush &&
|
||||||
this.canvas.freeDrawingBrush.type === "eraser";
|
this.canvas.freeDrawingBrush.type === "eraser";
|
||||||
|
const isLiquifyMode = this.canvas.toolId === OperationType.LIQUIFY;// 检查是否在液化模式
|
||||||
if (!isBrushMode && !isEraserMode) {
|
if ([isBrushMode,isEraserMode,isLiquifyMode].every(v => !v)) return;
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
let hasChanges = false;
|
let hasChanges = false;
|
||||||
|
|
||||||
@@ -471,8 +471,12 @@ export class BrushIndicator {
|
|||||||
* @returns {Boolean} 是否显示
|
* @returns {Boolean} 是否显示
|
||||||
*/
|
*/
|
||||||
_shouldShowIndicator() {
|
_shouldShowIndicator() {
|
||||||
// 检查画布是否在绘图模式
|
const isDrawingMode = this.canvas.isDrawingMode;// 检查画布是否在绘图模式
|
||||||
if (!this.canvas.isDrawingMode) return false;
|
const isLiquifyMode = this.canvas.toolId === OperationType.LIQUIFY;// 检查是否在液化模式
|
||||||
|
|
||||||
|
// console.log(`笔刷指示器\n绘图模式:${isDrawingMode}\n液化模式:${isLiquifyMode}`)
|
||||||
|
// 检查画布是否在绘图模式OR液化模式
|
||||||
|
if ([isDrawingMode, isLiquifyMode].every(v => !v)) return false;
|
||||||
|
|
||||||
// 检查是否有笔刷
|
// 检查是否有笔刷
|
||||||
if (!this.canvas.freeDrawingBrush) return false;
|
if (!this.canvas.freeDrawingBrush) return false;
|
||||||
|
|||||||
@@ -373,6 +373,8 @@ export class ToolManager {
|
|||||||
// 设置工具特定的状态
|
// 设置工具特定的状态
|
||||||
const tool = this.tools[toolId];
|
const tool = this.tools[toolId];
|
||||||
if (tool && typeof tool.setup === "function") {
|
if (tool && typeof tool.setup === "function") {
|
||||||
|
console.log(`画布切换工具:${tool.name}(${toolId})`)
|
||||||
|
this.canvas.toolId = toolId;
|
||||||
tool.setup();
|
tool.setup();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -450,6 +452,7 @@ export class ToolManager {
|
|||||||
if (!this.canvas) return;
|
if (!this.canvas) return;
|
||||||
this.canvas.isDrawingMode = false;
|
this.canvas.isDrawingMode = false;
|
||||||
this.canvas.selection = true;
|
this.canvas.selection = true;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -750,6 +753,7 @@ export class ToolManager {
|
|||||||
detail: panelDetail,
|
detail: panelDetail,
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
|
this._enableBrushIndicator();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1465,6 +1469,7 @@ export class ToolManager {
|
|||||||
OperationType.ERASER,
|
OperationType.ERASER,
|
||||||
OperationType.RED_BRUSH,
|
OperationType.RED_BRUSH,
|
||||||
OperationType.GREEN_BRUSH,
|
OperationType.GREEN_BRUSH,
|
||||||
|
OperationType.LIQUIFY,
|
||||||
];
|
];
|
||||||
|
|
||||||
return brushTools.includes(currentTool);
|
return brushTools.includes(currentTool);
|
||||||
|
|||||||
@@ -22,13 +22,13 @@ export class EnhancedLiquifyManager {
|
|||||||
// 是否强制使用WebGL模式
|
// 是否强制使用WebGL模式
|
||||||
forceWebGL: options.forceWebGL || false,
|
forceWebGL: options.forceWebGL || false,
|
||||||
// 网格大小
|
// 网格大小
|
||||||
gridSize: options.gridSize || 15,
|
gridSize: options.gridSize || 8,
|
||||||
// 最大变形强度
|
// 最大变形强度
|
||||||
maxStrength: options.maxStrength || 100,
|
maxStrength: options.maxStrength || 200,
|
||||||
// 平滑迭代次数
|
// 平滑迭代次数
|
||||||
smoothingIterations: options.smoothingIterations || 2,
|
smoothingIterations: options.smoothingIterations || 1,
|
||||||
// 网格弹性因子
|
// 网格弹性因子
|
||||||
relaxFactor: options.relaxFactor || 0.25,
|
relaxFactor: options.relaxFactor || 0.05,
|
||||||
// WebGL网格精度
|
// WebGL网格精度
|
||||||
meshResolution: options.meshResolution || 64,
|
meshResolution: options.meshResolution || 64,
|
||||||
};
|
};
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -31,10 +31,10 @@ export class LiquifyManager {
|
|||||||
// 创建增强版液化管理器实例
|
// 创建增强版液化管理器实例
|
||||||
this.enhancedManager = new EnhancedLiquifyManager({
|
this.enhancedManager = new EnhancedLiquifyManager({
|
||||||
// 配置选项
|
// 配置选项
|
||||||
gridSize: options.gridSize || 15,
|
gridSize: options.gridSize || 8,
|
||||||
maxStrength: options.maxStrength || 100,
|
maxStrength: options.maxStrength || 200,
|
||||||
smoothingIterations: options.smoothingIterations || 2,
|
smoothingIterations: options.smoothingIterations || 1,
|
||||||
relaxFactor: options.relaxFactor || 0.25,
|
relaxFactor: options.relaxFactor || 0.05,
|
||||||
meshResolution: options.meshResolution || 64,
|
meshResolution: options.meshResolution || 64,
|
||||||
// 根据环境选择合适的渲染模式
|
// 根据环境选择合适的渲染模式
|
||||||
forceCPU: true, // 默认不强制使用CPU
|
forceCPU: true, // 默认不强制使用CPU
|
||||||
|
|||||||
@@ -56,9 +56,14 @@
|
|||||||
<span class="image-name">{{ item.name || "未命名" }}</span>
|
<span class="image-name">{{ item.name || "未命名" }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="image-select" v-show="selectList.includes(item.url)">
|
<!-- <div class="image-select" v-show="selectList.includes(item.url)">
|
||||||
<i class="fi fi-sr-check-circle"></i>
|
<i class="fi fi-sr-check-circle"></i>
|
||||||
</div>
|
</div> -->
|
||||||
|
<img
|
||||||
|
src="@/assets/images/icon/selected.png"
|
||||||
|
class="image-select"
|
||||||
|
v-show="selectList.includes(item.url)"
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -16,14 +16,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="detailText">{{$t('DesignPrintOperation.Colorfromimage')}}</div>
|
<div class="detailText">{{$t('DesignPrintOperation.Colorfromimage')}}</div>
|
||||||
<div class="uploadImage flex flex-align-center flex-justify-around">
|
<div class="uploadImage flex flex-align-center flex-justify-center">
|
||||||
<div class="upload-container flex flex-column flex-align-center" :class="{'hide': !showLibrary}">
|
<div class="upload-container" :class="{'hide': !showLibrary}">
|
||||||
<upload ref="uploadRef" @selectUplpadColor="selectUplpadColor" @selectFile="showLibrary = false" @deleteColor="showLibrary = true"></upload>
|
<upload ref="uploadRef" @selectUplpadColor="selectUplpadColor" @selectFile="showLibrary = false" @deleteColor="showLibrary = true"></upload>
|
||||||
<div class="upload-text" v-show="showLibrary"> {{ $t('LibraryPage.Upload') }} </div>
|
<div class="upload-text" v-show="showLibrary"> {{ $t('LibraryPage.Upload') }} </div>
|
||||||
</div>
|
</div>
|
||||||
<div class="upload-container flex flex-column flex-align-center" v-show="showLibrary">
|
<div class="upload-container " v-show="showLibrary">
|
||||||
<!-- <i class="fi fi-rr-followcollection"></i> -->
|
<!-- <i class="fi fi-rr-followcollection"></i> -->
|
||||||
<SvgIcon name="CLibrary" size="40" @click="handleOpenLibrary" />
|
<SvgIcon name="CLibrary" class="svg-btn" size="20" @click="handleOpenLibrary" />
|
||||||
<div class="upload-text"> {{ $t('LibraryPage.library') }} </div>
|
<div class="upload-text"> {{ $t('LibraryPage.library') }} </div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -268,9 +268,7 @@ export default defineComponent({
|
|||||||
selectImages.value.init()
|
selectImages.value.init()
|
||||||
}
|
}
|
||||||
const handleImageSelect = (item:any)=>{
|
const handleImageSelect = (item:any)=>{
|
||||||
console.log('item',item)
|
|
||||||
UrlToFile(item.url,item.name).then((file:any)=>{
|
UrlToFile(item.url,item.name).then((file:any)=>{
|
||||||
console.log('file',file)
|
|
||||||
// 构造符合 fileUploadChange 期望的数据结构
|
// 构造符合 fileUploadChange 期望的数据结构
|
||||||
const fileData = {
|
const fileData = {
|
||||||
file: {
|
file: {
|
||||||
@@ -280,7 +278,6 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
uploadRef.value.fileUploadChange(fileData)
|
uploadRef.value.fileUploadChange(fileData)
|
||||||
})
|
})
|
||||||
// uploadRef.value.selectColor(item)
|
|
||||||
}
|
}
|
||||||
const handleShowListChange=(val:boolean)=>{
|
const handleShowListChange=(val:boolean)=>{
|
||||||
console.log('val',val)
|
console.log('val',val)
|
||||||
@@ -451,12 +448,17 @@ export default defineComponent({
|
|||||||
height: 10rem;
|
height: 10rem;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-radius: .5rem;
|
border-radius: .5rem;
|
||||||
|
column-gap: 2rem;
|
||||||
.upload-container{
|
.upload-container{
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
justify-content: space-evenly;
|
||||||
|
align-items: center;
|
||||||
background-color: #EDEDED;
|
background-color: #EDEDED;
|
||||||
padding: 1rem 2rem;
|
|
||||||
border-radius: 1rem;
|
border-radius: 1rem;
|
||||||
width: 8rem;
|
width: 7rem;
|
||||||
height: 8rem;
|
height: 7rem;
|
||||||
|
// row-gap: 1rem;
|
||||||
&.hide{
|
&.hide{
|
||||||
width: initial;
|
width: initial;
|
||||||
height: initial;
|
height: initial;
|
||||||
@@ -466,6 +468,11 @@ export default defineComponent({
|
|||||||
background-color: transparent;
|
background-color: transparent;
|
||||||
padding-left: 1rem;
|
padding-left: 1rem;
|
||||||
}
|
}
|
||||||
|
.svg-btn{
|
||||||
|
cursor: pointer;
|
||||||
|
width: initial;
|
||||||
|
height: initial;
|
||||||
|
}
|
||||||
:deep(.ant-upload){
|
:deep(.ant-upload){
|
||||||
background: transparent;
|
background: transparent;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -181,8 +181,8 @@ export default defineComponent({
|
|||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.upload{
|
.upload{
|
||||||
// width: 34rem;
|
// width: 34rem;
|
||||||
width: 100%;
|
// width: 100%;
|
||||||
height: 100%;
|
// height: 100%;
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
:deep(.ant-upload-picture-card-wrapper){
|
:deep(.ant-upload-picture-card-wrapper){
|
||||||
@@ -204,7 +204,7 @@ export default defineComponent({
|
|||||||
}
|
}
|
||||||
.upload_tip_block{
|
.upload_tip_block{
|
||||||
i{
|
i{
|
||||||
font-size: 4rem;
|
font-size: 2rem;
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -38,9 +38,10 @@
|
|||||||
<span class="image-name">{{ item.name || '未命名' }}</span>
|
<span class="image-name">{{ item.name || '未命名' }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="image-select" v-show="selectList.includes(item.url)">
|
<img class="selected-icon image-select" src="@/assets/images/icon/selected.png" v-show="selectList.includes(item.url)">
|
||||||
|
<!-- <div class="" v-show="selectList.includes(item.url)">
|
||||||
<i class="fi fi-sr-check-circle"></i>
|
<i class="fi fi-sr-check-circle"></i>
|
||||||
</div>
|
</div> -->
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -242,8 +243,8 @@ const resetAndLoad = (category = selectedCategory.value) => {
|
|||||||
list.value = []
|
list.value = []
|
||||||
hasMore.value = true
|
hasMore.value = true
|
||||||
currentPage.value = 0
|
currentPage.value = 0
|
||||||
console.log('默认选择----',getDefaultCategory())
|
// console.log('默认选择----',getDefaultCategory())
|
||||||
selectedCategory.value = getDefaultCategory()
|
selectedCategory.value =category || getDefaultCategory()
|
||||||
fetchImages(1, category, true)
|
fetchImages(1, category, true)
|
||||||
|
|
||||||
// 检查是否需要自动加载更多数据
|
// 检查是否需要自动加载更多数据
|
||||||
@@ -280,6 +281,7 @@ const handleImageClick = item => {
|
|||||||
|
|
||||||
// 处理分类切换
|
// 处理分类切换
|
||||||
const handleChangeCategory = category => {
|
const handleChangeCategory = category => {
|
||||||
|
// console.log('handleChangeCategory',category)
|
||||||
selectedCategory.value = category
|
selectedCategory.value = category
|
||||||
|
|
||||||
// 如果提供了API,则重新加载数据
|
// 如果提供了API,则重新加载数据
|
||||||
@@ -508,8 +510,9 @@ defineExpose({
|
|||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
|
||||||
gap: 16px;
|
gap: 16px;
|
||||||
min-height: 20rem;
|
min-height: 22rem;
|
||||||
max-height: 50rem;
|
max-height: 50rem;
|
||||||
|
padding-bottom: 2rem;
|
||||||
|
|
||||||
@media screen and (max-width: 768px) {
|
@media screen and (max-width: 768px) {
|
||||||
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
|
grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
|
||||||
@@ -574,12 +577,16 @@ defineExpose({
|
|||||||
|
|
||||||
.image-select {
|
.image-select {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 0;
|
bottom: -1.25rem;
|
||||||
right: 0;
|
right: -1.25rem;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
transform: translate(50%, 50%);
|
// transform: translate(50%, 50%);
|
||||||
i {
|
// i {
|
||||||
font-size: 2.5rem;
|
// font-size: 2.5rem;
|
||||||
|
// }
|
||||||
|
&.selected-icon{
|
||||||
|
width:2.5rem;
|
||||||
|
height: 2.5rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="table_search_bar flex flex-justify-between flex-align-center">
|
<div class="table_search_bar flex flex-align-center flex-justify-between">
|
||||||
<div class="search_preset flex flex-1">
|
<div class="search_preset flex ">
|
||||||
<div
|
<div
|
||||||
class="preset_item gallery_btn white"
|
class="preset_item gallery_btn white"
|
||||||
v-for="item in buttonList"
|
v-for="item in buttonList"
|
||||||
@@ -11,15 +11,15 @@
|
|||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="search_input flex flex-align-center">
|
<div class="search_input flex flex-align-center" :style="{ width: inputWidth }">
|
||||||
<input
|
<input
|
||||||
class="search_input_inner flex-1"
|
class="search_input_inner"
|
||||||
v-model="searchParams.searchText"
|
v-model="searchParams.searchText"
|
||||||
:bordered="false"
|
:bordered="false"
|
||||||
@keydown.enter="handleSearch"
|
@keydown.enter="handleSearch"
|
||||||
:placeholder="placeholder"
|
:placeholder="placeholder"
|
||||||
/>
|
/>
|
||||||
<SearchOutlined @click="handleSearch" />
|
<SearchOutlined class="search_input_icon" @click="handleSearch" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -36,6 +36,7 @@ interface ButtonItem {
|
|||||||
interface Props {
|
interface Props {
|
||||||
buttonList: ButtonItem[]
|
buttonList: ButtonItem[]
|
||||||
placeholder?: string
|
placeholder?: string
|
||||||
|
inputWidth?: string
|
||||||
}
|
}
|
||||||
|
|
||||||
interface SearchParams {
|
interface SearchParams {
|
||||||
@@ -91,11 +92,13 @@ const handleSearch = () => {
|
|||||||
line-height: 4rem;
|
line-height: 4rem;
|
||||||
min-width: 10rem;
|
min-width: 10rem;
|
||||||
font-weight: normal;
|
font-weight: normal;
|
||||||
|
border-width: 0.1rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.search_input {
|
.search_input {
|
||||||
height: 4rem;
|
height: 4rem;
|
||||||
|
width: 23rem; // 默认宽度
|
||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
border: 0.1rem solid #000;
|
border: 0.1rem solid #000;
|
||||||
border-radius: 43rem;
|
border-radius: 43rem;
|
||||||
@@ -106,6 +109,10 @@ const handleSearch = () => {
|
|||||||
height: 100%;
|
height: 100%;
|
||||||
padding-left: 3rem;
|
padding-left: 3rem;
|
||||||
border-radius: 4rem;
|
border-radius: 4rem;
|
||||||
|
width: calc(100% - 2rem);
|
||||||
|
}
|
||||||
|
.search_input_icon {
|
||||||
|
font-size: 2rem;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -403,6 +403,10 @@ export default defineComponent({
|
|||||||
homeMainData.openType = Object.keys(query)[0]
|
homeMainData.openType = Object.keys(query)[0]
|
||||||
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
homeMainData.openTypeChild = query[Object.keys(query)[0]]
|
||||||
}
|
}
|
||||||
|
if(homeMainData.openType === 'history' && route.path !== '/home/history'){
|
||||||
|
homeMainData.openTypeChild = ''
|
||||||
|
homeMainData.openType = ''
|
||||||
|
}
|
||||||
if((query?.id || query?.history) && !await getIdExistToHistory()){
|
if((query?.id || query?.history) && !await getIdExistToHistory()){
|
||||||
router.push('/home')
|
router.push('/home')
|
||||||
return
|
return
|
||||||
|
|||||||
@@ -30,20 +30,14 @@
|
|||||||
<div class="operate_list" v-if="column?.Operations">
|
<div class="operate_list" v-if="column?.Operations">
|
||||||
<div
|
<div
|
||||||
class="operate_item"
|
class="operate_item"
|
||||||
v-if="
|
:class="{ 'operate_item_hidden': !(record.process ==='SERIES_DESIGN' || record.process ==='SINGLE_DESIGN') }"
|
||||||
record.process ==='SERIES_DESIGN' ||
|
|
||||||
record.process ==='SINGLE_DESIGN'
|
|
||||||
"
|
|
||||||
@click="turnToDetail(record)"
|
@click="turnToDetail(record)"
|
||||||
>
|
>
|
||||||
{{ $t('HistoryPage.Detail') }}
|
{{ $t('HistoryPage.Detail') }}
|
||||||
</div>
|
</div>
|
||||||
<div
|
<div
|
||||||
class="operate_item"
|
class="operate_item"
|
||||||
v-if="
|
:class="{ 'operate_item_hidden': !(record.process ==='SERIES_DESIGN' || record.process ==='SINGLE_DESIGN') }"
|
||||||
record.process ==='SERIES_DESIGN' ||
|
|
||||||
record.process ==='SINGLE_DESIGN'
|
|
||||||
"
|
|
||||||
@click="renameCollection(record, index)"
|
@click="renameCollection(record, index)"
|
||||||
>
|
>
|
||||||
{{ $t('LibraryPage.Rename') }}
|
{{ $t('LibraryPage.Rename') }}
|
||||||
@@ -725,6 +719,11 @@ export default defineComponent({
|
|||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #007ee5;
|
color: #007ee5;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
|
&.operate_item_hidden {
|
||||||
|
visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user