Explorar el Código

添加参数可拖拽

zhoucg hace 1 año
padre
commit
e1d9dc98ba

+ 1 - 1
src/components/PageComponents/yvan-table/YvanSimpleTable.vue

@@ -12,7 +12,7 @@
       </ContextItem>
     </Context>
     <StyledSimpleTable v-bind="style">
-      <table ref="yvanTable">
+      <table ref="yvanSimpleTable">
         <tbody>
         <tr v-for="(row, index) in tableConfig.rows" :key="index">
           <td

+ 8 - 1
src/components/PageComponents/yvan-table/YvanSimpleTextInTable.vue

@@ -138,7 +138,14 @@ export default {
 
       const index = e.dataTransfer.getData('datasource-index')
       if (index) {
-        let bindingDataSource = this.dataSource[index]
+        console.log(' >>> ', index, this.dataSource)
+        // let bindingDataSource = this.dataSource[index]
+        let bindingDataSource = {
+          title: '当前页',
+          code: 'pageNumber',
+          fieldName: 'page_number',
+          typeName: 'String'
+        }
         if (bindingDataSource) {
           this.$emit('update:bindValue', bindingDataSource)
           globalStore().updateDataValue({

+ 3 - 3
src/components/yvan-editor/ComponentAdjuster.vue

@@ -112,11 +112,11 @@ export default {
       curComponent: (state) => state.curComponent
     }),
     pointList() {
-      const isTable = ['RoySimpleTable', 'RoyComplexTable'].includes(this.element.component)
+      const isTable = ['YvanSimpleTable', 'YvanComplexTable'].includes(this.element.component)
       if (isTable) {
         return []
       }
-      if (['RoyLine'].includes(this.element.component)) {
+      if (['YvanLine'].includes(this.element.component)) {
         return ['r', 'l']
       }
       return ['lt', 't', 'rt', 'r', 'rb', 'b', 'lb', 'l']
@@ -125,7 +125,7 @@ export default {
       return this.active && !this.element.isLock
     },
     showRotate() {
-      return !['RoySimpleTable', 'RoyComplexTable'].includes(this.element?.component || '')
+      return !['YvanSimpleTable', 'YvanComplexTable'].includes(this.element?.component || '')
     },
     adjusterStyle() {
       return {