From e4e66c74bca6c19bd55df23ee5e38e78d4a54127 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E7=A5=A5=E8=B6=85?= Date: Tue, 13 Jun 2023 20:52:46 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0Components.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- web/public/js/components.js | 27 ++++++++++++++- web/public/js/components.src.js | 58 +++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 1 deletion(-) diff --git a/web/public/js/components.js b/web/public/js/components.js index 41295ba0..dbabf7c9 100644 --- a/web/public/js/components.js +++ b/web/public/js/components.js @@ -4647,7 +4647,32 @@ example2.com -`}),Vue.component("http-request-cond-view",{props:["v-cond"],data:function(){return{cond:this.vCond,components:window.REQUEST_COND_COMPONENTS}},methods:{typeName:function(i){var e=this.components.$find(function(e,t){return t.type==i.type});return null!=e?e.name:i.param+" "+i.operator},updateConds:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(this.cond[i]=t[i])},notifyChange:function(){}},template:`
+`}),Vue.component("http-oss-bucket-params",{props:["v-oss-config","v-params","name"],data:function(){let e=this.vParams,t=(null==e&&(e=[]),this.vOssConfig);return null==t?t={bucketParam:"input",bucketName:"",bucketArgName:""}:(null!=t.bucketParam&&0==t.bucketParam.length&&(t.bucketParam="input"),null!=t.options&&null!=t.options.bucketName&&0 + + {{name}}名称获取方式 * + + +

{{param.description.replace("\${optionName}", name)}}

+ + + + {{name}}名称 * + + +

{{name}}名称,类似于bucket-12345678

+ + + + {{name}}参数名称 * + + +

{{name}}参数名称,比如?myBucketName=BUCKET-NAME中的myBucketName

+ + +`}),Vue.component("http-request-cond-view",{props:["v-cond"],data:function(){return{cond:this.vCond,components:window.REQUEST_COND_COMPONENTS}},methods:{typeName:function(i){var e=this.components.$find(function(e,t){return t.type==i.type});return null!=e?e.name:i.param+" "+i.operator},updateConds:function(e,t){for(var i in t)t.hasOwnProperty(i)&&(this.cond[i]=t[i])},notifyChange:function(){}},template:`
{{cond.param}} {{cond.operator}} {{typeName(cond)}}: diff --git a/web/public/js/components.src.js b/web/public/js/components.src.js index 2e133691..448fbb0b 100755 --- a/web/public/js/components.src.js +++ b/web/public/js/components.src.js @@ -12858,6 +12858,64 @@ Vue.component("http-firewall-block-options", { ` }) +Vue.component("http-oss-bucket-params", { + props: ["v-oss-config", "v-params", "name"], + data: function () { + let params = this.vParams + if (params == null) { + params = [] + } + + let ossConfig = this.vOssConfig + if (ossConfig == null) { + ossConfig = { + bucketParam: "input", + bucketName: "", + bucketArgName: "" + } + } else { + // 兼容以往 + if (ossConfig.bucketParam != null && ossConfig.bucketParam.length == 0) { + ossConfig.bucketParam = "input" + } + if (ossConfig.options != null && ossConfig.options.bucketName != null && ossConfig.options.bucketName.length > 0) { + ossConfig.bucketName = ossConfig.options.bucketName + } + } + + return { + params: params, + ossConfig: ossConfig + } + }, + template: ` + + {{name}}名称获取方式 * + + +

{{param.description.replace("\${optionName}", name)}}

+ + + + {{name}}名称 * + + +

{{name}}名称,类似于bucket-12345678

+ + + + {{name}}参数名称 * + + +

{{name}}参数名称,比如?myBucketName=BUCKET-NAME中的myBucketName

+ + +` +}) + Vue.component("http-request-cond-view", { props: ["v-cond"], data: function () {