vue2-client 1.8.161 → 1.8.163
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -84,6 +84,10 @@ export default {
|
|
|
84
84
|
serverName: {
|
|
85
85
|
type: String,
|
|
86
86
|
default: 'af-system'
|
|
87
|
+
},
|
|
88
|
+
displayOnly: {
|
|
89
|
+
type: Boolean,
|
|
90
|
+
default: false
|
|
87
91
|
}
|
|
88
92
|
},
|
|
89
93
|
components: {
|
|
@@ -595,7 +599,7 @@ export default {
|
|
|
595
599
|
if (this.configData === undefined) {
|
|
596
600
|
console.error('未找到数据!')
|
|
597
601
|
} else {
|
|
598
|
-
this.originalConfig = Object.assign({}, this.
|
|
602
|
+
this.originalConfig = Object.assign({}, this.config)
|
|
599
603
|
this.originalConfig.data = JSON.parse(JSON.stringify(this.configData))
|
|
600
604
|
this.type = 'display'
|
|
601
605
|
this.onlyDisplay = true
|
|
@@ -607,8 +611,15 @@ export default {
|
|
|
607
611
|
},
|
|
608
612
|
},
|
|
609
613
|
beforeMount () {
|
|
614
|
+
if (this.displayOnly) {
|
|
615
|
+
this.onlyDisplay = true
|
|
616
|
+
this.type = 'display'
|
|
617
|
+
}
|
|
610
618
|
if (this.localConfig) {
|
|
611
619
|
if (this.localConfig.designMode === 'json') {
|
|
620
|
+
if (this.configData !== undefined) {
|
|
621
|
+
this.config.data = this.configData
|
|
622
|
+
}
|
|
612
623
|
this.jsonConfigInit()
|
|
613
624
|
} else {
|
|
614
625
|
this.config = this.localConfig
|
|
@@ -624,6 +635,9 @@ export default {
|
|
|
624
635
|
getConfigByName(this.configName, this.serverName, res => {
|
|
625
636
|
this.config = res
|
|
626
637
|
if (this.config.designMode === 'json') {
|
|
638
|
+
if (this.configData !== undefined) {
|
|
639
|
+
this.config.data = this.configData
|
|
640
|
+
}
|
|
627
641
|
this.jsonConfigInit()
|
|
628
642
|
} else {
|
|
629
643
|
if (this.configData !== undefined) {
|
|
@@ -4,9 +4,6 @@
|
|
|
4
4
|
<script>
|
|
5
5
|
import AMISRenderer from '@vue2-client/base-client/components/common/AMisRender'
|
|
6
6
|
import Vue from 'vue'
|
|
7
|
-
// import router from '@vue2-client/router'
|
|
8
|
-
// import store from 'core-js/internals/shared-store'
|
|
9
|
-
// import { i18n } from '../../../index'
|
|
10
7
|
import Index from '@vue2-client/base-client/components/index.js'
|
|
11
8
|
|
|
12
9
|
const vms = {}
|
|
@@ -227,66 +224,80 @@ const schema2 = {
|
|
|
227
224
|
type: 'grid',
|
|
228
225
|
columns: [
|
|
229
226
|
{
|
|
227
|
+
md: 3,
|
|
230
228
|
body: [
|
|
231
229
|
{
|
|
232
230
|
type: 'input-tree',
|
|
233
|
-
name: '
|
|
231
|
+
name: 'test_tree2',
|
|
234
232
|
label: '树选择框',
|
|
235
233
|
options: [
|
|
236
234
|
{
|
|
237
235
|
label: '查询配置',
|
|
236
|
+
icon: 'fa fa-cogs',
|
|
238
237
|
children: [
|
|
239
238
|
{
|
|
240
239
|
label: '字典管理',
|
|
241
|
-
value: 'crud_dictionary_manage'
|
|
240
|
+
value: 'crud_dictionary_manage',
|
|
241
|
+
icon: 'fa fa-cog'
|
|
242
242
|
},
|
|
243
243
|
{
|
|
244
|
-
label: '
|
|
245
|
-
value: '
|
|
244
|
+
label: '字典值管理',
|
|
245
|
+
value: 'crud_dictionary_value_manage',
|
|
246
|
+
icon: 'fa fa-cog'
|
|
246
247
|
}
|
|
247
248
|
]
|
|
248
249
|
}
|
|
249
|
-
]
|
|
250
|
+
],
|
|
251
|
+
value: 'crud_dictionary_manage'
|
|
250
252
|
}
|
|
251
|
-
]
|
|
252
|
-
id: 'u:b1d2075dc231',
|
|
253
|
-
md: 1.5
|
|
253
|
+
]
|
|
254
254
|
},
|
|
255
255
|
{
|
|
256
|
+
md: 9,
|
|
256
257
|
body: [
|
|
257
258
|
{
|
|
258
|
-
name: 'xTable',
|
|
259
|
+
name: 'xTable',
|
|
259
260
|
type: 'custom',
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
261
|
+
onMount: (dom, value, onChange, props) => {
|
|
262
|
+
console.warn('value', value)
|
|
263
|
+
console.warn('props', props)
|
|
263
264
|
const vm = new Vue({
|
|
264
265
|
router,
|
|
265
266
|
store,
|
|
266
267
|
i18n,
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
268
|
+
data: {
|
|
269
|
+
queryParamsNameFather: 'crud_dictionary_manage'
|
|
270
|
+
},
|
|
271
|
+
render: function (createElement) {
|
|
272
|
+
return createElement(
|
|
273
|
+
'div',
|
|
274
|
+
[
|
|
275
|
+
createElement(Index.XFormTable, {
|
|
276
|
+
props: {
|
|
277
|
+
queryParamsName: this.queryParamsNameFather
|
|
278
|
+
},
|
|
279
|
+
on: {
|
|
280
|
+
action: function (record, id, actionType) {
|
|
281
|
+
console.warn('action触发', record, id, actionType)
|
|
282
|
+
}
|
|
283
|
+
}
|
|
284
|
+
})
|
|
285
|
+
]
|
|
286
|
+
)
|
|
287
|
+
}
|
|
272
288
|
})
|
|
273
289
|
vms.XFormTable = vm
|
|
274
290
|
dom.appendChild(vm.$mount().$el)
|
|
275
291
|
},
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
console.log('数据有变化', data)
|
|
280
|
-
const vm = vms.XFormTable
|
|
281
|
-
vm.$children[0].active(data)
|
|
292
|
+
onUpdate: (dom, data, prevData, props) => {
|
|
293
|
+
console.warn('AAA', vms)
|
|
294
|
+
Vue.set(vms.XFormTable, 'queryParamsNameFather', data.test_tree2)
|
|
282
295
|
},
|
|
283
|
-
// onUnmount 将会在组件被销毁的时候调用,用于清理资源
|
|
284
296
|
onUnmount: () => {
|
|
285
297
|
console.log('组件被销毁')
|
|
286
298
|
},
|
|
287
299
|
},
|
|
288
|
-
]
|
|
289
|
-
id: 'u:e4e49c147c06'
|
|
300
|
+
]
|
|
290
301
|
}
|
|
291
302
|
],
|
|
292
303
|
}
|