模板代码:
{extend name="../../vendor/tj/tp-script-vue-curd/tpl/index" /}
{block name="extend"}
{layout name="../../vendor/tj/tp-script-vue-curd/tpl/layout/default" /}
{/block}
{block name="toolBtnRight"}
<div class="ant-space-item" v-if="canOpenConfig">
<a-divider type="vertical"></a-divider>
</div>
<div class="ant-space-item" v-if="canOpenConfig">
<a-button type="warning" @click="openConfig">
<setting-outlined></setting-outlined>
<span> 项目配置</span>
</a-button>
</div>
{/block}
{block name="script"}
<script>
window.thisAction={
data(){
return {
canOpenConfig:true,//正常的是否是vueData.canOpenConfig; vueData.canOpenConfig 的赋值在 indexFetch(https://www.yuque.com/junt/tp-script-vue-curd/vba818)
}
},
methods:{
openConfig(){
//打开iframe窗口
this.openBox({
title:'项目配置',
url: "{:url('config')->build()}",
}).end();
}
}
};
</script>
{/block}
生成示例: