Closed pal-software closed 4 years ago
Hello.
Now when I try to use this code
httpVueLoader('?r=db_user/list' )
then script request url: ?r=db_user/list/index.vue
?r=db_user/list/index.vue
(url modifyed by function parseComponentURL(url) used every time by httpVueLoader() )
parseComponentURL(url)
httpVueLoader()
Maybe to change code from
function httpVueLoader(url, name) { var comp = parseComponentURL(url); return httpVueLoader.load(comp.url, name); }
to something such:
function httpVueLoader(url, name) { var comp = ( typeof name !== 'string' )? parseComponentURL(url) : { name: name, url: url }; return httpVueLoader.load(comp.url, comp.name); }
(i changed it for myself)
Then we can to write, for example:
httpVueLoader( 'https://some.site/component_maker.php?r=user/list', 'myUserListComponent' );
P.S.: now at the source httpVueLoader has 2 parameters ('url' & 'name'), but second parameter 'name' not used.
P.P.S.: and then maybe to change documentation ... write about second parameter 'name' of httVueLoader.
my English is very bad. sorry. :)
Hello.
Problem
Now when I try to use this code
then script request url:
?r=db_user/list/index.vue
(url modifyed by function
parseComponentURL(url)
used every time byhttpVueLoader()
)So...
Maybe to change code from
to something such:
(i changed it for myself)
Then we can to write, for example:
P.S.: now at the source httpVueLoader has 2 parameters ('url' & 'name'), but second parameter 'name' not used.
P.P.S.: and then maybe to change documentation ... write about second parameter 'name' of httVueLoader.
my English is very bad. sorry. :)