ananzhusen hai 1 ano
pai
achega
17a2eb3e0f

+ 9 - 4
src/services/defaults.ts

@@ -222,6 +222,13 @@ export const iframeCustom = [
     label: '网页地址',
     type: 'string',
   },
+  {
+    key: 'zIndex',
+    label: 'dom层级(z-index)',
+    type: 'number',
+    min: 0,
+    placeholder: '默认4',
+  },
   {
     key: 'operationalRect.x',
     label: '可操作x',
@@ -3005,7 +3012,6 @@ export const templates: any[] = [
   { name: '布局', list: [] },
 ];
 
-
 export const defaultPureColor: string[] = [
   '#ff925c',
   '#e6d950',
@@ -3026,7 +3032,7 @@ export const defaultPureColor: string[] = [
   '#000000',
   '#FFFFFF',
   '#FFFFFF00',
-]
+];
 
 // export const defaultGradientColor: string[] = [
 //   'linear-gradient(90deg, #E52600 0%, #CC0000 12%, #FF925C 80%, #FF622E 100%)',
@@ -3042,7 +3048,6 @@ export const defaultPureColor: string[] = [
 //   'linear-gradient(90deg, #bac2c9 0%, #bac2c9 18%,#7b7f8c 20%,#bac2c9 50%, #7b7f8c 80%,#bac2c9 82%, #bac2c9 100%)'
 // ]
 
-
 export const defaultGradientColor: string[] = [
   '#ff925c',
   '#e6d950',
@@ -3062,4 +3067,4 @@ export const defaultGradientColor: string[] = [
   '#FF85C0',
   '#000000',
   '#FFFFFF',
-]
+];

+ 1 - 1
src/services/user.ts

@@ -117,7 +117,7 @@ export const useUser = () => {
     if (domain) {
       deleteCookie('token', {
         path: '/',
-        domain: 'le5le.com',
+        domain: domain, //'le5le.com',
       });
     }
 

+ 8 - 0
src/services/utils.ts

@@ -1,6 +1,7 @@
 import { Pen, Meta2dData } from '@meta2d/core';
 import { MessagePlugin, NotifyPlugin, Button } from 'tdesign-vue-next';
 import { h, ref } from 'vue';
+import { upCdn } from './api';
 
 export const noLoginTip = '请先登录,否则无法保存!';
 export const localStorageName = 'le5leV';
@@ -101,6 +102,13 @@ export async function dealwithFormatbeforeOpen(data: Meta2dBackData) {
           pen.gradientAngle ? Number(pen.gradientAngle) + 90 : 0
         }deg,${pen.gradientFromColor} 0%,${pen.gradientToColor} 100%)`;
       }
+      if (
+        pen.image &&
+        pen.image.startsWith('/') &&
+        !pen.image.startsWith('/v/')
+      ) {
+        pen.image = upCdn + pen.image;
+      }
     });
 }
 

+ 3 - 0
src/styles/app.css

@@ -467,6 +467,9 @@ a.hover:hover {
     line-height: 30px;
     flex-shrink: 0;
     color: var(--color);
+    overflow: hidden;
+    text-overflow: ellipsis;
+    white-space: nowrap;
   }
 
   .t-input-number {

+ 2 - 1
src/views/components/Graphics.vue

@@ -148,6 +148,7 @@
                     fit="contain"
                     @load="loadImage(elem)"
                   />
+
                   <div class="svg-box" v-else-if="elem.svg" v-html="elem.svg" />
                   <svg v-else class="l-icon" aria-hidden="true">
                     <use :xlink:href="'#' + elem.icon"></use>
@@ -566,7 +567,7 @@ const getImageList = async () => {
       );
       let list = _ret.list.map((_item) => {
         return {
-          image: _item.filename,
+          image: _item.metadata.url,
           visible: true,
           folder: item.fullpath,
           _id: item._id,

+ 1 - 1
src/views/components/PenProps.vue

@@ -901,7 +901,7 @@
             >
               <t-space direction="vertical" size="small" class="w-full">
                 <div v-for="item in data.pen.props.custom" class="form-item">
-                  <label>{{ item.label }}</label>
+                  <label :title="item.label">{{ item.label }}</label>
                   <t-checkbox
                     class="ml-8"
                     v-if="item.type === 'bool'"

+ 15 - 0
src/views/components/View.vue

@@ -237,6 +237,13 @@
       </t-tooltip>
 
       <div class="flex-grow"></div>
+      <t-tooltip
+        :content="canScale ? '允许缩放' : '禁止缩放'"
+        placement="bottom"
+      >
+        <t-icon v-if="canScale" name="unfold-more" @click="onCanScale(true)" />
+        <t-icon v-else name="unfold-less" @click="onCanScale(false)" />
+      </t-tooltip>
       <t-tooltip :content="isLock ? '浏览模式' : '编辑模式'" placement="bottom">
         <a>
           <svg
@@ -1139,6 +1146,14 @@ function onLock(lock: number) {
   meta2d.hideInput();
 }
 
+const canScale = ref(true);
+function onCanScale(can: boolean) {
+  canScale.value = can;
+  meta2d.setOptions({
+    disableScale: can,
+  });
+}
+
 const preview = async () => {
   meta2d.stopAnimate();
   // @ts-ignore