Commit a40f0cb3 authored by 何虹's avatar 何虹 💬

优化

parent 2c37bbe6
...@@ -2,8 +2,7 @@ ...@@ -2,8 +2,7 @@
"name": "hs-sky-ui", "name": "hs-sky-ui",
"version": "1.0.21", "version": "1.0.21",
"description": "hs组件库", "description": "hs组件库",
"mainYY": "lib/hs-sky-ui.common.js", "main": "lib/hs-sky-ui.common.js",
"main": "./src/package/index.js",
"keyword": "hscomponent hs-sky-ui", "keyword": "hscomponent hs-sky-ui",
"private": false, "private": false,
"files": [ "files": [
......
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
...@@ -269,7 +269,11 @@ export default { ...@@ -269,7 +269,11 @@ export default {
if (config && Object.keys(config).length > 0) { if (config && Object.keys(config).length > 0) {
const isInnerRequest = config.isInnerRequest const isInnerRequest = config.isInnerRequest
if (isInnerRequest) { if (isInnerRequest) {
const datas = await this.requestMethod(config, undefined, this.writeBackObject) const datas = await this.requestMethod(
config,
undefined,
this.writeBackObject
)
this.options = datas || [] this.options = datas || []
} }
} }
...@@ -293,8 +297,12 @@ export default { ...@@ -293,8 +297,12 @@ export default {
const newDefaultStr = JSON.stringify(newDefault) const newDefaultStr = JSON.stringify(newDefault)
const parms = _.cloneDeep(dyncQueryParms || {}) const parms = _.cloneDeep(dyncQueryParms || {})
parms.newDefault = newDefaultStr parms.newDefault = newDefaultStr
const href = location.href // const href = location.href
const startUrl = href.split('#')[0] const origin = location.origin
const hostname = location.hostname
const startUrl = hostname === '0.0.0.0' ? origin : origin + '/queryBi/web//'
// const startUrl = href.split("#")[0];
let url_ = url let url_ = url
const parseQuery = commonUtility.parseUrlQueryString() const parseQuery = commonUtility.parseUrlQueryString()
const { db_name } = parseQuery const { db_name } = parseQuery
...@@ -479,7 +487,11 @@ export default { ...@@ -479,7 +487,11 @@ export default {
// 节流 // 节流
remoteMethodsDebounce: _.debounce(async function(query) { remoteMethodsDebounce: _.debounce(async function(query) {
if (this.is_mock) return if (this.is_mock) return
const data = await this.requestMethod(this.configData, query || '', this.writeBackObject) const data = await this.requestMethod(
this.configData,
query || '',
this.writeBackObject
)
this.options = this.tansLate(data || []) this.options = this.tansLate(data || [])
}, 1000), }, 1000),
async remoteMethod_(query) { async remoteMethod_(query) {
......
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
import index from './index.vue'
index.install = function (Vue) {
Vue.component(index.name, index)
}
export default index
\ No newline at end of file
// import Vue from 'vue' import Vue from 'vue'
// const requireComponent_ = require.context('./', true, /index.vue$/) const requireComponent_ = require.context('./', true, /index.vue$/)
// const obj={} const obj={}
// requireComponent_.keys().forEach(fileName => { requireComponent_.keys().forEach(fileName => {
// const componentConfig = requireComponent_(fileName) const componentConfig = requireComponent_(fileName)
// const { name } = componentConfig.default const { name } = componentConfig.default
// if (name) { if (name) {
// Vue.component(name, componentConfig.default || componentConfig) Vue.component(name, componentConfig.default || componentConfig)
// obj[name]=componentConfig obj[name]=componentConfig
// } }
// }) })
// export default obj export default obj
\ No newline at end of file
import hsTree from './hs-tree/index.js';
import hsTags from './hs-tags/index.js';
import hsTabsQuerybiLinkTable from './hs-tabs-querybi-linkTable/index.js';
import hsTabs from './hs-tabs/index.js';
import hsTable from './hs-table/index.js';
import hsSwitch from './hs-switch/index.js';
import hsSelectPlus from './hs-select-plus/index.js';
import hsRadio from './hs-radio/index.js';
import hsLineBar from './hs-line-bar/index.js';
import hsInput from './hs-input/index.js';
import hsGantt from './hs-gantt/index.js';
import hsFile from './hs-file/index.js';
import hsDyncForm from './hs-dyncForm/index.js';
import hsDivider from './hs-divider/index.js';
import hsDialog from './hs-dialog/index.js';
import hsDatePicker from './hs-date-picker/index.js';
import hsComputed from './hs-computed/index.js';
import hsCheckboxGroup from './hs-checkbox-group/index.js';
import hsCheckbox from './hs-checkbox/index.js';
import hsCascader from './hs-cascader/index.js';
import hsButtonGroup from './hs-button-group/index.js';
import hsAction from './hs-action/index.js';
const components = [
hsTree,
hsTags,
hsTabsQuerybiLinkTable,
hsTabs,
hsTable,
hsSwitch,
hsSelectPlus,
hsRadio,
hsLineBar,
hsInput,
hsGantt,
hsFile,
hsDyncForm,
hsDivider,
hsDialog,
hsDatePicker,
hsComputed,
hsCheckboxGroup,
hsCheckbox,
hsCascader,
hsButtonGroup,
hsAction
]
const install = function(Vue,, opts = {}) {
components.forEach(component => {
Vue.component(component.name, component);
});
}
/* 支持使用标签的方式引入 */
if (typeof window !== 'undefined' && window.Vue) {
install(window.Vue);
}
export default {
install,
hsTree,
hsTags,
hsTabsQuerybiLinkTable,
hsTabs,
hsTable,
hsSwitch,
hsSelectPlus,
hsRadio,
hsLineBar,
hsInput,
hsGantt,
hsFile,
hsDyncForm,
hsDivider,
hsDialog,
hsDatePicker,
hsComputed,
hsCheckboxGroup,
hsCheckbox,
hsCascader,
hsButtonGroup,
hsAction
}
\ No newline at end of file
import index from './index.vue'
index.install = Vue => Vue.component(index.name, index);
if (typeof window !== 'undefined' && window.Vue) {
window.Vue.use(index);
}
export default index
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment