1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
<right-click-menu v-bind:menu-display="menuDisplay" v-bind:menu-x="menuX" v-bind:menu-y="menuY" v-bind:menu-list="menuList" />
<script> data: function () { return { title: 'MacI耗材需求NPI阶段打样', locationList: [{id: 'HN', name: '華南'}, {id: 'HZ', name: '華中'}, {id: 'HB', name: '華北'}, {id: 'HX', name: '華西'}], location: 'HX', csTypeList: [{id: 'NewMaterialDev', name: '新物料開發'}, {id: 'SecondSource', name: 'Second Source'}], csType: 'NewMaterialDev', menuDisplay: false, menuX: 0, menuY: 0, itemList: [], itemClickedIndex: 0, compareList: [], compareClickIndex: 0, menuType: '', } }, computed: { menuList () { return [ {name: '添加一行', showFlag: true, onClick: this.menuType === 'item' ? this.addItemRow : this.addCompareRow}, {name: '删除本行', showFlag: this.menuType === 'item' ? this.itemList.length !== 1 : this.compareList.length !== 1, onClick: this.menuType === 'item' ? this.deleteItemRow : this.deleteCompareRow}, ]; }, }, </script>
|